| Conditions | 4 | 
| Total Lines | 10 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | """Common functionality for analyzers."""  | 
            ||
| 25 | @functools.lru_cache(maxsize=50000)  | 
            ||
| 26 | def is_valid_token(self, word):  | 
            ||
| 27 | """Return True if the word is an acceptable token."""  | 
            ||
| 28 | if len(word) < self.token_min_length:  | 
            ||
| 29 | return False  | 
            ||
| 30 | for char in word:  | 
            ||
| 31 | category = unicodedata.category(char)  | 
            ||
| 32 | if category[0] == 'L': # letter  | 
            ||
| 33 | return True  | 
            ||
| 34 | return False  | 
            ||
| 35 | |||
| 46 |