@@ -66,17 +66,6 @@ def analyze(self, text):
6666 self .sentences = stats ['sentences' ] # hack for smog
6767 return AnalyzerStatistics (stats )
6868
69- def _tokenize_sentences (self , text ):
70- return sent_tokenize (text )
71-
72- def _tokenize (self , text ):
73- tokenizer = TweetTokenizer ()
74- return tokenizer .tokenize (text )
75-
76- def _is_punctuation (self , token ):
77- match = re .match ('^[.,\/#!$%\' \^&\*;:{}=\-_`~()]$' , token )
78- return match is not None
79-
8069 def _statistics (self , text ):
8170 tokens = self ._tokenize (text )
8271 syllable_count = 0
@@ -132,6 +121,17 @@ def is_spache_complex(t):
132121 'sentences' : sentences ,
133122 }
134123
124+ def _tokenize_sentences (self , text ):
125+ return sent_tokenize (text )
126+
127+ def _tokenize (self , text ):
128+ tokenizer = TweetTokenizer ()
129+ return tokenizer .tokenize (text )
130+
131+ def _is_punctuation (self , token ):
132+ match = re .match ('^[.,\/#!$%\' \^&\*;:{}=\-_`~()]$' , token )
133+ return match is not None
134+
135135 def _is_proper_noun (self , token ):
136136 # pos = pos_tag(token)[0][1]
137137 # return pos == 'NNP'
0 commit comments