(alpha_path)
| 165 | |
| 166 | |
| 167 | def get_alpha(alpha_path): |
| 168 | character_str = [] |
| 169 | with open(alpha_path, 'rb') as fin: |
| 170 | lines = fin.readlines() |
| 171 | for line in lines: |
| 172 | line = line.decode('utf-8').strip('\n').strip('\r\n') |
| 173 | character_str.append(line) |
| 174 | dict_character = list(character_str) |
| 175 | if 'arabic' in alpha_path: |
| 176 | reverse = True |
| 177 | return dict_character |