Skip to content

The named_entities option does not appear to work in to_terms_list #179

@eliotabrams

Description

@eliotabrams

Running:
doc = textacy.doc.Doc("In 1839, the North Ronaldsay sheep court was created to maintain the area's flock of sheep, though the European Union legislation recently suggested that it may have to be reorganized into a Grazing Committee.", lang=u'en' )
print(list(doc.to_terms_list(ngrams=2, named_entities=False, as_strings=True)))
print(list(doc.to_terms_list(ngrams=2, named_entities=True, as_strings=True)))
print(list(textacy.extract.named_entities(doc)))

I get:
[u'in 1839', u'north ronaldsay', u'ronaldsay sheep', u'sheep court', u"area 's", u"'s flock", u'european union', u'union legislation', u'legislation recently', u'recently suggest', u'grazing committee']
[u'1839', u'north ronaldsay', u'european union', u'grazing committee', u'in 1839', u'ronaldsay sheep', u'sheep court', u"area 's", u"'s flock", u'union legislation', u'legislation recently', u'recently suggest']
[1839, North Ronaldsay, European Union, Grazing Committee]

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