mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-06 06:30:35 +03:00
small fixes
This commit is contained in:
parent
0c6f1f3891
commit
01f9ae774c
|
@ -1,5 +1,7 @@
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
from spacy.pipeline.defaults import default_ner
|
from spacy.pipeline.defaults import default_ner
|
||||||
from spacy.pipeline import EntityRecognizer
|
from spacy.pipeline import EntityRecognizer
|
||||||
|
|
||||||
|
@ -7,6 +9,8 @@ from spacy.lang.en import English
|
||||||
from spacy.tokens import Span
|
from spacy.tokens import Span
|
||||||
|
|
||||||
|
|
||||||
|
# skipped after removing Beam stuff during the Example/GoldParse refactor
|
||||||
|
@pytest.mark.skip
|
||||||
def test_issue4313():
|
def test_issue4313():
|
||||||
""" This should not crash or exit with some strange error code """
|
""" This should not crash or exit with some strange error code """
|
||||||
beam_width = 16
|
beam_width = 16
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
from spacy.gold import Example
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"text,words", [("A'B C", ["A", "'", "B", "C"]), ("A-B", ["A-B"])]
|
"text,words", [("A'B C", ["A", "'", "B", "C"]), ("A-B", ["A-B"])]
|
||||||
)
|
)
|
||||||
def test_gold_misaligned(en_tokenizer, text, words):
|
def test_gold_misaligned(en_tokenizer, text, words):
|
||||||
doc = en_tokenizer(text)
|
doc = en_tokenizer(text)
|
||||||
GoldParse(doc, words=words)
|
Example.from_dict(doc, {"words": words})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user