Skip to content
Snippets Groups Projects
Commit c3b184d3 authored by Maja Jablonska's avatar Maja Jablonska
Browse files

Add a from_pretrained example to README.md

parent ad2a1908
1 merge request!46Merge COMBO 3.0 into master
......@@ -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)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment