Created
October 16, 2014 12:39
-
-
Save nournia/c8d6e6141b3be75b69ec to your computer and use it in GitHub Desktop.
Verb Conjugations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from hazm import VerbValencyReader, Lemmatizer | |
valency = VerbValencyReader('/home/alireza/Corpora/valency.txt') | |
lemmatizer = Lemmatizer() | |
output = open('verbs.txt', 'w') | |
verbs = set([verb.past_light_verb +'#'+ verb.present_light_verb for verb in valency.verbs()]) | |
print('است', file=output) | |
for verb in verbs: | |
print(*lemmatizer.conjugations(verb), sep='\n', file=output) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment