CoreNLP
CoreNLP copied to clipboard
How to get print Entity Mentions in REGEXNER entity tag?
for (CoreMap entityMention : sentence.get(CoreAnnotations.MentionsAnnotation.class)) {
System.out.print(entityMention.get(CoreAnnotations.NamedEntityTagAnnotation.class));
}
Only prints NAME, ORG, LOC My regexner have other entity tag
I think you should use a class other than NamedEntityTagAnnotation for regex. Try TokensRegexNERAnnotator. https://stanfordnlp.github.io/CoreNLP/regexner.html and https://nlp.stanford.edu/software/tokensregex.html will help you.