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

Class ScannerRule

source code

       object --+    
                |    
AbstractChartRule --+
                    |
                   ScannerRule
Known Subclasses:

A rule licensing a leaf edge corresponding to a part-of-speech terminal following an incomplete edge's dot. In particular, this rule specifies that:

licenses the edges:

if the jth word in the text is w; and P is a valid part of speech for w.

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

Inherited from AbstractChartRule: __str__, apply, apply_everywhere, apply_everywhere_iter

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

Class Variables [hide private]
  NUM_EDGES = 1
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, word_to_pos_lexicon)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

apply_iter(self, chart, gramar, edge)

source code 
Overrides: AbstractChartRule.apply_iter