Package nltk_lite :: Package tag :: Module unigram :: Class Regexp
[show private | hide private]
[frames | no frames]

Type Regexp

   object --+        
            |        
         TagI --+    
                |    
SequentialBackoff --+
                    |
                   Regexp


A tagger that assigns tags to words based on regular expressions.
Method Summary
  __init__(self, regexps, backoff)
Construct a new regexp tagger.
  __repr__(self)
  tag_one(self, token, history)
Inherited from SequentialBackoff: tag, tag_sents, _backoff_tag_one
Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Method Details

__init__(self, regexps, backoff=None)
(Constructor)

Construct a new regexp tagger.
Parameters:
regexps - A list of (regexp,tag) pairs, each of which indicates that a word matching regexp should be tagged with tag. The pairs will be evalutated in order. If none of the regexps match a word, then the optional backoff tagger is invoked, else it is assigned the tag None.
           (type=list of (string,string))
Overrides:
__builtin__.object.__init__

Generated by Epydoc 2.1 on Tue Sep 5 09:37:22 2006 http://epydoc.sf.net