Skip to content
Snippets Groups Projects
Commit 981d2f77 authored by Vriezen, E.C. (Emma)'s avatar Vriezen, E.C. (Emma)
Browse files

Merge branch 'master' into 'SC-113/implement-repetition-mistakes'

# Conflicts:
#   umbra/mistake_finder.py
parents 8ec11dd5 7def4f12
No related branches found
No related tags found
1 merge request!46Sc 113/implement repetition mistakes
File moved
......@@ -124,7 +124,7 @@ class TxtWriter(FileWriter):
source_results, shadow_results, info = results
final = np.empty(0)
for i in range(len(source_results)):
source_word = source_results.words[i]
source_word = source_results[i]
res = (str(source_word), str(source_word.shadowed)+"\n")
final = np.append(final, res)
final = np.append(final, "Total: "+str(info[0]))
......
......@@ -72,14 +72,15 @@ class MistakeFinder:
# TODO: WordNet integration. Function below should be usable already!
# def _check_semantic_mistake(self, shd_word):
# shd_string = shd_word.word
# src_string = shd_word.source.word
# if model.seman_check.semantically_related(src_string, shd_string):
# shd_word.mistake = Mistake.SEMANTIC
# src_word.mistake = Mistake.SEMANTIC
# return True
# return False
def _check_semantic_mistake(self, shd_word):
shd_string = shd_word.word
src_string = shd_word.source.word
if model.seman_check.semantically_related(src_string, shd_string):
shd_word.mistake = Mistake.SEMANTIC
src_word.mistake = Mistake.SEMANTIC
return True
return False
def _check_phonetic_mistake(self, shd_word):
pass
# def _check_phonetic_mistake(self, shd_word):
#
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