def __init__(self, string, stem=None, rating=1.0, proper=False,
terminal=False):
'''
@param string: the actual representation of the tag
@param stem: the internal (usually stemmed) representation;
tags with the same stem are regarded as equal
@param rating: a measure of the tag's relevance in the interval [0,1]
@param proper: whether the tag is a proper noun
@param terminal: set to True if the tag is at the end of a phrase
(or anyway it cannot be logically merged to the
following one)
@returns: a new L{Tag} object
'''
self.string = string
self.stem = stem or string
self.rating = rating
self.proper = proper
self.terminal = terminal
评论列表
文章目录