Skip to main content

Latvian NLP Tools

Project description

LVNLP

Setup

  • python3.6+
  • pip3 install lvnlp

Tools

NLPPIPE_CLIENT

from lvnlp import nlppipe_run
print(nlppipe_run('Jānis brauc uz Rīgu.', ['tokenizer', 'ner']))

NER_ALLENNLP

Run API:

  • python3 -m lvnlp.ner_allennlp <MODEL_PATH>
  • Visit http://localhost:8800?text=Jānis brauc uz Rīgu.

From code:

p = TaggerPredictor.from_path(<MODEL_PATH>, 'tagger')
print(p.get_entities("""Ar cieņu , Rasa Jankovska p.k. 77923842011"""))
[{'text': 'Rasa Jankovska', 'label': 'person', 'start': 11, 'end': 25}, {'text': '77923842011', 'label': 'person_id', 'start': 31, 'end': 42}]

License

GPL-3.0

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

lvnlp-0.0.2.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

lvnlp-0.0.2-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

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