Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
nishchalb committed Apr 17, 2024
1 parent fced1d9 commit ed85997
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion test/data/short.aligned.case.nlp
Original file line number Diff line number Diff line change
Expand Up @@ -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|[]|[]||||
Expand Down
2 changes: 1 addition & 1 deletion test/data/short.aligned.punc.nlp
Original file line number Diff line number Diff line change
Expand Up @@ -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|[]|[]||||
Expand Down
2 changes: 1 addition & 1 deletion test/data/short.aligned.punc_case.nlp
Original file line number Diff line number Diff line change
Expand Up @@ -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|[]|[]||||
Expand Down
66 changes: 33 additions & 33 deletions test/data/short_punc.ref.nlp
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
token|speaker|ts|endTs|punctuation|case|tags
<crosstalk>|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
<crosstalk>|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|[]|[]
2 changes: 1 addition & 1 deletion test/fstalign_Test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
Expand Down

0 comments on commit ed85997

Please sign in to comment.