From 5c729a550c163e901bd063c6324fdec4250fb34e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Szuka=C5=82a?= Date: Fri, 17 May 2019 10:37:35 +0200 Subject: [PATCH] counter --- .idea/workspace.xml | 40 ++++++++++++++++++---------------------- counter.sh | 3 ++- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 523a6b3..2d045f5 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,11 +1,7 @@ - - - - - + - + @@ -52,11 +48,11 @@ - + - - + + @@ -64,11 +60,11 @@ - + - - + + @@ -88,8 +84,8 @@ @@ -218,22 +214,22 @@ - - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/counter.sh b/counter.sh index 38ea136..c7e8f67 100644 --- a/counter.sh +++ b/counter.sh @@ -1,4 +1,5 @@ -awk '{print gensub("^\\*\\*", "\\\\**", "g", $0) "\t(sp1_"NR")"}' < wikiniews_results.tsv > +awk 'BEGIN { FS="\t" } {print gensub("^\\*\\*", "\\\\**", "g", $2) "\t(sp1_"NR")"}' wikiniews_results.tsv > reference.trn +awk 'BEGIN { FS="\t" } {print gensub("^\\*\\*", "\\\\**", "g", $3) "\t(sp1_"NR")"}' wikiniews_results.tsv > hypothesis.trn reference.trn sclite -f 0 -r reference.trn trn -h hypothesis.trn trn -e utf-8 -i rm -o all stdout >> out.txt