-
Notifications
You must be signed in to change notification settings - Fork 248
Description
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]