nlp = spacy.blank("en")
phrasematcher = PhraseMatcher('drug', [nlp(itm) for itm in ['new drug 1', 'new drug 2']])
我得到了以下错误。当我使用match_id查找哈希,然后使用它时,我会得到一个不同的错误。phrasematc
我想知道是否有任何有效的方法从给定的句子中提取预期的目标短语或关键短语。到目前为止,我标记了给定的句子并为每个单词获取POS标记。现在我不知道如何从给定的句子中提取目标关键字或关键词。这样做对我来说是不直观的。sentence_List= {"Obviously one of the most important features of any computer is the human interface.", "Good for everyday computing and web browsing.",
"My probl
为此,我考虑在一个进程中创建短语匹配对象,然后通过创建PhraseMatcher对象的副本在多个进程之间共享。这段代码似乎失败了,没有给出任何错误。import copyfrom spacy.matcher import PhraseMatcher
color_patterns, 'coats', 'bag')]
material_patterns = [nlp(text) for text in (