Package nltk :: Package tag :: Module brill :: Class ProximateTagsRule
[hide private]
[frames] | no frames]

Class ProximateTagsRule

source code

     object --+            
              |            
yaml.YAMLObject --+        
                  |        
          BrillRule --+    
                      |    
    ProximateTokensRule --+
                          |
                         ProximateTagsRule

A rule which examines the tags of nearby tokens.


See Also:
superclass ProximateTokensRule for details., SymmetricProximateTokensTemplate, which generates these rules.
Nested Classes [hide private]

Inherited from yaml.YAMLObject: __metaclass__, yaml_dumper, yaml_loader

Instance Methods [hide private]

Inherited from ProximateTokensRule: __eq__, __hash__, __init__, __ne__, __repr__, __str__, applies

Inherited from BrillRule: apply

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

Class Methods [hide private]

Inherited from ProximateTokensRule: from_yaml, to_yaml

Static Methods [hide private]
any
extract_property(token)
Returns: The given token's tag.
source code
Class Variables [hide private]
  PROPERTY_NAME = 'tag'
  yaml_tag = '!ProximateTagsRule'

Inherited from yaml.YAMLObject: yaml_flow_style

Instance Variables [hide private]

Inherited from BrillRule: original_tag, replacement_tag

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

extract_property(token)
Static Method

source code 

Returns some property characterizing this token, such as its base lexical item or its tag.

Each implentation of this method should correspond to an implementation of the method with the same name in a subclass of ProximateTokensTemplate.

Parameters:
  • token - The token
Returns: any
The given token's tag.
Overrides: ProximateTokensRule.extract_property