spaCy/spacy/tests/parser/test_beam_parse.py

12 lines
236 B
Python
Raw Normal View History

2017-10-07 00:15:15 +00:00
# coding: utf8
from __future__ import unicode_literals
2017-07-21 23:48:35 +00:00
import pytest
2017-10-07 00:15:15 +00:00
@pytest.mark.models('en')
def test_beam_parse(EN):
doc = EN(u'Australia is a country', disable=['ner'])
ents = EN.entity(doc, beam_width=2)
print(ents)