Closed RatkoNikolic closed 3 years ago
Hi, could you share your full code in future issues?
If you use the Serbian non-standard example from the README, then the resulting doc object can be iterated for lemmas it the following way (same as stanza):
for sentence in doc.sentences:
for word in sentence.words:
print(word.lemma)
the output being
ne
moći
da
verovati
kakav
biti
zezanje
biti
prošli
godina
u
Zagreb
.
Thank you! Iterating for lemmas solved it for me. I was just experimenting, so, for now, I have no coherent code to share.
Hi, I can't manage to convert the output of Serbian non-standard lemmatization to any Python object. I tried using stanza for converting classla Document or CoNLLFile to dictionary, but I got the following errors:
'Document' object has no attribute 'to_dict' or 'CoNLLFile' object is not iterable.
Thanks in advance.