class documentation

class Reference(object): (source)

Constructor: Reference(word, synset_relations)

View In Hierarchy

A reference to a page that may be generated by page_word

Static Method decode Decode a reference encoded with Reference.encode
Method __init__ Build a reference to a new page.
Method encode Encode this reference into a string to be used in a URL.
Method toggle_synset Toggle displaying of the relation types for the given synset
Method toggle_synset_relation Toggle the display of the relations for the given synset and relation type.
Instance Variable synset_relations Undocumented
Instance Variable word Undocumented
@staticmethod
def decode(string): (source)

Decode a reference encoded with Reference.encode

def __init__(self, word, synset_relations=dict()): (source)

Build a reference to a new page.

word is the word or words (separated 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.

def encode(self): (source)

Encode this reference into a string to be used in a URL.

def toggle_synset(self, synset): (source)

Toggle displaying of the relation types for the given synset

def toggle_synset_relation(self, synset, relation): (source)

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.

synset_relations = (source)

Undocumented

Undocumented