1
0
mirror of https://github.com/QData/TextAttack.git synced 2021-10-13 00:05:06 +03:00

add comments

This commit is contained in:
qc
2020-11-06 14:21:08 -05:00
parent 5325ef633e
commit e6f07eb4de

View File

@@ -33,7 +33,7 @@ def words_from_text(s, words_to_ignore=[]):
if c.isalnum(): if c.isalnum():
word += c word += c
elif c in "'-_*@" and len(word) > 0: elif c in "'-_*@" and len(word) > 0:
# Allow apostrophes and hyphens as long as they don't begin the # Allow apostrophes, hyphens, underscores, asterisks and at signs as long as they don't begin the
# word. # word.
word += c word += c
elif word: elif word: