有没有办法在短语匹配器中启用同义(基于矢量相似性)和部分匹配选项 请考虑以下示例进行部分匹配:
matcher = PhraseMatcher(nlp.vocab)
terminology_list = ['Barack Obama', 'Angela Merkel', 'Washington, D.C.']
patterns = [nlp(text) for text in terminology_list]
matcher.add('TerminologyList', None, *patterns)
doc = nlp(u"German Chancellor Angela Merkel and US President Barack"
u"converse in the Oval Office inside the White House in Washington, D.C.")
matches = matcher(doc)