Skip to content
Snippets Groups Projects
Commit 0a7a861c authored by Kamil Kanclerz's avatar Kamil Kanclerz
Browse files

Remove unused imports

parent b654f6d6
Branches
Tags
No related merge requests found
Pipeline #2299 passed with stages
in 2 minutes and 39 seconds
"""Implementation of nlp_worker."""
import io
import json
import logging
import nlp_ws
......@@ -26,16 +24,12 @@ class Speller2Worker(nlp_ws.NLPWorker):
model = self._model
data = self._read_file(input_file)
print(data.split('\n'))
corrected_data = [model(line) for line in data.split('\n')]
with open(output_file, 'w', encoding='utf-8') as f:
f.write('\n'.join(corrected_data))
#with io.open(output_file, 'w', encoding='utf-8') as f:
#json.dump(corrected_data, f, ensure_ascii=False)
#for line in corrected_data:
@classmethod
def _read_file(cls, input_path):
"""Reading text from input file."""
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment