| 105 | |
| 106 | |
| 107 | class 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 | |
| 125 | class DummyAutomaticSpeechRecognitionPipeline: |