TEXTA Bert Tagger
Installation
Using built package
pip install texta-bert-tagger
Using Git
pip install git+https://git.texta.ee/texta/texta-bert-tagger-python.git
Testing
python -m pytest -v tests
Documentation
Documentation for version 1.* is available here.
Documentation for version 2.* is available here.
Documentation for version 3.* is available here.
Usage (for versions >=3..)
Fine-tune BERT model
from texta_bert_tagger.tagger import BertTagger
bert_tagger = BertTagger()
data_sample = {"good": ["It was a nice day.", "All was well."], "bad": ["It was horrible.", "What a disaster."]}
# Train a model
# pos_label - used in metrics (precision, recall, f1-score etc) calculations as true label
bert_tagger.train(data_sample, pos_label="bad", n_epochs=2)
# Predict
result = bert_tagger.tag_text("How awful!")
print(result)
Output
[{"prediction": "bad", "probability": 0.55200404, "attributions": {}}]
Metadata
Release files for texta-bert-tagger 3.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| texta-bert-tagger-3.0.2.tar.gz | 30.5 kB | Without provenance | Details for texta-bert-tagger-3.0.2.tar.gz |
Release files / texta-bert-tagger-3.0.2.tar.gz
| Download URL | texta-bert-tagger-3.0.2.tar.gz |
|---|---|
| Size | 30.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9719cea7e8288f76ed8593694836fafd0e9c8d544d767793201c39f09e11a0cb
|
|
BLAKE2b-256 checksum How to use checksums |
e0326e61503d7dfafea7f382a15eeb91d9e95cf147cc768c7010c5ef41ba157a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.8
|
Security for texta-bert-tagger 3.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.