MCPcopy Create free account
hub / github.com/huggingface/evaluate / DummyTokenClassificationPipeline

Class DummyTokenClassificationPipeline

tests/test_evaluator.py:107–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105
106
107class DummyTokenClassificationPipeline:
108 def __init__(self):
109 self.task = "token-classification"
110
111 def __call__(self, inputs, **kwargs):
112 result = [
113 {"start": 0, "entity": "B-LOC"},
114 {"start": 2, "entity": "I-LOC"},
115 {"start": 4, "entity": "I-LOC"},
116 {"start": 9, "entity": "O"},
117 {"start": 11, "entity": "O"},
118 {"start": 16, "entity": "B-LOC"},
119 {"start": 21, "entity": "O"},
120 ]
121
122 return [result]
123
124
125class DummyAutomaticSpeechRecognitionPipeline:

Callers 1

setUpMethod · 0.85

Calls

no outgoing calls

Tested by 1

setUpMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…