Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
MorphoDiTa example
import requests
result = requests.get('', params={
'data': 'Zeman: Chci být znovu prezidentem a budu kandidovat',
'output': 'json',
'convert_tagset': 'strip_lemma_comment',
def is_noun(tag):
return tag.startswith('NN')
def clear_lemma(lemma):
lemma_parts = lemma.split('-')
if lemma_parts[-1].isdigit():
lemma_parts = lemma_parts[:-1]
return '-'.join(lemma_parts)
for sentence in result['result']:
for word in sentence:
if is_noun(word['tag']):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.