Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
eliotabrams opened this issue Mar 23, 2018 · 0 comments
Open

Comments

@eliotabrams
Copy link

eliotabrams commented Mar 23, 2018

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]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant