Skip to main content

texta-tagger

Project description

TEXTA Tagger

Py3.8 Py3.9 Py3.10

Installation

Using built package

pip install texta-tagger

Using Git (for development)

pip install git+https://git.texta.ee/texta/texta-tagger.git

Usage

Predicting Using Zipped Model

Predicting without MLP & lemmatization

>>> from texta_tagger.tagger import Tagger
>>>
>>> t = Tagger()
>>> t.load_zip('test_data/tagger.zip')
True
>>> print('Tagger:', t)
Tagger: Eesti
>>> t.tag_text('eesti keel ja eesti meel')
{'prediction': True, 'probability': 0.9999999322365133}

Predicting with MLP & lemmatization

Predicting with lemmatization requires either a running MLP server or MLP Python package installed. In following example MLP from package is used:

>>> from texta_tagger.tagger import Tagger
>>> from texta_mlp.mlp import MLP
>>>
>>> mlp = MLP()
>>>
>>> t = Tagger(mlp=mlp)
>>> t.load_zip('test_data/tagger.zip')
True
>>> print('Tagger:', t)
Tagger: Eesti
>>> t.tag_text('eesti keel ja eesti meel')
{'prediction': True, 'probability': 0.9999999322365133}

In following example MLP server version is used:

>>> from texta_tagger.tagger import Tagger
>>> from texta_tagger.mlp_analyzer import get_mlp_analyzer
>>>
>>> mlp = get_mlp_analyzer(mlp_host="http://my-mlp-server:5000")
>>>
>>> t = Tagger(mlp=mlp)
>>> t.load_zip('test_data/tagger.zip')
True
>>> print('Tagger:', t)
Tagger: Eesti
>>> t.tag_text('eesti keel ja eesti meel')
{'prediction': True, 'probability': 0.9999999322365133}

Training

TODO

Environment Variables

  • TEXTA_TAGGER_MLP_URL - MLP host used for lemmatization (e.g. http://mlp-dev.texta.ee:5000)
  • TEXTA_TAGGER_MLP_MAJOR_VERSION - MLP major version (2/3).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

texta-tagger-3.3.0.tar.gz (23.1 kB view details)

Uploaded Source

File details

Details for the file texta-tagger-3.3.0.tar.gz.

File metadata

  • Download URL: texta-tagger-3.3.0.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.14

File hashes

Hashes for texta-tagger-3.3.0.tar.gz
Algorithm Hash digest
SHA256 b493ab73164089feca3d2a51986b9fadaadc7fb4b49d07feeb31947911146da8
MD5 402368a6eef6a8595557ad0b7eec50a6
BLAKE2b-256 09db0fde25633c8a87983d1e942794313ae755bc5538ff128a5224eabbf327ef

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page