mirror of https://github.com/explosion/spaCy.git
Auto-format code with black (#11022)
Co-authored-by: explosion-bot <explosion-bot@users.noreply.github.com>
This commit is contained in:
parent
738b38064f
commit
4155a59d47
|
@ -158,13 +158,18 @@ def test_issue3209():
|
|||
|
||||
|
||||
def test_labels_from_BILUO():
|
||||
"""Test that labels are inferred correctly when there's a - in label.
|
||||
"""
|
||||
"""Test that labels are inferred correctly when there's a - in label."""
|
||||
nlp = English()
|
||||
ner = nlp.add_pipe("ner")
|
||||
ner.add_label("LARGE-ANIMAL")
|
||||
nlp.initialize()
|
||||
move_names = ["O", "B-LARGE-ANIMAL", "I-LARGE-ANIMAL", "L-LARGE-ANIMAL", "U-LARGE-ANIMAL"]
|
||||
move_names = [
|
||||
"O",
|
||||
"B-LARGE-ANIMAL",
|
||||
"I-LARGE-ANIMAL",
|
||||
"L-LARGE-ANIMAL",
|
||||
"U-LARGE-ANIMAL",
|
||||
]
|
||||
labels = {"LARGE-ANIMAL"}
|
||||
assert ner.move_names == move_names
|
||||
assert set(ner.labels) == labels
|
||||
|
|
Loading…
Reference in New Issue