@@ -75,18 +75,18 @@ def remove_punctuation(self, content):
7575 content = content .encode ('utf-8' )
7676 return content .translate (self .TRANS_TABLE , string .punctuation )
7777
78- def candiate_words (self , stripped_input ):
78+ def candidate_words (self , stripped_input ):
7979 return stripped_input .split (' ' )
8080
8181 def get_stopword_count (self , content ):
8282 if not content :
8383 return WordStats ()
8484 ws = WordStats ()
8585 stripped_input = self .remove_punctuation (content )
86- candiate_words = self .candiate_words (stripped_input )
86+ candidate_words = self .candidate_words (stripped_input )
8787 overlapping_stopwords = []
8888 c = 0
89- for w in candiate_words :
89+ for w in candidate_words :
9090 c += 1
9191 if w .lower () in self .STOP_WORDS :
9292 overlapping_stopwords .append (w .lower ())
@@ -104,7 +104,7 @@ class StopWordsChinese(StopWords):
104104 def __init__ (self , language = 'zh' ):
105105 super (StopWordsChinese , self ).__init__ (language = 'zh' )
106106
107- def candiate_words (self , stripped_input ):
107+ def candidate_words (self , stripped_input ):
108108 # jieba builds a tree that takes a while. avoid building
109109 # this tree if we don't use the chinese language
110110 from .packages import jieba
@@ -122,7 +122,7 @@ def __init__(self, language='ar'):
122122 def remove_punctuation (self , content ):
123123 return content
124124
125- def candiate_words (self , stripped_input ):
125+ def candidate_words (self , stripped_input ):
126126 import nltk
127127 s = nltk .stem .isri .ISRIStemmer ()
128128 words = []
@@ -143,10 +143,10 @@ def get_stopword_count(self, content):
143143 return WordStats ()
144144 ws = WordStats ()
145145 stripped_input = self .remove_punctuation (content )
146- candiate_words = self .candiate_words (stripped_input )
146+ candidate_words = self .candidate_words (stripped_input )
147147 overlapping_stopwords = []
148148 c = 0
149- for w in candiate_words :
149+ for w in candidate_words :
150150 c += 1
151151 for stop_word in self .STOP_WORDS :
152152 overlapping_stopwords .append (stop_word )
0 commit comments