dipanjanS / practical-machine-learning-with-python

Master the essential skills needed to recognize and solve complex real-world problems with Machine Learning and Deep Learning by leveraging the highly popular Python Machine Learning Eco-system.
Apache License 2.0
2.28k stars 1.65k forks source link

expand contractions is not working as expected #17

Open jonanem opened 5 years ago

jonanem commented 5 years ago

When there are more than one single quote(') such as "you'll've" , Expand contractions in text_normalizer.py is giving output as "you willve" but the expected output is "you will have"

dipanjanS commented 5 years ago

Yes sadly this is a known issue even with the contractions package on PyPI. The whole regex pattern framework used for this will need to be modified I am guessing. Will be taking a look at this some time in the future as I get some time.