stanford corenlp,拆分句子,缩写例外 [英] stanford corenlp, splitting sentences, abbreviation exceptions

查看:41
本文介绍了stanford corenlp,拆分句子,缩写例外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Stanford Corenlp 中是否有指定缩写的选项?例如在句子中:The reason pt.呆在家里就是休息. pt是患者的缩写,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 文件中,您可以向其中添加自定义缩写.我认为这样做的地方是 PTBLexer.flex在 ABBREV1 定义下.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆