Package nltk :: Module cfg :: Class FeatStructNonterminal
[hide private]
[frames] | no frames]

Class FeatStructNonterminal

source code

                   object --+            
                            |            
sem.logic.SubstituteBindingsI --+        
                                |        
            featstruct.FeatStruct --+    
                                    |    
                       object --+   |    
                                |   |    
                             dict --+    
                                    |    
                  featstruct.FeatDict --+
                                        |
                           object --+   |
                                    |   |
                          Nonterminal --+
                                        |
                                       FeatStructNonterminal

A feature structure that's also a nonterminal. It acts as its own symbol, and automatically freezes itself when hashed.

Instance Methods [hide private]
(any)
symbol(self)
Returns: The node value corresponding to this Nonterminal.
source code

Inherited from featstruct.FeatDict: __init__

Inherited from dict: __cmp__, __ge__, __getattribute__, __gt__, __iter__, __le__, __len__, __lt__, fromkeys, items, iteritems, iterkeys, itervalues, keys, values

Inherited from Nonterminal: __div__

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __setattr__

    Dict methods

Inherited from featstruct.FeatDict: __contains__, __delitem__, __getitem__, __setitem__, clear, get, has_key, pop, popitem, setdefault, update

    Copying

Inherited from featstruct.FeatDict: __deepcopy__

Inherited from featstruct.FeatStruct: copy

    Uniform Accessor Methods

Inherited from featstruct.FeatDict (private): _items, _keys, _values

    String Representations

Inherited from featstruct.FeatDict: __str__

Inherited from featstruct.FeatDict (private): _repr, _str

Inherited from featstruct.FeatStruct: __repr__

    Equality & Hashing
 
__hash__(self)
If this feature structure is frozen, return its hash value; otherwise, raise TypeError.
source code

Inherited from featstruct.FeatStruct: __eq__, __ne__, equal_values

Inherited from featstruct.FeatStruct (private): _equal, _hash

    Freezing

Inherited from featstruct.FeatStruct: freeze, frozen

Inherited from featstruct.FeatStruct (private): _freeze

    Structural Information

Inherited from featstruct.FeatStruct: cyclic, reentrances, walk

Inherited from featstruct.FeatStruct (private): _find_reentrances, _walk

    Variables & Bindings

Inherited from featstruct.FeatStruct: remove_variables, rename_variables, retract_bindings, substitute_bindings, variables

    Unification

Inherited from featstruct.FeatStruct: subsumes, unify

Static Methods [hide private]
    Constructor

Inherited from featstruct.FeatStruct: __new__

Class Variables [hide private]
    Dict methods

Inherited from featstruct.FeatDict (private): _INDEX_ERROR

    Freezing

Inherited from featstruct.FeatStruct (private): _FROZEN_ERROR

Instance Variables [hide private]

Inherited from featstruct.FeatStruct (private): _frozen

Inherited from Nonterminal (private): _symbol

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__hash__(self)
(Hashing function)

source code 

If this feature structure is frozen, return its hash value; otherwise, raise TypeError.

Overrides: featstruct.FeatStruct.__hash__
(inherited documentation)

symbol(self)

source code 
Returns: (any)
The node value corresponding to this Nonterminal.
Overrides: Nonterminal.symbol
(inherited documentation)