Commit 3382b078 authored by Szymon Ciombor's avatar Szymon Ciombor

removed camelCase

parent c57c427a
Pipeline #957 passed with stage
in 47 seconds
......@@ -24,26 +24,26 @@ class Worker(nlp_ws.NLPWorker):
self.tagset = ccl.get_tagset("nkjp")
self.reader = None
def process(self, inputFile, taskOptions, outputFile):
def process(self, input_file, task_options, output_file):
"""Runs a single nlp_task."""
_validate_xml(inputFile)
_validate_xml(input_file)
if not self.reader:
self.reader = mwe.CclMWEReader(inputFile, self.tagset)
self.reader = mwe.CclMWEReader(input_file, self.tagset)
self.reader.use_annotations(False)
else:
self.reader.set_files(inputFile)
self.reader.set_files(input_file)
mwe_doc = self.reader.read()
ccl.write_ccl(mwe_doc, str(outputFile))
ccl.write_ccl(mwe_doc, str(output_file))
class _InvalidXMLInRequest(Exception):
pass
def _validate_xml(xmlfile):
def _validate_xml(xml_file):
"""Will do nothing if XML is valid and raise exception if it's not."""
lint_call = subprocess.Popen(
("xmllint", "--nonet", "--noout", xmlfile), stderr=subprocess.PIPE,
("xmllint", "--nonet", "--noout", xml_file), stderr=subprocess.PIPE,
)
lint_call.communicate()
......
Markdown is supported
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