stanford corenlp, splitting sentences, abbreviation exceptions

旧街凉风 提交于 2019-12-01 12:16:36

问题


Is there an option in Stanford Corenlp for specifying abbreviations? For example in the sentence: The reason pt. stayed at home was to rest. pt is the abbreviation for patient and corenlp incorrectly splits it into two sentences.

I was wondering how can I pass the list of abbreviations to the Stanford's tokenizer.


回答1:


The short answer is "no, there's no way to specify custom abbreviations currently" (as far as I know). The longer answer is that this code lives in a *.flex file, and you could add custom abbreviations to it. I think the place to do so is in PTBLexer.flex under the ABBREV1 definition.



来源:https://stackoverflow.com/questions/30334991/stanford-corenlp-splitting-sentences-abbreviation-exceptions

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!