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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file vdu_nlp_services-0.0.27.tar.gz.
File metadata
- Download URL: vdu_nlp_services-0.0.27.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7250d721bfc0b024915e8d1bde2d20f3e84770791322ce94e595a7049316cfa
|
|
| MD5 |
a35e3170c344187d201436963c540195
|
|
| BLAKE2b-256 |
772d2374219d7bbe4db0ba1b58591fce9b986e5f786df0076fe236ab898fd488
|