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

Very minor bug in contractions with "ain't" #24

Open bbookman opened 4 years ago

bbookman commented 4 years ago

The word ain't produces "as not" because expand_contractions has the following code:

expanded_contraction = first_char + expanded_contraction[1:]

Ain't does not fit this general rule