diff --git a/README.md b/README.md index cc516ac40a68ef906a661ff0246a65d3ef2d0bd9..c7055dc58bb4df08a32fe985fdc2d5fdb91ae829 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,13 @@ Not all of the requirements are available on `conda`, so `pip` is also required. conda install pip ``` -## Install requirements +## Automatic installation + +```bash +pip install combo-nlp +``` + +## Source installation Install the requirements using the `setup.py` file. @@ -34,11 +40,12 @@ Pretrained model usage: ```python from combo.predict import COMBO -c = COMBO.from_pretrained("model") -prediction = c("To jest przykładowe zdanie.") +c = COMBO.from_pretrained('polish-herbert-base-ud213') +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')) -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)) ```