def __init__(self, match=90, key=lambda x: x.string.lower()):
"""
Fuzzy matching between the given token and term objects. For comparison
applies the function given in the "key" parameter to the Token/tuple
of Tokens. Parameter match defines the minimum similarity ratio for
a match when comparing.
Input:
match : minimum similarity for fuzzy matching (%)
key : function to apply to the token,
default=lambda x: x.string.lower()
"""
self.match = match
self.key = key
评论列表
文章目录