Retention of Casing after expansion
Closed this issue · 0 comments
ashutosh486 commented
Hi,
If I pass a sentence then it doesn't retain the original casing of sentence, instead it lowercase it.
Can you fix in the next update.
Thanks.
Edit:
For a workaround solution, I am using symspellpy module (used for spell checker).
from symspellpy import helpers
orig_text = "You'll need this."
expanded_text = helpers.transfer_casing_for_similar_text(orig_text, contractions.fix(orig_text))
print("Original Text: {} \nModified Text: {}".format(orig_text, expanded_text))
Output:
Original Text: You'll need this.
Modified Text: You will need this.