From e2d6cd9fedebe9aa1e32596bf624b9b3db406ce6 Mon Sep 17 00:00:00 2001 From: Rob van Son Date: Fri, 8 Jan 2016 11:14:43 +0100 Subject: [PATCH] Made grading language independent --- InitialiseSGC2.praat | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/InitialiseSGC2.praat b/InitialiseSGC2.praat index 5c74924..5dca5ec 100644 --- a/InitialiseSGC2.praat +++ b/InitialiseSGC2.praat @@ -751,33 +751,40 @@ procedure add_feedback_to_toneevaluation .table$ .line1$ = Get value... 1 Text .line2$ = Get value... 2 Text .label$ = Get value... 3 Text - if .label$ = "6" - .label$ = "'eval.unknown$'" - endif .tones$ = replace_regex$(left$(.line1$, rindex(.line1$, ":")), "[^0-9]", "", 0) .recognized$ = replace_regex$(right$(.line1$, length(.line1$)-rindex(.line1$, ":")), "[^0-9]", "", 0) # Set evaluation + .result = 0 call increment_toneevaluation_value 'sgc.pinyin$' 'eval.total$' if .tones$ = .recognized$ call increment_toneevaluation_value 'sgc.pinyin$' 'eval.correct$' .result = 1 else call increment_toneevaluation_value 'sgc.pinyin$' 'eval.wrong$' - .result = 0 endif if index_regex(.label$, "(Correct|Wrong)") <= 0 - if .label$ = "Correct" - .label$ = eval.correct$ - else - .label$ = eval.wrong$ - endif - call increment_toneevaluation_value 'sgc.pinyin$' '.label$' call increment_toneevaluation_value 'sgc.pinyin$' 'eval.commented$' - .result = 0 endif + if .label$ = "6" + call increment_toneevaluation_value 'sgc.pinyin$' 'eval.unknown$' + endif + if .label$ = "Low" + call increment_toneevaluation_value 'sgc.pinyin$' 'eval.low$' + endif + if .label$ = "High" + call increment_toneevaluation_value 'sgc.pinyin$' 'eval.high$' + endif + if .label$ = "Narrow" + call increment_toneevaluation_value 'sgc.pinyin$' 'eval.narrow$' + endif + if .label$ = "Wide" + call increment_toneevaluation_value 'sgc.pinyin$' 'eval.narrow$' + endif + + # Update performance table when SaveAudio is on if sgc.saveAudioOn call update_toneevaluation_file -- 2.11.4.GIT