【AllenNLP學習筆記】4.基於CRF+Viterbi的POS-tagging+NER(json版本+模型實現)

本項目代碼:https://github.com/JackKuo666/AllenNLP_notes/tree/master/4.twitter-pos-tagging-master


任務:
1.twitter-pos-tagging
2.twitter-NER
模型:
CRF+Viterbi

模型實現:https://github.com/JackKuo666/AllenNLP_notes/blob/master/4.twitter-pos-tagging-master/neural_crf.py

模型訓練:

allennlp train ./config/neural_crf_pos.json -s ./model/neural_crf --include-package neural_crf

allennlp evaluate <MODEL_DIR>/model.tar.gz [JSON test data file path] --include-package neural_crf

本項目學習重點
學會自己實現模型,然後在train或者evaluation的時候調用自己實現的模型:

 --include-package neural_crf
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章