diff --git a/.flake8 b/.flake8 index 8569c55..0b3b6db 100644 --- a/.flake8 +++ b/.flake8 @@ -1,5 +1,5 @@ [flake8] -ignore = W503 +ignore = W503, E203 exclude = .git,__pycache__,build,peters_code,.ipynb_checkpoints,setup.py max-complexity = 15 per-file-ignores = diff --git a/contextualSpellCheck/contextualSpellCheck.py b/contextualSpellCheck/contextualSpellCheck.py index 6c78d3c..e244671 100755 --- a/contextualSpellCheck/contextualSpellCheck.py +++ b/contextualSpellCheck/contextualSpellCheck.py @@ -593,14 +593,17 @@ def deep_tokenize_in_vocab(self, text): pre_puct_position = -1 for char_position in range(text_len): if unicodedata.category(text[char_position]).startswith("P"): - # print("current_pos is {} and sub_token append {}".format(char_position,text[char_position])) + # print("current_pos is {} and sub_token append {}" + # .format(char_position,text[char_position])) sub_tokens.append(text[char_position]) - # print("pre_pos is {}, cur is {} , pre to current is {}".format(pre_puct_position,char_position,text[pre_puct_position+1:char_position])) + # print("pre_pos is {}, cur is {} , pre to current is {}" + # .format(pre_puct_position,char_position,text[pre_puct_position+1:char_position])) if ( pre_puct_position >= 0 and text[pre_puct_position + 1 : char_position] != "" ): - # print("pre_pos is {}, cur is {} , pre to current is {}".format(pre_puct_position,char_position,text[pre_puct_position+1:char_position])) + # print("pre_pos is {}, cur is {} , pre to current is {}" + # .format(pre_puct_position,char_position,text[pre_puct_position+1:char_position])) sub_tokens.append( text[pre_puct_position + 1 : char_position] ) @@ -611,7 +614,8 @@ def deep_tokenize_in_vocab(self, text): and (char_position + 1 == text_len) and (text[pre_puct_position + 1 :] != "") ): - # print("inside last token append {}".format(text[pre_puct_position+1:])) + # print("inside last token append {}" + # .format(text[pre_puct_position+1:])) sub_tokens.append(text[pre_puct_position + 1 :]) if len(sub_tokens) > 0: