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-1.0.5.tar.gz
(20.8 kB
view details)
File details
Details for the file texta-torch-tagger-1.0.5.tar.gz
.
File metadata
- Download URL: texta-torch-tagger-1.0.5.tar.gz
- Upload date:
- Size: 20.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 867dd92347274b44ffc4d99a5c88abf9d2d2766a5a6c008bfe3cc90e49372bdf |
|
MD5 | ef4b8ef24b924670d38476f455eecf35 |
|
BLAKE2b-256 | 921d4739aee74c27b7867239d49c66339bbf3fc5ee62641ed3800175cd69ba97 |