wordnet

How to get domain of words using WordNet in Python?

How to get domain of words using WordNet in Python? Question: How can I find domain of words using nltk Python module and WordNet? Suppose I have words like (transaction, Demand Draft, cheque, passbook) and the domain for all these words is “BANK”. How can we get this using nltk and WordNet in Python? I …

Total answers: 4

How to get synonyms from nltk WordNet Python

How to get synonyms from nltk WordNet Python Question: WordNet is great, but I’m having a hard time getting synonyms in nltk. If you search similar to for the word ‘small’ like here, it shows all of the synonyms. Basically I just need to know the following: wn.synsets(‘word’)[i].option() Where option can be hypernyms and antonyms, …

Total answers: 8

Generating the plural form of a noun

Generating the plural form of a noun Question: Given a word, which may or may not be a singular-form noun, how would you generate its plural form? Based on this NLTK tutorial and this informal list on pluralization rules, I wrote this simple function: def plural(word): “”” Converts a word to its plural form. “”” …

Total answers: 4

Finding Proper Nouns using NLTK WordNet

Finding Proper Nouns using NLTK WordNet Question: Is there any way to find proper nouns using NLTK WordNet?Ie., Can i tag Possessive nouns using nltk Wordnet ? Asked By: Backue || Source Answers: I think what you need is a tagger, a part-of-speech tagger. This tool assigns a part-of-speech tag (e.g., proper noun, possesive pronoun …

Total answers: 2

Python: Semantic similarity score for Strings

Python: Semantic similarity score for Strings Question: Are there any libraries for computing semantic similarity scores for a pair of sentences ? I’m aware of WordNet’s semantic database, and how I can generate the score for 2 words, but I’m looking for libraries that do all pre-processing tasks like port-stemming, stop word removal, etc, on …

Total answers: 3

wordnet lemmatization and pos tagging in python

wordnet lemmatization and pos tagging in python Question: I wanted to use wordnet lemmatizer in python and I have learnt that the default pos tag is NOUN and that it does not output the correct lemma for a verb, unless the pos tag is explicitly specified as VERB. My question is what is the best …

Total answers: 8

Convert words between verb/noun/adjective forms

Convert words between verb/noun/adjective forms Question: i would like a python library function that translates/converts across different parts of speech. sometimes it should output multiple words (e.g. “coder” and “code” are both nouns from the verb “to code”, one’s the subject the other’s the object) # :: String => List of String print verbify(‘writer’) # …

Total answers: 5

Resource 'corpora/wordnet' not found on Heroku

Resource 'corpora/wordnet' not found on Heroku Question: I’m trying to get NLTK and wordnet working on Heroku. I’ve already done heroku run python nltk.download() wordnet pip install -r requirements.txt But I get this error: Resource ‘corpora/wordnet’ not found. Please use the NLTK Downloader to obtain the resource: >>> nltk.download() Searched in: – ‘/app/nltk_data’ – ‘/usr/share/nltk_data’ …

Total answers: 13

How to check if a word is an English word with Python?

How to check if a word is an English word with Python? Question: I want to check in a Python program if a word is in the English dictionary. I believe nltk wordnet interface might be the way to go but I have no clue how to use it for such a simple task. def …

Total answers: 13