【发布时间】:2021-06-23 18:41:35
【问题描述】:
在Spacy模式匹配中,如何编写一个可以由以下模式触发的SINGLE模式匹配规则:
"red", apple" # ie, the rule must trigger when the input sentence contains "red apple"
"large", "white", "building" # ie, the rule must trigger when the input sentence contains "large white building"
["lamp", "light", "fan"] # ie, the rule must trigger when the input sentence contains a token "light"
在上面,每个部分没有相同数量的token,并且每个这样的部分可能不止一个token长(所以我不能使用Spacy运算符“IN”来组合所有这些部分)
【问题讨论】: