From c1a12cebec4ed5322d15c00a69953030a05e52bc Mon Sep 17 00:00:00 2001 From: Rob Speer Date: Fri, 22 Jan 2016 14:20:12 -0500 Subject: [PATCH] configuration that builds some larger lists --- wordfreq_builder/wordfreq_builder/config.py | 3 ++- wordfreq_builder/wordfreq_builder/ninja.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/wordfreq_builder/wordfreq_builder/config.py b/wordfreq_builder/wordfreq_builder/config.py index 92c1029..8673a9e 100644 --- a/wordfreq_builder/wordfreq_builder/config.py +++ b/wordfreq_builder/wordfreq_builder/config.py @@ -60,7 +60,8 @@ CONFIG = { 'twitter-dist': 'dist/twitter_{lang}.{ext}', 'jieba-dist': 'dist/jieba_{lang}.{ext}' }, - 'min_sources': 2 + 'min_sources': 2, + 'big-lists': ['en', 'fr', 'es', 'pt'] } diff --git a/wordfreq_builder/wordfreq_builder/ninja.py b/wordfreq_builder/wordfreq_builder/ninja.py index 7487f75..89910b2 100644 --- a/wordfreq_builder/wordfreq_builder/ninja.py +++ b/wordfreq_builder/wordfreq_builder/ninja.py @@ -353,9 +353,11 @@ def combine_lists(languages): params={'lang': language, 'buckets': 600}) add_dep(lines, 'freqs2cB', output_file, output_cBpack_big, extra='wordfreq_builder/word_counts.py', - params={'lang': language, 'buckets': 900}) + params={'lang': language, 'buckets': 800}) lines.append('default {}'.format(output_cBpack)) + if language in CONFIG['big-lists']: + lines.append('default {}'.format(output_cBpack_big)) # Write standalone lists for Twitter frequency if language in CONFIG['sources']['twitter']: