Package nltk :: Package wordnet :: Module synset :: Class WordSense
[hide private]
[frames] | no frames]

Class WordSense

source code

object --+
         |
        WordSense

A single word-sense pairing, indicated by in WordNet by a sense key of the form:

  lemma%ss_type:lex_filenum:lex_id:head_word:head_id
Instance Methods [hide private]
 
__init__(self, senseKey)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
count(self) source code
 
_senseIndexLine(self) source code
 
synset(self) source code
 
word(self) source code
 
senseNo(self) source code
 
lexname(self) source code
 
__str__(self)
str(x)
source code
 
__cmp__(self, other) source code
 
__hash__(self)
hash(x)
source code
 
__repr__(self)
str(x)
source code

Inherited from object: __delattr__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__

Static Methods [hide private]
 
fromSynset(synset, lemma, lex_id) source code
 
fromKeyParams(lemma, ss_type, lex_filenum, lex_id, head_word='', head_id='') source code
Class Variables [hide private]
  _ssTypeMap = {'a': 3, 'n': 1, 'r': 4, 's': 5, 'v': 2}
  _ssTypeRevMap = {1: 'n', 2: 'v', 3: 'a', 4: 'r', 5: 's'}
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, senseKey)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

__hash__(self)
(Hashing function)

source code 

hash(x)

Overrides: object.__hash__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

str(x)

Overrides: object.__repr__
(inherited documentation)