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.2.tar.gz
(19.9 kB
view details)
File details
Details for the file texta-torch-tagger-1.0.2.tar.gz
.
File metadata
- Download URL: texta-torch-tagger-1.0.2.tar.gz
- Upload date:
- Size: 19.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cae4d5b1635fe4cc0190cdeaf4102e8a55c7974dd26746e50a3cf7270611062a |
|
MD5 | 9b2ce3c28258107f5647051278bb1711 |
|
BLAKE2b-256 | dcd83fe27f04a18f612fd0733ade633191126f4d29759ba122678a8aaa98c844 |