mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-04 20:30:24 +03:00
Format
This commit is contained in:
parent
bb62ee9450
commit
024679c17f
|
@ -411,9 +411,7 @@ def test_preset_spans_suggester():
|
||||||
docs = [nlp("This is an example."), nlp("This is the second example.")]
|
docs = [nlp("This is an example."), nlp("This is the second example.")]
|
||||||
docs[0].spans[SPAN_KEY] = [docs[0][3:4]]
|
docs[0].spans[SPAN_KEY] = [docs[0][3:4]]
|
||||||
docs[1].spans[SPAN_KEY] = [docs[1][0:4], docs[1][3:5]]
|
docs[1].spans[SPAN_KEY] = [docs[1][0:4], docs[1][3:5]]
|
||||||
suggester = registry.misc.get("spacy.preset_spans_suggester.v1")(
|
suggester = registry.misc.get("spacy.preset_spans_suggester.v1")(spans_key=SPAN_KEY)
|
||||||
spans_key=SPAN_KEY
|
|
||||||
)
|
|
||||||
candidates = suggester(docs)
|
candidates = suggester(docs)
|
||||||
assert type(candidates) == Ragged
|
assert type(candidates) == Ragged
|
||||||
assert len(candidates) == 2
|
assert len(candidates) == 2
|
||||||
|
|
Loading…
Reference in New Issue
Block a user