├── README.md ├── datasets └── ner_data.zip ├── image ├── f1.jpg ├── msra-f1.jpg ├── ontonote-f1.jpg ├── paper-f1.jpg ├── resume-f1.jpg └── weibo-f1.jpg ├── losses ├── __init__.py ├── focal_loss.py └── label_smoothing.py ├── metrics └── ner_metrics.py ├── models ├── __init__.py ├── crf.py ├── lebert.py └── ner_model.py ├── output ├── msra │ ├── bert-crf │ │ └── events.out.tfevents.1647178432.db053089-5f26-4c29-8038-d089f0d7c43b.67941.0 │ ├── bert-softmax │ │ └── events.out.tfevents.1647164337.db053089-5f26-4c29-8038-d089f0d7c43b.45390.0 │ ├── lebert-crf │ │ └── events.out.tfevents.1647178461.db053089-5f26-4c29-8038-d089f0d7c43b.68106.0 │ └── lebert-softmax │ │ └── events.out.tfevents.1647164386.db053089-5f26-4c29-8038-d089f0d7c43b.45570.0 ├── ontonote │ ├── bert-crf │ │ └── events.out.tfevents.1647178512.db053089-5f26-4c29-8038-d089f0d7c43b.68483.0 │ ├── bert-softmax │ │ └── events.out.tfevents.1647163953.db053089-5f26-4c29-8038-d089f0d7c43b.44386.0 │ ├── lebert-crf │ │ └── events.out.tfevents.1647178542.db053089-5f26-4c29-8038-d089f0d7c43b.68648.0 │ └── lebert-softmax │ │ └── events.out.tfevents.1647164014.db053089-5f26-4c29-8038-d089f0d7c43b.44786.0 ├── resume │ ├── bert-crf │ │ └── events.out.tfevents.1647165953.db053089-5f26-4c29-8038-d089f0d7c43b.47878.0 │ ├── bert-softmax │ │ └── events.out.tfevents.1647163814.db053089-5f26-4c29-8038-d089f0d7c43b.43969.0 │ ├── lebert-crf │ │ └── events.out.tfevents.1647166015.db053089-5f26-4c29-8038-d089f0d7c43b.48076.0 │ └── lebert-softmax │ │ └── events.out.tfevents.1647163848.db053089-5f26-4c29-8038-d089f0d7c43b.44185.0 └── weibo │ ├── bert-crf │ └── events.out.tfevents.1647166282.db053089-5f26-4c29-8038-d089f0d7c43b.48569.0 │ ├── bert-softmax │ └── events.out.tfevents.1647163693.db053089-5f26-4c29-8038-d089f0d7c43b.43371.0 │ ├── lebert-crf │ └── events.out.tfevents.1647166316.db053089-5f26-4c29-8038-d089f0d7c43b.48724.0 │ └── lebert-softmax │ └── events.out.tfevents.1647163722.db053089-5f26-4c29-8038-d089f0d7c43b.43536.0 ├── processors ├── convert_format.py ├── dataset.py ├── processor.py ├── trie_tree.py └── vocab.py ├── requirements.txt ├── script └── train.sh ├── train.py └── utils ├── get_entity.py └── utils.py /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/README.md -------------------------------------------------------------------------------- /datasets/ner_data.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/datasets/ner_data.zip -------------------------------------------------------------------------------- /image/f1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/image/f1.jpg -------------------------------------------------------------------------------- /image/msra-f1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/image/msra-f1.jpg -------------------------------------------------------------------------------- /image/ontonote-f1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/image/ontonote-f1.jpg -------------------------------------------------------------------------------- /image/paper-f1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/image/paper-f1.jpg -------------------------------------------------------------------------------- /image/resume-f1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/image/resume-f1.jpg -------------------------------------------------------------------------------- /image/weibo-f1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/image/weibo-f1.jpg -------------------------------------------------------------------------------- /losses/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /losses/focal_loss.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/losses/focal_loss.py -------------------------------------------------------------------------------- /losses/label_smoothing.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/losses/label_smoothing.py -------------------------------------------------------------------------------- /metrics/ner_metrics.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/metrics/ner_metrics.py -------------------------------------------------------------------------------- /models/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /models/crf.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/models/crf.py -------------------------------------------------------------------------------- /models/lebert.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/models/lebert.py -------------------------------------------------------------------------------- /models/ner_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/models/ner_model.py -------------------------------------------------------------------------------- /output/msra/bert-crf/events.out.tfevents.1647178432.db053089-5f26-4c29-8038-d089f0d7c43b.67941.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/output/msra/bert-crf/events.out.tfevents.1647178432.db053089-5f26-4c29-8038-d089f0d7c43b.67941.0 -------------------------------------------------------------------------------- /output/msra/bert-softmax/events.out.tfevents.1647164337.db053089-5f26-4c29-8038-d089f0d7c43b.45390.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/output/msra/bert-softmax/events.out.tfevents.1647164337.db053089-5f26-4c29-8038-d089f0d7c43b.45390.0 -------------------------------------------------------------------------------- /output/msra/lebert-crf/events.out.tfevents.1647178461.db053089-5f26-4c29-8038-d089f0d7c43b.68106.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/output/msra/lebert-crf/events.out.tfevents.1647178461.db053089-5f26-4c29-8038-d089f0d7c43b.68106.0 -------------------------------------------------------------------------------- /output/msra/lebert-softmax/events.out.tfevents.1647164386.db053089-5f26-4c29-8038-d089f0d7c43b.45570.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/output/msra/lebert-softmax/events.out.tfevents.1647164386.db053089-5f26-4c29-8038-d089f0d7c43b.45570.0 -------------------------------------------------------------------------------- /output/ontonote/bert-crf/events.out.tfevents.1647178512.db053089-5f26-4c29-8038-d089f0d7c43b.68483.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/output/ontonote/bert-crf/events.out.tfevents.1647178512.db053089-5f26-4c29-8038-d089f0d7c43b.68483.0 -------------------------------------------------------------------------------- /output/ontonote/bert-softmax/events.out.tfevents.1647163953.db053089-5f26-4c29-8038-d089f0d7c43b.44386.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/output/ontonote/bert-softmax/events.out.tfevents.1647163953.db053089-5f26-4c29-8038-d089f0d7c43b.44386.0 -------------------------------------------------------------------------------- /output/ontonote/lebert-crf/events.out.tfevents.1647178542.db053089-5f26-4c29-8038-d089f0d7c43b.68648.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/output/ontonote/lebert-crf/events.out.tfevents.1647178542.db053089-5f26-4c29-8038-d089f0d7c43b.68648.0 -------------------------------------------------------------------------------- /output/ontonote/lebert-softmax/events.out.tfevents.1647164014.db053089-5f26-4c29-8038-d089f0d7c43b.44786.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/output/ontonote/lebert-softmax/events.out.tfevents.1647164014.db053089-5f26-4c29-8038-d089f0d7c43b.44786.0 -------------------------------------------------------------------------------- /output/resume/bert-crf/events.out.tfevents.1647165953.db053089-5f26-4c29-8038-d089f0d7c43b.47878.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/output/resume/bert-crf/events.out.tfevents.1647165953.db053089-5f26-4c29-8038-d089f0d7c43b.47878.0 -------------------------------------------------------------------------------- /output/resume/bert-softmax/events.out.tfevents.1647163814.db053089-5f26-4c29-8038-d089f0d7c43b.43969.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/output/resume/bert-softmax/events.out.tfevents.1647163814.db053089-5f26-4c29-8038-d089f0d7c43b.43969.0 -------------------------------------------------------------------------------- /output/resume/lebert-crf/events.out.tfevents.1647166015.db053089-5f26-4c29-8038-d089f0d7c43b.48076.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/output/resume/lebert-crf/events.out.tfevents.1647166015.db053089-5f26-4c29-8038-d089f0d7c43b.48076.0 -------------------------------------------------------------------------------- /output/resume/lebert-softmax/events.out.tfevents.1647163848.db053089-5f26-4c29-8038-d089f0d7c43b.44185.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/output/resume/lebert-softmax/events.out.tfevents.1647163848.db053089-5f26-4c29-8038-d089f0d7c43b.44185.0 -------------------------------------------------------------------------------- /output/weibo/bert-crf/events.out.tfevents.1647166282.db053089-5f26-4c29-8038-d089f0d7c43b.48569.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/output/weibo/bert-crf/events.out.tfevents.1647166282.db053089-5f26-4c29-8038-d089f0d7c43b.48569.0 -------------------------------------------------------------------------------- /output/weibo/bert-softmax/events.out.tfevents.1647163693.db053089-5f26-4c29-8038-d089f0d7c43b.43371.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/output/weibo/bert-softmax/events.out.tfevents.1647163693.db053089-5f26-4c29-8038-d089f0d7c43b.43371.0 -------------------------------------------------------------------------------- /output/weibo/lebert-crf/events.out.tfevents.1647166316.db053089-5f26-4c29-8038-d089f0d7c43b.48724.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/output/weibo/lebert-crf/events.out.tfevents.1647166316.db053089-5f26-4c29-8038-d089f0d7c43b.48724.0 -------------------------------------------------------------------------------- /output/weibo/lebert-softmax/events.out.tfevents.1647163722.db053089-5f26-4c29-8038-d089f0d7c43b.43536.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/output/weibo/lebert-softmax/events.out.tfevents.1647163722.db053089-5f26-4c29-8038-d089f0d7c43b.43536.0 -------------------------------------------------------------------------------- /processors/convert_format.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/processors/convert_format.py -------------------------------------------------------------------------------- /processors/dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/processors/dataset.py -------------------------------------------------------------------------------- /processors/processor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/processors/processor.py -------------------------------------------------------------------------------- /processors/trie_tree.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/processors/trie_tree.py -------------------------------------------------------------------------------- /processors/vocab.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/processors/vocab.py -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | torch==1.10 2 | transformers==3.1 3 | numpy 4 | loguru 5 | tensorboard -------------------------------------------------------------------------------- /script/train.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/script/train.sh -------------------------------------------------------------------------------- /train.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/train.py -------------------------------------------------------------------------------- /utils/get_entity.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/utils/get_entity.py -------------------------------------------------------------------------------- /utils/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjianxin1/LEBERT-NER-Chinese/HEAD/utils/utils.py --------------------------------------------------------------------------------