Package nltk :: Package app :: Module wordnet_app :: Class Reference
[hide private]
[frames] | no frames]

type Reference

source code

object --+
         |
        Reference

A reference to a page that may be generated by page_word

Instance Methods [hide private]
 
__init__(self, word, synset_relations={})
Build a reference to a new page.
source code
 
encode(self)
Encode this reference into a string to be used in a URL.
source code
 
toggle_synset_relation(self, synset, relation)
Toggle the display of the relations for the given synset and relation type.
source code
 
toggle_synset(self, synset)
Toggle displaying of the relation types for the given synset
source code
Method Details [hide private]

__init__(self, word, synset_relations={})
(Constructor)

source code 

Build a reference to a new page.

word is the word or words (seperated by commas) for which to search for synsets of

synset_relations is a dictionary of synset keys to sets of synset relation identifaiers to unfold a list of synset relations for.

Overrides: object.__init__

toggle_synset_relation(self, synset, relation)

source code 

Toggle the display of the relations for the given synset and relation type.

This function will throw a KeyError if the synset is currently not being displayed.