improve finally

This commit is contained in:
Michal Maciaszek 2020-12-08 16:52:08 +01:00
parent d971ae8da7
commit 801cfedc85
5 changed files with 45748 additions and 45748 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,8 +28,8 @@ 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)[:10000])
ngrams[2] = dict(sorted(ngrams[2].items(), key=lambda item: ngrams[2][item[0]], reverse=True)[:100000])
ngrams[1] = dict(sorted(ngrams[1].items(), key=lambda item: ngrams[1][item[0]], reverse=True)[:100000])
ngrams[2] = dict(sorted(ngrams[2].items(), key=lambda item: ngrams[2][item[0]], reverse=True)[:120000])
pickle.dump(ngrams, open('ngrams_2.pkl', 'wb'))