forked from mrlan/EnglishPal
				
			
							parent
							
								
									f6c7928fc9
								
							
						
					
					
						commit
						8127ddcea5
					
				|  | @ -68,7 +68,7 @@ def save_frequency_to_pickle(d, pickle_fname): | ||||||
|     d2 = {} |     d2 = {} | ||||||
|     for k in d: |     for k in d: | ||||||
|         if not k in exclusion_lst and not k.isnumeric() and not len(k) < 2: |         if not k in exclusion_lst and not k.isnumeric() and not len(k) < 2: | ||||||
|             d2[k] = list(sorted(d[k])) # 原先这里是d2[k] = list(sorted(set(d[k]))) |             d2[k] = list(sorted(d[k])) # This code sorts the values of the dictionary 'd' associated with the key 'k' and assigns the resulting sorted list to the key 'k' in the dictionary 'd2'. However, it does not remove duplicates from the original list, which means that it keeps track of all counts even when the same value is clicked multiple times in a row. | ||||||
|     pickle.dump(d2, f) |     pickle.dump(d2, f) | ||||||
|     f.close() |     f.close() | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue