Closed Banyueqin closed 6 years ago
示例代码:
import json
from pythonapi import anno_tools
if __name__ == '__main__':
s = set()
with open('../data/annotations/train.jsonl') as f:
for line in f:
anno = json.loads(line)
for char in anno_tools.each_char(anno):
s.add(char['text'])
with open('../data/annotations/val.jsonl') as f:
for line in f:
anno = json.loads(line)
for char in anno_tools.each_char(anno):
s.add(char['text'])
print(s)
谢谢
why i just get 3768 characters?
why i just get 3768 characters?
Some character categories appear only in the test set.
thank u, i use above code to generate dict,but i also get key error when training.i don't know why
请看一下标注格式,自行从标注中提取。