Fix test_dbmdz_english by updating expected values (#18482)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
@@ -284,9 +284,9 @@ class TokenClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest
|
|||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
nested_simplify(output),
|
nested_simplify(output),
|
||||||
[
|
[
|
||||||
{"entity": "I-PER", "score": 0.997, "word": "En", "start": 0, "end": 2, "index": 1},
|
{"entity": "I-PER", "score": 0.998, "word": "En", "start": 0, "end": 2, "index": 1},
|
||||||
{"entity": "I-PER", "score": 0.996, "word": "##zo", "start": 2, "end": 4, "index": 2},
|
{"entity": "I-PER", "score": 0.997, "word": "##zo", "start": 2, "end": 4, "index": 2},
|
||||||
{"entity": "I-ORG", "score": 0.999, "word": "UN", "start": 22, "end": 24, "index": 7},
|
{"entity": "I-ORG", "score": 0.999, "word": "UN", "start": 18, "end": 20, "index": 6},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -295,8 +295,8 @@ class TokenClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest
|
|||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
nested_simplify(output),
|
nested_simplify(output),
|
||||||
[
|
[
|
||||||
{"entity_group": "PER", "score": 0.996, "word": "Enzo", "start": 0, "end": 4},
|
{"entity_group": "PER", "score": 0.997, "word": "Enzo", "start": 0, "end": 4},
|
||||||
{"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 22, "end": 24},
|
{"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 18, "end": 20},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -305,8 +305,8 @@ class TokenClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest
|
|||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
nested_simplify(output[:3]),
|
nested_simplify(output[:3]),
|
||||||
[
|
[
|
||||||
{"entity_group": "PER", "score": 0.997, "word": "Enzo", "start": 0, "end": 4},
|
{"entity_group": "PER", "score": 0.998, "word": "Enzo", "start": 0, "end": 4},
|
||||||
{"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 22, "end": 24},
|
{"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 18, "end": 20},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -315,8 +315,8 @@ class TokenClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest
|
|||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
nested_simplify(output[:3]),
|
nested_simplify(output[:3]),
|
||||||
[
|
[
|
||||||
{"entity_group": "PER", "score": 0.997, "word": "Enzo", "start": 0, "end": 4},
|
{"entity_group": "PER", "score": 0.998, "word": "Enzo", "start": 0, "end": 4},
|
||||||
{"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 22, "end": 24},
|
{"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 18, "end": 20},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -325,8 +325,8 @@ class TokenClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest
|
|||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
nested_simplify(output),
|
nested_simplify(output),
|
||||||
[
|
[
|
||||||
{"entity_group": "PER", "score": 0.996, "word": "Enzo", "start": 0, "end": 4},
|
{"entity_group": "PER", "score": 0.997, "word": "Enzo", "start": 0, "end": 4},
|
||||||
{"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 22, "end": 24},
|
{"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 18, "end": 20},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user