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-2.0.0.tar.gz
(21.4 kB
view details)
File details
Details for the file texta-torch-tagger-2.0.0.tar.gz
.
File metadata
- Download URL: texta-torch-tagger-2.0.0.tar.gz
- Upload date:
- Size: 21.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9a59a6172d81eaf4a853844492a3382e4a865315d5418b4bdb9c08c515abdcb |
|
MD5 | 0acb744bbce57d60ce98232296e3c93b |
|
BLAKE2b-256 | bbb0566742b8a2aff65054aac2b94d1fddf1e88183c8171a9aa96cea7362ce64 |