Open lsmith77 opened 2 years ago
I am using spacy in my project, so I did a quick hack which works but is very inelegant:
a_text = a_token.text
b_text = b_token.lemma_
a_verb = Verb(a_text)
b_verb = Verb(b_text)
if a_verb.is_singular():
b_text = b_verb.singular()
b_verb = Verb(b_text)
elif a_verb.is_plural():
b_text = b_verb.plural()
b_verb = Verb(b_text)
if a_verb.is_past():
b_text = b_verb.past()
elif a_verb.is_pres_part():
b_text = b_verb.pres_part()
elif a_verb.is_past_part():
b_text = b_verb.past_part()
return b_text
That is indeed a bit inelegant. That functionality does not exist, although it certainly could.
so you would be open to a PR? in that case I will see if I can find some time for this.
Yes, I would be!
I want to align two words, ie. if I have
challenges
, I passquestion
to this alignment function it would generatequestions
.Is this something within the scope of this library?