Package nltk :: Package parse :: Module chart :: Class CachedTopDownInitRule
[hide private]
[frames] | no frames]

Class CachedTopDownInitRule

source code

       object --+        
                |        
AbstractChartRule --+    
                    |    
      TopDownInitRule --+
                        |
                       CachedTopDownInitRule

A cached version of TopDownInitRule. After the first time this rule is applied, it will not generate any more edges.

If chart or grammar are changed, then the cache is flushed.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
apply_iter(self, chart, grammar) source code
 
__str__(self)
str(x)
source code

Inherited from AbstractChartRule: apply, apply_everywhere, apply_everywhere_iter

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

Class Variables [hide private]

Inherited from TopDownInitRule: NUM_EDGES

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

apply_iter(self, chart, grammar)

source code 
Overrides: TopDownInitRule.apply_iter

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: AbstractChartRule.__str__