Skip to content
Snippets Groups Projects
Commit c15fe080 authored by szymekc's avatar szymekc
Browse files

available mappings message

parent 9333f1d0
Branches v2
No related merge requests found
...@@ -26,7 +26,8 @@ class TagConverter(nlp_ws.NLPWorker): ...@@ -26,7 +26,8 @@ class TagConverter(nlp_ws.NLPWorker):
mapping = self.mappings[task_options.get('mapping')] mapping = self.mappings[task_options.get('mapping')]
reg = re.compile(r'<ctag>.*</ctag>') reg = re.compile(r'<ctag>.*</ctag>')
except KeyError as e: except KeyError as e:
raise Exception('Unknown mapping: ' + task_options.get('mapping')) raise Exception('Unknown mapping: ' + task_options.get('mapping')
+ "\nAvailable mappings: " + str(self.mappings.keys()))
with open(input_file, "rt") as f: with open(input_file, "rt") as f:
lines = f.readlines() lines = f.readlines()
newlines = [] newlines = []
......
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