stanford corenlp,句子拆分,缩写例外 [英] stanford corenlp, splitting sentences, abbreviation exceptions
问题描述
Stanford Corenlp中是否可以指定缩写?
例如,在句子中:The reason pt. stayed at home was to rest.
pt是Patient的缩写,而corenlp错误地将其拆分为两个句子.
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.
推荐答案
简短的回答是不,目前无法指定自定义缩写"(据我所知).更长的答案是该代码位于*.flex
文件中,您可以向其添加自定义缩写.我认为这样做的地方在
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.
这篇关于stanford corenlp,句子拆分,缩写例外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!