使用
spaCy
Now I am talking about cities and that is my current state. But now I talk about countries and then that is my state.
为了代币
Now I am talking about
状态未知,而从
cities and that is my current state. But now I talk about
国家是
CITY
剩下的就是
COUNTRY
. 别介意这个坏例子。
Token.set_extension('state', default=None)
然后更改
Doc
cities
和
countries
,但这会让事情慢下来,这是一个值得关注的问题。
痉挛
有更聪明的方法来实现这种逻辑吗?