gpt4 book ai didi

python - 使用 spaCy 更好的命名实体识别和相似性

转载 作者:行者123 更新时间:2023-12-05 06:30:22 25 4
gpt4 key购买 nike

我一直在为一个小的副项目尝试 spaCy,并且有一些问题和疑虑。

我注意到 spaCy 的命名实体识别结果(具有最大的 en_vectors_web_lg 模型)似乎不如 Google Cloud Natural Language API [1] 准确。 Google 的 API 能够更准确地提取更多实体,这很可能是因为他们的模型更大。那么,有没有办法在可能的情况下使用不同的模型或通过其他技术来改善 spaCy 的 NER 结果?

其次,Google 的 API 还返回相关实体的维基百科文章链接。这是否也适用于 spaCy,或者在 spaCy 的 NER 结果之上使用其他技术?

第三,我注意到 spaCy 有一个使用 GloVe 词向量的 similarity() 方法 [2]。但作为新手,我不确定在一组文档(比如 5000-10000 个文本文档,每个文档少于 500 个字符)之间频繁执行相似性比较以生成相似文档桶的最佳方法是什么?

希望有人有任何建议或提示。

非常感谢!


[1] https://cloud.google.com/natural-language/

[2] https://spacy.io/usage/vectors-similarity

最佳答案

...那么有没有办法提高spaCy的NER呢?

It is possible to train the spaCy's model to improve it's NER. You can use GoldParse object to train it. https://spacy.io/usage/training

其次,Google 的 API 还返回相关实体的维基百科文章链接。这是否也适用于 spaCy,或者在 spaCy 的 NER 结果之上使用其他技术?

I have not seen anyone trying this feature with spaCy.

第三,我注意到 spaCy 有一个使用 GloVe 词向量的 similarity() 方法 [2]...

I think this a clustering problem and will not be solved just using spaCy similarity. For clustering, I would highly recommend going through the following link. http://brandonrose.org/clustering

关于python - 使用 spaCy 更好的命名实体识别和相似性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52473653/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com