Skip to content
Snippets Groups Projects
Commit 2369f030 authored by Bastien Abadie's avatar Bastien Abadie
Browse files

Move post processing module into library

parent 39e52ef7
No related branches found
No related tags found
1 merge request!2Move post processing module into library
......@@ -40,7 +40,7 @@ import re
import networkx as nx
import editdistance
import numpy as np
from basic.post_pocessing_layout import PostProcessingModuleREAD, PostProcessingModuleRIMES
from dan.post_processing import PostProcessingModuleREAD, PostProcessingModuleRIMES
class MetricManager:
......
......@@ -34,6 +34,7 @@
# knowledge of the CeCILL-C license and that you accept its terms.
import numpy as np
from Datasets.dataset_formatters.read2016_formatter import SEM_MATCHING_TOKENS as READ_MATCHING_TOKENS
from Datasets.dataset_formatters.rimes_formatter import SEM_MATCHING_TOKENS as RIMES_MATCHING_TOKENS
......@@ -253,7 +254,7 @@ class PostProcessingModuleRIMES(PostProcessingModule):
ind += 1
# a tag must be closed
if begin_token is not None:
self.insert_label(ind+1, self.matching_tokens[begin_token])
self.insert_label(ind + 1, self.matching_tokens[begin_token])
res = "".join(self.prediction)
if self.confidence is not None:
return res, np.array(self.confidence)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment