Skip to content
Snippets Groups Projects
Commit d267f112 authored by Alina Wróblewska's avatar Alina Wróblewska
Browse files

Readme updated

parent 89bd7bea
Branches
Tags
No related merge requests found
Pipeline #16389 failed with stage
in 31 seconds
...@@ -16,7 +16,13 @@ Not all of the requirements are available on `conda`, so `pip` is also required. ...@@ -16,7 +16,13 @@ Not all of the requirements are available on `conda`, so `pip` is also required.
conda install pip conda install pip
``` ```
## Install requirements ## Automatic installation
```bash
pip install combo-nlp
```
## Source installation
Install the requirements using the `setup.py` file. Install the requirements using the `setup.py` file.
...@@ -34,11 +40,12 @@ Pretrained model usage: ...@@ -34,11 +40,12 @@ Pretrained model usage:
```python ```python
from combo.predict import COMBO from combo.predict import COMBO
c = COMBO.from_pretrained("model") c = COMBO.from_pretrained('polish-herbert-base-ud213')
prediction = c("To jest przykładowe zdanie.") prediction = c("To jest przykładowe zdanie. To jest drugie zdanie.")
# Display the first sentence predictions
print("{:15} {:15} {:10} {:10} {:10}".format('TOKEN', 'LEMMA', 'UPOS', 'HEAD', 'DEPREL')) print("{:15} {:15} {:10} {:10} {:10}".format('TOKEN', 'LEMMA', 'UPOS', 'HEAD', 'DEPREL'))
for token in prediction.tokens: for token in prediction[0].tokens:
print("{:15} {:15} {:10} {:10} {:10}".format(token.text, token.lemma, token.upostag, token.head, token.deprel)) print("{:15} {:15} {:10} {:10} {:10}".format(token.text, token.lemma, token.upostag, token.head, token.deprel))
``` ```
......
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