From d67d7d5a86992da313e167ccbb68dfe31bc21923 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 8 Nov 2015 16:19:33 +0100 Subject: [PATCH] * Add test for NER inconsistency bug --- spacy/tests/parser/test_ner.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spacy/tests/parser/test_ner.py b/spacy/tests/parser/test_ner.py index 721d9b544..935aab4cf 100644 --- a/spacy/tests/parser/test_ner.py +++ b/spacy/tests/parser/test_ner.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals, print_function import pytest @pytest.mark.models @@ -16,3 +17,7 @@ def test_simple_types(EN): def test_consistency_bug(EN): '''Test an arbitrary sequence-consistency bug encountered during speed test''' tokens = EN(u'Where rap essentially went mainstream, illustrated by seminal Public Enemy, Beastie Boys and L.L. Cool J. tracks.') + + tokens = EN(u'''Charity and other short-term aid have buoyed them so far, and a tax-relief bill working its way through Congress would help. But the September 11 Victim Compensation Fund, enacted by Congress to discourage people from filing lawsuits, will determine the shape of their lives for years to come.\n\n''', entity=False) + ents = EN.matcher(tokens) + EN.entity(tokens)