假设我有一个文本,内容是输入句子:Computer programming is the process of writing instructions that get executed by computers我必须找出是否有任何短语与给定的文本句子相匹配。*live)'
Looking to put this rule into spacy's phrase or token matcher 有没有办法把这个语法模式放到spacy</
我希望将目标从科学期刊摘要中提取出来,并使用spacy。我有一个摘要的屏幕截图,并在图像上运行pytesseract。然后我制作了一个基于规则的匹配器,我认为它与研究目的之前的句子部分相匹配: #Rule based matching for AIM span = doc[start:end]
print(span.
However, a great big cut to the onions have been observed",我希望匹配短语“切洋葱”。这只是一个最小的例子。我的要求是,算法遍历所有句子,并返回一个bool,即句子是否包含该短语。另外,我只希望匹配词汇化的版本,在短语之间有0个或更多的单词是可以的。我的半个尝试如下(我需要帮助的地方被标记为TODO): impor