Skip to content

Instantly share code, notes, and snippets.

@avriiil
Created April 5, 2021 19:47
Show Gist options
  • Save avriiil/8ea291c2411e1025246ec208f00dbbcc to your computer and use it in GitHub Desktop.
Save avriiil/8ea291c2411e1025246ec208f00dbbcc to your computer and use it in GitHub Desktop.
Get lemmas of Arabic string
def get_lemmas(tokenized_text):
disambig = mle.disambiguate(tokenized_text)
lemmas = [d.analyses[0].analysis['lex'] for d in disambig]
return lemmas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment