You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
shouldn't this betext.upper()instead of text.lower() since we have capital P and D in the match expression ? Or in alternative make the regex ignore the case , re.findall('(?::|;|=)(?:-)?(?:\)|\(|D|P)', text.lower(), flags=re.IGNORECASE).
Like it is now, it looks for uppercase letters in a string that's all lower case so it will never match anything.
The text was updated successfully, but these errors were encountered:
Thanks for the comment. I think if it is all in upper case it, characters like ":-)" would become "":_)" etc. I think instead of doing text.lower(), which would catch things like ":-P". To preserve the original characters, it could perhaps be just
In here, to match emoticons: Line 211 https://github.com/rasbt/machine-learning-book/blob/bc27b404956c1555777282624eb5b8c50c818bfd/ch15/ch15_part2.ipynb#L211
shouldn't this be
text.upper()
instead of text.lower() since we have capital P and D in the match expression ? Or in alternative make the regex ignore the case ,re.findall('(?::|;|=)(?:-)?(?:\)|\(|D|P)', text.lower(), flags=re.IGNORECASE)
.Like it is now, it looks for uppercase letters in a string that's all lower case so it will never match anything.
The text was updated successfully, but these errors were encountered: