texta-tagger
Project description
TEXTA Torch Tagger Python Package
Installation
From Git
pip install git+https://git.texta.ee/texta/texta-torch-tagger-python.git
Testing
python -m pytest -v tests
Usage
>>> from texta_tools.embedding import W2VEmbedding
>>> from texta_torch_tagger.tagger import TorchTagger
>>>
>>> data = {"good": ["Täna on ilus ilm.", "Kuidas käsi käib?"], "bad": ["Arno on loll.", "ei"]}
>>>
>>> embedding = W2VEmbedding()
>>> embedding.train([y for x in data.values() for y in x])
>>>
>>> tagger = TorchTagger(embedding, model_arch="TextRNN")
>>>
>>> report = t.train(data, num_epochs=3)
>>>
>>> tagger.tag_text("Ei hooli.")
"bad"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
texta-torch-tagger-3.0.0.tar.gz
(21.3 kB
view details)
File details
Details for the file texta-torch-tagger-3.0.0.tar.gz.
File metadata
- Download URL: texta-torch-tagger-3.0.0.tar.gz
- Upload date:
- Size: 21.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd68446da3bd1042aaa2c62fa536394e1914be7486865d8a578997a9f528b775
|
|
| MD5 |
48ca759f38cb4a12ccc30871dec05c35
|
|
| BLAKE2b-256 |
e4dbc8472ba985bf275c2351bd90bba6386a4321ff32aa91c5b900d05669280b
|