Package nltk :: Package sem :: Module glue :: Class GlueDict
[hide private]
[frames] | no frames]

type GlueDict

source code

object --+    
         |    
      dict --+
             |
            GlueDict
Known Subclasses:

Instance Methods [hide private]
new empty dictionary

__init__(self, filename)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
read_file(self, empty_first=True) source code
 
__str__(self) source code
 
to_glueformula_list(self, depgraph, node=None, counter=None, verbose=False) source code
 
lookup(self, node, depgraph, counter) source code
 
add_missing_dependencies(self, node, depgraph) source code
 
_lookup_semtype_option(self, semtype, node, depgraph) source code
 
get_semtypes(self, node)
Based on the node, return a list of plausible semtypes in order of plausibility.
source code
 
get_glueformulas_from_semtype_entry(self, lookup, word, node, depgraph, counter) source code
 
get_meaning_formula(self, generic, word) source code
 
initialize_labels(self, expr, node, depgraph, unique_index) source code
 
find_label_name(self, name, node, depgraph, unique_index) source code
 
get_label(self, node)
Pick an alphabetic character as identifier for an entity in the model.
source code
 
lookup_unique(self, rel, node, depgraph)
Lookup 'key'.
source code
 
get_GlueFormula_factory(self) source code

Inherited from dict: __cmp__, __contains__, __delitem__, __eq__, __ge__, __getattribute__, __getitem__, __gt__, __hash__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __repr__, __setitem__, clear, copy, fromkeys, get, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values

Method Details [hide private]

__init__(self, filename)
(Constructor)

source code 

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

Returns:
new empty dictionary

Overrides: dict.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 
Overrides: object.__str__
(inherited documentation)

get_meaning_formula(self, generic, word)

source code 
Parameters:
  • generic - A meaning formula string containing the parameter "<word>"
  • word - The actual word to be replace "<word>"

get_label(self, node)

source code 

Pick an alphabetic character as identifier for an entity in the model.

Parameters:
  • value (int) - where to index into the list of characters

lookup_unique(self, rel, node, depgraph)

source code 

Lookup 'key'. There should be exactly one item in the associated relation.