Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

您好,能麻烦提供一下你们做的中文字库吗,你们论文中说数据集包括3850个不同的中文字 #5

Closed
Banyueqin opened this issue Mar 21, 2018 · 6 comments

Comments

@Banyueqin
Copy link

No description provided.

@yuantailing
Copy link
Owner

请看一下标注格式,自行从标注中提取。

@yuantailing
Copy link
Owner

示例代码:

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)

@Banyueqin
Copy link
Author

谢谢

@pycoco
Copy link

pycoco commented Oct 24, 2019

why i just get 3768 characters?

@yuantailing
Copy link
Owner

why i just get 3768 characters?

Some character categories appear only in the test set.

@pycoco
Copy link

pycoco commented Oct 25, 2019

thank u, i use above code to generate dict,but i also get key error when training.i don't know why

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants