![]() ![]() Code # Printing the Synonym, meaning and example of "teaching" for the first two indexes #First Index print(‘Word and Type : ‘ + syn.name()) print(‘Synonym of teaching is: ‘ + syn.lemmas().name()) print(‘The meaning of the teaching: ‘ + syn.definition()) print(‘Example of teaching : ‘ + str(syn.examples())) #Second Index print(‘Word and Type : ‘ + syn.name()) print(‘Synonym of teaching is: ‘ + syn.lemmas().name()) print(‘The meaning of the teaching : ‘ + syn.definition()) print(‘Example of teaching : ‘ + str(syn.examples())) Output # Output for first index Word and Type : teaching.n.01 Synonym of Teaching is: teaching The meaning of the Teaching: the profession of a teacher Example of Teaching : # Output for second index Word and Type : teaching.n. Synonyms for toolset include toolkit, toolbox, equipment, gear, kit, tools, apparatus, implements, instruments and set of tools. We can do this by indexing the first element at its name. The toolkit provides an extensive set of editors for different aspects of the system, such as organisational relations, coordination and negotiation models. Let’s find the first sense to get a better understanding of the kind of information each synset contains. ![]() We can see that “TEACHING” has five meanings. #Checking the word "Teaching" syn = wordnet.synsets(“teaching”) syn Output Sometimes, if some examples are available, it may also provide that. Let’s go ahead and look up the word “travel” In this example, we will see how wordnet returns meaning and other details of the word. DISCLAIMER: These example sentences appear in various news sources and books to reflect the usage of the word tool kit. Import NLTK library and install Wordnet import nltk nltk.download('wordnet') ![]()
0 Comments
Leave a Reply. |