Skip to main content

Python wrapper for VDU NLP online services

Project description

Build Status PyPi version

vdu-nlp-services

Function Reference

Reference

analyze_text

Perform morphological analysis

from vdu_nlp_services import analyze_text

res = analyze_text(u'Laba diena!', include_lemmas=True)
print (res)
([{u'lemma': u'laba diena', u'word': u'Laba diena', u'type': u'jst.'}, {u'sep': u'!'}, {u'p': None}], [{u'lemma': u'laba diena', 'span': (0, 4), u'word': u'Laba', u'type': u'jst.'}, {'other': u' ', 'span': (4, 5)}, {u'lemma': u'laba diena', 'span': (5, 10), u'word': u'diena', u'type': u'jst.'}, {'other': u'!', 'span': (10, 11)}])

stress_text

Accentuate text

from vdu_nlp_services import stress_text

res = stress_text(u'Laba diena!')
print (res)
'Laba` diena`!'

stress_word

Accentuate word

from vdu_nlp_services import stress_word

res = stress_word(u'Laba')
for stressed_word, tags in res:
   print(stressed_word, list(tags))
Laba` ['dktv.', 'mot.gim.', 'vnsk.', 'Įn.']
La~ba ['dktv.', 'mot.gim.', 'vnsk.', 'Š.']
Laba` ['bdvr.', 'mot.gim.', 'vnsk.', 'V.', 'neįvardž.']
Laba` ['bdvr.', 'mot.gim.', 'vnsk.', 'Įn.', 'neįvardž.']
La~ba ['bdvr.', 'mot.gim.', 'vnsk.', 'Š.', 'neįvardž.']
La~ba ['bdvr.', 'bevrd.gim.', 'neįvardž.']

Install

PyPi

pip install vdu-nlp-services

Git

pip install git+https://github.com/aleksas/vdu-nlp-services.git

Project details


Download files

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

Files for vdu-nlp-services, version 0.0.27
Filename, size File type Python version Upload date Hashes
Filename, size vdu_nlp_services-0.0.27.tar.gz (6.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page