Skip to content
Snippets Groups Projects
Commit ad5df385 authored by Alfen, T. van (Tanja)'s avatar Alfen, T. van (Tanja)
Browse files

Revert "Merge branch 'OS-quickfix-2'"

This reverts merge request !51
parent 1b3e9805
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,6 @@ from anchor_algorithm import AnchorAlgorithm
from mistake_finder import MistakeFinder
from OpenDutchWordnet.wn_grid_parser import Wn_grid_parser
from semantic_checker import SemanticChecker
from utils import Utils as ut
class Statistics:
......@@ -19,9 +18,8 @@ class Statistics:
# currently the case, so the two operate seperately in this class.
# _parser and _seman_checker should be moved to MistakeFinder when
# possible.
self.path = "OpenDutchWordnet/resources/odwn/odwn_orbn_gwg-LMF_1.3.xml.gz"
self._parser = Wn_grid_parser(ut.get_path(self.path)
)
self._parser = Wn_grid_parser(
"OpenDutchWordnet/resources/odwn/odwn_orbn_gwg-LMF_1.3.xml.gz")
self._parser.load_synonyms_dicts()
self._seman_checker = SemanticChecker(self._parser)
self._mistake_finder = MistakeFinder(self._seman_checker)
......@@ -70,3 +68,4 @@ class Statistics:
self._mistake_finder.start(source_align_em, shadow_align_em)
return source_align_em, shadow_align_em, correctness
import sys
class Utils:
@staticmethod
......@@ -33,9 +32,3 @@ class Utils:
m, s = divmod(s, 60)
h, m = divmod(m, 60)
return "%02i:%02i:%02i.%03i" % (h, m, s, ms)
def get_path(path):
if sys.platform.startswith('freebsd'):
return path
elif sys.platform.startswith('linux'):
return"./umbra/"+path
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