mirror of
https://github.com/saymrwulf/transformers.git
synced 2026-05-14 20:58:08 +00:00
Fix test_dbmdz_english by updating expected values (#18482)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
parent
5cd4032368
commit
280db2e39c
1 changed files with 11 additions and 11 deletions
|
|
@ -284,9 +284,9 @@ class TokenClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest
|
|||
self.assertEqual(
|
||||
nested_simplify(output),
|
||||
[
|
||||
{"entity": "I-PER", "score": 0.997, "word": "En", "start": 0, "end": 2, "index": 1},
|
||||
{"entity": "I-PER", "score": 0.996, "word": "##zo", "start": 2, "end": 4, "index": 2},
|
||||
{"entity": "I-ORG", "score": 0.999, "word": "UN", "start": 22, "end": 24, "index": 7},
|
||||
{"entity": "I-PER", "score": 0.998, "word": "En", "start": 0, "end": 2, "index": 1},
|
||||
{"entity": "I-PER", "score": 0.997, "word": "##zo", "start": 2, "end": 4, "index": 2},
|
||||
{"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(
|
||||
nested_simplify(output),
|
||||
[
|
||||
{"entity_group": "PER", "score": 0.996, "word": "Enzo", "start": 0, "end": 4},
|
||||
{"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 22, "end": 24},
|
||||
{"entity_group": "PER", "score": 0.997, "word": "Enzo", "start": 0, "end": 4},
|
||||
{"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 18, "end": 20},
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -305,8 +305,8 @@ class TokenClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest
|
|||
self.assertEqual(
|
||||
nested_simplify(output[:3]),
|
||||
[
|
||||
{"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": "PER", "score": 0.998, "word": "Enzo", "start": 0, "end": 4},
|
||||
{"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 18, "end": 20},
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -315,8 +315,8 @@ class TokenClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest
|
|||
self.assertEqual(
|
||||
nested_simplify(output[:3]),
|
||||
[
|
||||
{"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": "PER", "score": 0.998, "word": "Enzo", "start": 0, "end": 4},
|
||||
{"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 18, "end": 20},
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -325,8 +325,8 @@ class TokenClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest
|
|||
self.assertEqual(
|
||||
nested_simplify(output),
|
||||
[
|
||||
{"entity_group": "PER", "score": 0.996, "word": "Enzo", "start": 0, "end": 4},
|
||||
{"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 22, "end": 24},
|
||||
{"entity_group": "PER", "score": 0.997, "word": "Enzo", "start": 0, "end": 4},
|
||||
{"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 18, "end": 20},
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue