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.2.tar.gz
(21.4 kB
view details)
File details
Details for the file texta-torch-tagger-2.0.2.tar.gz
.
File metadata
- Download URL: texta-torch-tagger-2.0.2.tar.gz
- Upload date:
- Size: 21.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9569c433c7dd03449af663a3660954c648ddad75deeae1266867558c38789280 |
|
MD5 | 5dfa8f374cf29a2101bcd66dbb3bf88a |
|
BLAKE2b-256 | f211bd9dcbe4a059c4f3e5c3528f0730f601092d0eb7379614d2d1bd3ae4e744 |