From ed859974b1d09ee1278d686a40e2f0069ee5a449 Mon Sep 17 00:00:00 2001 From: Nishchal Bhandari Date: Wed, 17 Apr 2024 16:46:24 +0000 Subject: [PATCH] add test --- test/data/short.aligned.case.nlp | 2 +- test/data/short.aligned.punc.nlp | 2 +- test/data/short.aligned.punc_case.nlp | 2 +- test/data/short_punc.ref.nlp | 66 +++++++++++++-------------- test/fstalign_Test.cc | 2 +- 5 files changed, 37 insertions(+), 37 deletions(-) diff --git a/test/data/short.aligned.case.nlp b/test/data/short.aligned.case.nlp index d2fd08c..1d10606 100644 --- a/test/data/short.aligned.case.nlp +++ b/test/data/short.aligned.case.nlp @@ -23,7 +23,7 @@ sure|1|0.0000|0.0000|.||LC|[]|[]|||| When|1|0.0000|0.0000|||UC|[]|[]|||| I|1|0.0000|0.0000|||CA|[]|[]|||| hear|1|0.0000|0.0000|||LC|[]|[]|||| -Foobar|1|0.0000|0.0000|,||UC|[]|[]|||| +Foobar|1|0.0000|0.0000|,||UC|[]|['1', '2']|||| I|1|0.0000|0.0000|||CA|[]|[]|||| think|1|0.0000|0.0000|||LC|[]|[]|||| about|1|0.0000|0.0000|||LC|[]|[]|||| diff --git a/test/data/short.aligned.punc.nlp b/test/data/short.aligned.punc.nlp index 421d1ac..8c4cf3c 100644 --- a/test/data/short.aligned.punc.nlp +++ b/test/data/short.aligned.punc.nlp @@ -31,7 +31,7 @@ sure|1|0.0000|0.0000|.||LC|[]|[]|||| When|1|0.0000|0.0000|||UC|[]|[]|||| I|1|0.0000|0.0000|||CA|[]|[]|||| hear|1|0.0000|0.0000|||LC|[]|[]|||| -Foobar|1|0.0000|0.0000|,||UC|[]|[]|||| +Foobar|1|0.0000|0.0000|,||UC|[]|['1', '2']|||| ,|1|0.0000|0.0000|||||[]|||| I|1|0.0000|0.0000|||CA|[]|[]|||| think|1|0.0000|0.0000|||LC|[]|[]|||| diff --git a/test/data/short.aligned.punc_case.nlp b/test/data/short.aligned.punc_case.nlp index affb08c..07615c3 100644 --- a/test/data/short.aligned.punc_case.nlp +++ b/test/data/short.aligned.punc_case.nlp @@ -31,7 +31,7 @@ sure|1|0.0000|0.0000|.||LC|[]|[]|||| When|1|0.0000|0.0000|||UC|[]|[]|||| I|1|0.0000|0.0000|||CA|[]|[]|||| hear|1|0.0000|0.0000|||LC|[]|[]|||| -Foobar|1|0.0000|0.0000|,||UC|[]|[]|||| +Foobar|1|0.0000|0.0000|,||UC|[]|['1', '2']|||| ,|1|0.0000|0.0000|||||[]|||| I|1|0.0000|0.0000|||CA|[]|[]|||| think|1|0.0000|0.0000|||LC|[]|[]|||| diff --git a/test/data/short_punc.ref.nlp b/test/data/short_punc.ref.nlp index 35e5ec5..1710724 100644 --- a/test/data/short_punc.ref.nlp +++ b/test/data/short_punc.ref.nlp @@ -1,33 +1,33 @@ -token|speaker|ts|endTs|punctuation|case|tags -|2||||LC|[] -Yeah|1|||,|UC|[] -yeah|1|||,|LC|[] -right|1|||.|LC|[] -Yeah|1|||,|UC|[] -all|1||||LC|[] -right|1|||,|LC|[] -probably|1||||LC|[] -just|1||||LC|[] -that|1|||.|LC|[] -Are|3||||UC|[] -there|3||||LC|[] -any|3||||LC|[] -visuals|3||||LC|[] -that|3||||LC|[] -come|3||||LC|[] -to|3||||LC|[] -mind|3||||LC|[] -or-|3||||LC|[] -Yeah|1|||,|UC|[] -sure|1|||.|LC|[] -When|1||||UC|[] -I|1||||CA|[] -hear|1||||LC|[] -Foobar|1|||,|UC|[] -I|1||||CA|[] -think|1||||LC|[] -about|1||||LC|[] -just|1||||LC|[] -that|1|||:|LC|[] -foo|1||||LC|[] -a|1||||LC|[] +token|speaker|ts|endTs|punctuation|case|tags|wer_tags +|2||||LC|[]|[] +Yeah|1|||,|UC|[]|[] +yeah|1|||,|LC|[]|[] +right|1|||.|LC|[]|[] +Yeah|1|||,|UC|[]|[] +all|1||||LC|[]|[] +right|1|||,|LC|[]|[] +probably|1||||LC|[]|[] +just|1||||LC|[]|[] +that|1|||.|LC|[]|[] +Are|3||||UC|[]|[] +there|3||||LC|[]|[] +any|3||||LC|[]|[] +visuals|3||||LC|[]|[] +that|3||||LC|[]|[] +come|3||||LC|[]|[] +to|3||||LC|[]|[] +mind|3||||LC|[]|[] +or-|3||||LC|[]|[] +Yeah|1|||,|UC|[]|[] +sure|1|||.|LC|[]|[] +When|1||||UC|[]|[] +I|1||||CA|[]|[] +hear|1||||LC|[]|[] +Foobar|1|||,|UC|[]|['1', '2'] +I|1||||CA|[]|[] +think|1||||LC|[]|[] +about|1||||LC|[]|[] +just|1||||LC|[]|[] +that|1|||:|LC|[]|[] +foo|1||||LC|[]|[] +a|1||||LC|[]|[] diff --git a/test/fstalign_Test.cc b/test/fstalign_Test.cc index 4b23e63..1a182e3 100644 --- a/test/fstalign_Test.cc +++ b/test/fstalign_Test.cc @@ -681,7 +681,7 @@ TEST_CASE_METHOD(UniqueTestsFixture, "main-adapted-composition()") { SECTION("NLP Hypothesis: wer with case and punctuation(nlp output)") { const auto result = - exec(command("wer", approach, "short_punc.ref.nlp", "short_punc.hyp.nlp", sbs_output, nlp_output, TEST_SYNONYMS)+" --use-punctuation --use-case"); + exec(command("wer", approach, "short_punc.ref.nlp", "short_punc.hyp.nlp", sbs_output, nlp_output, TEST_SYNONYMS)+" --use-punctuation --use-case --wer-sidecar short_punc.wer_tag.json"); const auto testFile = std::string{TEST_DATA} + "short.aligned.punc_case.nlp"; REQUIRE(compareFiles(nlp_output.c_str(), testFile.c_str()));