【错误信息】
out1 = self.ltp.pipeline(sents, tasks = ['cws', 'pos'])
File "/home/.venv/a100/lib/python3.8/site-packages/ltp/nerual.py", line 24, in wrapper
return func(*args, **kwargs)
File "/home/.venv/a100/lib/python3.8/site-packages/ltp/nerual.py", line 122, in pipeline
tokenized = self.tokenizer.batch_encode_plus(
File "/home/.venv/a100/lib/python3.8/site-packages/transformers/tokenization_utils_base.py", line 2854, in batch_encode_plus
return self._batch_encode_plus(
File "/home/.venv/a100/lib/python3.8/site-packages/transformers/tokenization_utils_fast.py", line 458, in _batch_encode_plus
for key in tokens_and_encodings[0][0].keys():
IndexError: list index out of range
【文本】绿色和平年年都在上述高峰会的开会地点游说,以争取太平洋地区的进一步支持,来因应温室效应问题,并为其他环保计划争取更大的协助。
【错误信息】 out1 = self.ltp.pipeline(sents, tasks = ['cws', 'pos']) File "/home/.venv/a100/lib/python3.8/site-packages/ltp/nerual.py", line 24, in wrapper return func(*args, **kwargs) File "/home/.venv/a100/lib/python3.8/site-packages/ltp/nerual.py", line 122, in pipeline tokenized = self.tokenizer.batch_encode_plus( File "/home/.venv/a100/lib/python3.8/site-packages/transformers/tokenization_utils_base.py", line 2854, in batch_encode_plus return self._batch_encode_plus( File "/home/.venv/a100/lib/python3.8/site-packages/transformers/tokenization_utils_fast.py", line 458, in _batch_encode_plus for key in tokens_and_encodings[0][0].keys(): IndexError: list index out of range