Skip to main content

texta-bert-tagger

Project description

TEXTA Bert Tagger Python package

Installation

From Git

pip install git+https://git.texta.ee/texta/texta-bert-tagger-python.git

Testing

python -m pytest -v tests

Documentation

Documentation is available here.

Usage

Fine-tune BERT model

>>> from texta_bert_tagger.tagger import BertTagger
>>> bert_tagger = BertTagger()

>>> data_sample = {"good": ["Täna on ilus ilm.", "Kuidas käsi käib?"], "bad": ["Arno on loll.", "ei"]}

# Train model

>>> bert_tagger.train(data_sample, n_epochs=1)


# Predict

>>>  bert_tagger.tag_text("Ei hooli.")
'bad'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

texta-bert-tagger-1.0.0.tar.gz (10.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page