mirror of
https://github.com/rspeer/wordfreq.git
synced 2024-12-23 09:21:37 +00:00
Separate tokens with spaces, not line breaks, in intermediate files
Former-commit-id: 115c74583e
This commit is contained in:
parent
7d1719cfb4
commit
883aa5baeb
@ -95,7 +95,7 @@ def tokenize_by_language(in_filename, out_prefix, tokenizer):
|
||||
text = line.split('\t')[-1].strip()
|
||||
language, tokens = tokenizer(text)
|
||||
if language != 'un':
|
||||
tokenized = '\n'.join(tokens)
|
||||
tokenized = ' '.join(tokens)
|
||||
out_filename = '%s.%s.txt' % (out_prefix, language)
|
||||
if out_filename in out_files:
|
||||
out_file = out_files[out_filename]
|
||||
|
Loading…
Reference in New Issue
Block a user