diff --git a/wordfreq_builder/wordfreq_builder/cli/count_tokens.py b/wordfreq_builder/wordfreq_builder/cli/count_tokens.py index 39d5cce..56b93cb 100644 --- a/wordfreq_builder/wordfreq_builder/cli/count_tokens.py +++ b/wordfreq_builder/wordfreq_builder/cli/count_tokens.py @@ -2,8 +2,8 @@ from wordfreq_builder.word_counts import count_tokens, write_wordlist import argparse -def handle_counts(filename_in, filename_out, lang): - counts = count_tokens(filename_in, lang) +def handle_counts(filename_in, filename_out): + counts = count_tokens(filename_in) write_wordlist(counts, filename_out) @@ -11,6 +11,5 @@ if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('filename_in', help='name of input file containing tokens') parser.add_argument('filename_out', help='name of output file') - parser.add_argument('lang', help='language of input file') args = parser.parse_args() - handle_counts(args.filename_in, args.filename_out, args.lang) + handle_counts(args.filename_in, args.filename_out) diff --git a/wordfreq_builder/wordfreq_builder/ninja.py b/wordfreq_builder/wordfreq_builder/ninja.py index 094479f..0f43c2e 100644 --- a/wordfreq_builder/wordfreq_builder/ninja.py +++ b/wordfreq_builder/wordfreq_builder/ninja.py @@ -98,7 +98,7 @@ def wikipedia_deps(dirname_in, languages): lines, 'tokenize_japanese', plain_text_file, mecab_token_file) add_dep(lines, 'count', mecab_token_file, count_file) else: - add_dep(lines, 'count', plain_text_file, count_file}) + add_dep(lines, 'count', plain_text_file, count_file) return lines