问题
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