Skip to content

EntityMentions returns null instead of empty list #1322

Closed
@cholojuanito

Description

@cholojuanito

I ran into an issue where if an empty string is passed in then getting the entityMentions returns null instead of an empty list like I figure out be standard practice.

Example code:

StanfordCoreNLP processor = new StanfordCoreNLP(props);
CoreDocument nlpDocument = new CoreDocument("");

nlpProcessor.annotate(nlpDocument);
List<CoreEntityMention>  entities = nlpDocument.entityMentions(); <== returns null

Just wanted to know if there is any light that can be shed on this. If this is expected behavior then I will try my best to document it in the documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions