mirror of
https://github.com/rspeer/wordfreq.git
synced 2024-12-23 09:21:37 +00:00
Protect top_n from running on import
This commit is contained in:
parent
17b1537f2f
commit
3d02a88b14
@ -8,7 +8,7 @@ import wordfreq
|
||||
|
||||
N = 1000
|
||||
|
||||
|
||||
for lang in sorted(wordfreq.available_languages()):
|
||||
for word in wordfreq.top_n_list(lang, 1000):
|
||||
print('{}\t{}'.format(lang, word))
|
||||
if __name__ == '__main__':
|
||||
for lang in sorted(wordfreq.available_languages()):
|
||||
for word in wordfreq.top_n_list(lang, 1000):
|
||||
print('{}\t{}'.format(lang, word))
|
||||
|
Loading…
Reference in New Issue
Block a user