diff --git a/README.md b/README.md index 4ca38ce0e5701c105cc45e739b361195af5a93d6..aaf04f1bdc25e1ad3c138909a21b18ac62488cf8 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,28 @@ pip install -e . import combo ``` +Pretrained model usage: + +```python +from combo.predict import COMBO +c = COMBO.from_pretrained("model") +prediction = c("To jest przykładowe zdanie.") + +print("{:15} {:15} {:10} {:10} {:10}".format('TOKEN', 'LEMMA', 'UPOS', 'HEAD', 'DEPREL')) +for token in prediction.tokens: + print("{:15} {:15} {:10} {:10} {:10}".format(token.text, token.lemma, token.upostag, token.head, token.deprel)) +``` + +Example output: +``` +TOKEN LEMMA UPOS HEAD DEPREL +To to AUX 4 cop +jest być AUX 4 cop +przykładowe przykładowy ADJ 4 amod +zdanie zdanie NOUN 0 root +. . PUNCT 4 punct +``` + ## Use COMBO CLI The minimal training example (make sure to download some conllu training and validation files)