CoreNLP icon indicating copy to clipboard operation
CoreNLP copied to clipboard

How to get print Entity Mentions in REGEXNER entity tag?

Open nixondevph opened this issue 6 years ago • 1 comments

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

nixondevph avatar Oct 18 '19 16:10 nixondevph

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.

mcavdar avatar Jan 31 '20 18:01 mcavdar