Update spacy/tests/pipeline/test_span_finder.py

Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>
This commit is contained in:
kadarakos 2023-06-02 11:13:25 +02:00 committed by GitHub
parent 752b3066cf
commit a33c7e0144
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -254,6 +254,7 @@ def test_overfitting_IO():
assert f"span_finder_{span_finder.spans_key}_f" in scores
# XXX Its not perfect 1.0 F1 because we want it to overgenerate for now.
assert scores[f"span_finder_{span_finder.spans_key}_f"] == 0.4
assert scores[f"span_finder_{span_finder.spans_key}_r"] == 1.0
# also test that the spancat works for just a single entity in a sentence
doc = nlp("London")