improved_2

This commit is contained in:
Michal Maciaszek 2020-12-08 14:41:50 +01:00
parent 07afcec739
commit d971ae8da7
5 changed files with 45747 additions and 45747 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -28,7 +28,7 @@ def main():
if counter % 1000 == 0:
print('counter = ', counter)
counter += 1
ngrams[1] = dict(sorted(ngrams[1].items(), key=lambda item: ngrams[1][item[0]], reverse=True)[:1000])
ngrams[1] = dict(sorted(ngrams[1].items(), key=lambda item: ngrams[1][item[0]], reverse=True)[:10000])
ngrams[2] = dict(sorted(ngrams[2].items(), key=lambda item: ngrams[2][item[0]], reverse=True)[:100000])
pickle.dump(ngrams, open('ngrams_2.pkl', 'wb'))