Skip to main content

Python wrapper for VDU NLP online services

Project description

Build Status PyPi version


Function Reference



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)}])


Accentuate text

from vdu_nlp_services import stress_text

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


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ž.']



pip install vdu-nlp-services


pip install git+

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

vdu_nlp_services-0.0.27.tar.gz (6.4 kB view hashes)

Uploaded source

Supported by

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