自然语言处理句子分割相较于Python算法的好处是什么?

huangapple go评论93阅读模式
英文:

What is the benefit of NLP sentence segmentation over Python algorithm?

问题

我在NLP中有一个任务要进行句子分割,但我想知道使用内置的NLP句子分割算法(如Spacy、NLTK、BERT等)与使用Python中的'.'分隔符或类似算法相比,有哪些优势?

是速度吗?还是准确性?还是代码行数更少?

这些算法与我们可以在Python中自己构建的算法有多不同或强大?

英文:

I have a task in NLP to do a sentence segmentation, but I wonder, what are the advantages of using built-in NLP sentence segmentation algorithms, such as Spacy, NLTK, BERT etc., over Python '.' separator or similar algorithm?

Is it the speed? or accuracy? or less line of code?

How different or strong these algorithms over the ones that we can build ourselves in Python?

答案1

得分: 1

句子分割程序来自NLP库,如SpaCy、NLTK等,更好地处理边缘情况,对处理标点和上下文更加稳健。例如,如果您选择通过将“。”视为句子边界来分割句子,那么您将如何处理这样的句子 - “这个瓶子里有0.5升水。”?

英文:

The sentence segmentation routines from the NLP libraries like SpaCy, NLTK, etc. handle edge cases much better and are more robust to handling punctuation and context. For example, if you choose to split sentences by treating a '.' as a sentence boundary, how would you handle a sentence like - "There are 0.5 liters of water in this bottle."?

huangapple
  • 本文由 发表于 2020年1月3日 20:28:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/59578665.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定