## Model Description
Fine-tuning of [XLM-RoBERTa-Uk](https://huggingface.co/ukr-models/xlm-roberta-base-uk) model on [synthetic morphological dataset](https://huggingface.co/datasets/ukr-models/Ukr-Synth), returns both UPOS and morphological features (joined by double underscore symbol)

## How to Use

Huggingface pipeline way (returns tokens with labels):
```py
from transformers import TokenClassificationPipeline, AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained('ukr-models/uk-morph')
model = AutoModelForTokenClassification.from_pretrained('ukr-models/uk-morph')
ppln = TokenClassificationPipeline(model=model, tokenizer=tokenizer)
ppln("Могила Тараса Шевченка — місце поховання видатного українського поета Тараса Шевченка в місті Канів (Черкаська область) на Чернечій горі, над яким із 1939 року височіє бронзовий пам'ятник роботи скульптора Матвія Манізера.")
```

If you wish to get predictions split by words, not by tokens, you may use the following approach (download script get_predictions.py from the repository, it uses [package tokenize_uk](https://pypi.org/project/tokenize_uk/) for splitting)
```py
from transformers import AutoTokenizer, AutoModelForTokenClassification
from get_predictions import get_word_predictions

tokenizer = AutoTokenizer.from_pretrained('ukr-models/uk-morph')
model = AutoModelForTokenClassification.from_pretrained('ukr-models/uk-morph')

get_word_predictions(model, tokenizer, ["Могила Тараса Шевченка — місце поховання видатного українського поета Тараса Шевченка в місті Канів (Черкаська область) на Чернечій горі, над яким із 1939 року височіє бронзовий пам'ятник роботи скульптора Матвія Манізера."])
```

{"language": ["uk"], "license": "mit", "tags": ["ukrainian"], "widget": [{"text": "\u041c\u043e\u0433\u0438\u043b\u0430 \u0422\u0430\u0440\u0430\u0441\u0430 \u0428\u0435\u0432\u0447\u0435\u043d\u043a\u0430 \u2014 \u043c\u0456\u0441\u0446\u0435 \u043f\u043e\u0445\u043e\u0432\u0430\u043d\u043d\u044f \u0432\u0438\u0434\u0430\u0442\u043d\u043e\u0433\u043e \u0443\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u043e\u0433\u043e \u043f\u043e\u0435\u0442\u0430 \u0422\u0430\u0440\u0430\u0441\u0430 \u0428\u0435\u0432\u0447\u0435\u043d\u043a\u0430 \u0432 \u043c\u0456\u0441\u0442\u0456 \u041a\u0430\u043d\u0456\u0432 (\u0427\u0435\u0440\u043a\u0430\u0441\u044c\u043a\u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u044c) \u043d\u0430 \u0427\u0435\u0440\u043d\u0435\u0447\u0456\u0439 \u0433\u043e\u0440\u0456, \u043d\u0430\u0434 \u044f\u043a\u0438\u043c \u0456\u0437 1939 \u0440\u043e\u043a\u0443 \u0432\u0438\u0441\u043e\u0447\u0456\u0454 \u0431\u0440\u043e\u043d\u0437\u043e\u0432\u0438\u0439 \u043f\u0430\u043c'\u044f\u0442\u043d\u0438\u043a \u0440\u043e\u0431\u043e\u0442\u0438 \u0441\u043a\u0443\u043b\u044c\u043f\u0442\u043e\u0440\u0430 \u041c\u0430\u0442\u0432\u0456\u044f \u041c\u0430\u043d\u0456\u0437\u0435\u0440\u0430."}]}
transformers pytorch safetensors xlm-roberta token-classification ukrainian uk license:mit autotrain_compatible endpoints_compatible region:us
TAGS
#transformers #pytorch #safetensors #xlm-roberta #token-classification #ukrainian #uk #license-mit #autotrain_compatible #endpoints_compatible #region-us 

## Model Description
Fine-tuning of XLM-RoBERTa-Uk model on synthetic morphological dataset, returns both UPOS and morphological features (joined by double underscore symbol)

## How to Use

Huggingface pipeline way (returns tokens with labels):


If you wish to get predictions split by words, not by tokens, you may use the following approach (download script get_predictions.py from the repository, it uses package tokenize_uk for splitting)


## Model Description
Fine-tuning of XLM-RoBERTa-Uk model on synthetic morphological dataset, returns both UPOS and morphological features (joined by double underscore symbol) ## How to Use

Huggingface pipeline way (returns tokens with labels):


If you wish to get predictions split by words, not by tokens, you may use the following approach (download script get_predictions.py from the repository, it uses package tokenize_uk for splitting)
TAGS
#transformers #pytorch #safetensors #xlm-roberta #token-classification #ukrainian #uk #license-mit #autotrain_compatible #endpoints_compatible #region-us 
 ## Model Description
Fine-tuning of XLM-RoBERTa-Uk model on synthetic morphological dataset, returns both UPOS and morphological features (joined by double underscore symbol) ## How to Use

Huggingface pipeline way (returns tokens with labels):


If you wish to get predictions split by words, not by tokens, you may use the following approach (download script get_predictions.py from the repository, it uses package tokenize_uk for splitting)
passage: TAGS
#transformers #pytorch #safetensors #xlm-roberta #token-classification #ukrainian #uk #license-mit #autotrain_compatible #endpoints_compatible #region-us 
## Model Description
Fine-tuning of XLM-RoBERTa-Uk model on synthetic morphological dataset, returns both UPOS and morphological features (joined by double underscore symbol)## How to Use

Huggingface pipeline way (returns tokens with labels):


If you wish to get predictions split by words, not by tokens, you may use the following approach (download script get_predictions.py from the repository, it uses package tokenize_uk for splitting)