mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
Auto-format code with black (#10857)
Co-authored-by: explosion-bot <explosion-bot@users.noreply.github.com>
This commit is contained in:
parent
f6a4b80c0b
commit
6172af8158
|
@ -1076,12 +1076,23 @@ def test_no_gold_ents(patterns):
|
|||
# this will run the pipeline on the examples and shouldn't crash
|
||||
results = nlp.evaluate(train_examples)
|
||||
|
||||
|
||||
@pytest.mark.issue(9575)
|
||||
def test_tokenization_mismatch():
|
||||
nlp = English()
|
||||
# include a matching entity so that update isn't skipped
|
||||
doc1 = Doc(nlp.vocab, words=["Kirby", "123456"], spaces=[True, False], ents=["B-CHARACTER", "B-CARDINAL"])
|
||||
doc2 = Doc(nlp.vocab, words=["Kirby", "123", "456"], spaces=[True, False, False], ents=["B-CHARACTER", "B-CARDINAL", "B-CARDINAL"])
|
||||
doc1 = Doc(
|
||||
nlp.vocab,
|
||||
words=["Kirby", "123456"],
|
||||
spaces=[True, False],
|
||||
ents=["B-CHARACTER", "B-CARDINAL"],
|
||||
)
|
||||
doc2 = Doc(
|
||||
nlp.vocab,
|
||||
words=["Kirby", "123", "456"],
|
||||
spaces=[True, False, False],
|
||||
ents=["B-CHARACTER", "B-CARDINAL", "B-CARDINAL"],
|
||||
)
|
||||
|
||||
eg = Example(doc1, doc2)
|
||||
train_examples = [eg]
|
||||
|
|
Loading…
Reference in New Issue
Block a user