Replace apostrophe/short words in python
问题 I am using python to clean a given sentence. Suppose that my sentence is: What's the best way to ensure this? I want to convert: What's -> What is Similarly, must've -> must have Also, verbs to original form, told -> tell Singular to plural, and so on. I am currently exploring textblob. But not all of the above is possible using it. 回答1: For the first question, there isn't a direct module that does that for you so you will have to build your own, first you will need a contraction dictionary