2011 NLTK-WordNetCorpusReader
Jump to navigation
Jump to search
- (NLTK - WordNetCorpusReader Module, 2011-Jun-19) ⇒ http://nltk.googlecode.com/svn/trunk/doc/api/nltk.corpus.reader.wordnet.WordNetCorpusReader-class.html
Subject Headings: NLTK, WordNet, API
Notes
Quotes
A corpus reader used to access wordnet or its variants.
synsets(self, lemma, pos=None)
- Load all synsets with a given lemma and part of speech tag.
- http://nltk.googlecode.com/svn/trunk/doc/api/nltk.corpus.reader.wordnet.WordNetCorpusReader-class.html#synsets
lemmas(self, lemma, pos=None)
- Return all Lemma objects with a name matching the specified lemma name and part of speech tag.
all_lemma_names(self, pos=None)
- Return all lemma names for all synsets for the given part of speech tag.
all_synsets(self, pos=None)
- Iterate over all synsets with a given part of speech tag.
lemma_count(self, lemma)
- Return the frequency count for this Lemma
path_similarity(self, synset1, synset2, verbose=False, simulate_root=True)
- Path Distance Similarity: Return a score denoting how similar two word senses are, based on the shortest path that connects the senses in the is-a (hypernym/hypnoym) taxonomy.
lch_similarity(self, synset1, synset2, verbose=False, simulate_root=True)
- Leacock Chodorow Similarity Measure: Return a score denoting how similar two word senses are, based on the shortest path that connects the senses (as above) and the maximum depth of the taxonomy in which the senses occur.
wup_similarity(self, synset1, synset2, verbose=False, simulate_root=True)
- Wu-Palmer Similarity: Return a score denoting how similar two word senses are, based on the depth of the two senses in the taxonomy and that of their Least Common Subsumer (most specific ancestor node).
res_similarity(self, synset1, synset2, ic, verbose=False)
- Resnik Similarity: Return a score denoting how similar two word senses are, based on the Information Content (IC) of the Least Common Subsumer (most specific ancestor node).
jcn_similarity(self, synset1, synset2, ic, verbose=False)
- Jiang-Conrath Similarity: Return a score denoting how similar two word senses are, based on the Information Content (IC) of the Least Common Subsumer (most specific ancestor node) and that of the two input synsets.
lin_similarity(self, synset1, synset2, ic, verbose=False)
- Lin Similarity: Return a score denoting how similar two word senses are, based on the Information Content (IC) of the Least Common Subsumer (most specific ancestor node) and that of the two input synsets.
morphy(self, form, pos=None)
- Find a possible base form for the given form, with the given part of speech, by checking WordNet's list of exceptional forms, and by recursively stripping affixes for this part of speech until a form in WordNet is found.
ic(self, corpus, weight_senses_equally=False, smoothing=1.0)
- Creates an information content lookup dictionary from a corpus.
,