yzhangcs / parser

:rocket: State-of-the-art parsers for natural language.
https://parser.yzhang.site/
MIT License
837 stars 143 forks source link

How to using checkpoint to predict #125

Closed Dive-to-OCR closed 1 year ago

Dive-to-OCR commented 1 year ago

I try training model by command like

!python -u -m supar.cmds.dep.biaffine train -b -d 0 -c dep-biaffine-en -p model -f bert  \
    --train Data/content/VnDep/Train/[VnDep]Train_Mau.conllu  \
    --dev Data/content/VnDep/Dev/[VnDep]Dev_25283.conllu  \
    --test Data/content/VnDep/Test/[VnDep]Test_25272.conllu  \
    --bert bert-base-multilingual-cased 

and i get 3 files:

model
model.train.log
model.ymal

But i don't know load this model to predict. Can you help me?

yzhangcs commented 1 year ago

@Dive-to-OCR Hi, you can make predictions by python -u -m supar.cmds.dep.biaffine predict -p model or from cmd line Parser.load('model').predict(...). Please check README and examples for details.