Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
nishchalb committed Apr 17, 2024
1 parent 7f8fae1 commit 666057e
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 53 deletions.
110 changes: 58 additions & 52 deletions test/data/short.sbs.txt
Original file line number Diff line number Diff line change
@@ -1,76 +1,79 @@
ref_token hyp_token IsErr Class Wer_Tag_Entities
<crosstalk> <crosstalk>
yeah yeah
, <del> ERR
Yeah Yeah
, ,
yeah <del> ERR
, <del> ERR
right right
. <del> ERR
yeah <del> ERR
Yeah <del> ERR
, <del> ERR
all <del> ERR
right <del> ERR
, i'll ERR
, I'll ERR
probably do ERR
just just
that that
. <del> ERR
are are
. ? ERR
Are Are
there there
any any
visuals visuals
that that
come come
to to
mind mind
or or
yeah yeah
, <del> ERR
or or ___100002_SYN_1-1___
<ins> ? ERR
Yeah Yeah
, ,
sure sure
. <del> ERR
when when
i i
. .
When When
I I
hear hear
foobar foobar ###1_PROPER_NOUN###|###2_SPACY>ORG###|
, <del> ERR
i i
Foobar Foobar ###1_PROPER_NOUN###|###2_SPACY>ORG###|
, ,
I I
think think
about about
just just
that that
: <del> ERR
foo foobar ERR
: :
<ins> Foobar ERR
foo , ERR
a a
------------------------------------------------------------
Line Group
4 , yeah , <-> ***
8 . yeah , all right , probably <-> i'll do
17 . <-> ***
28 , <-> ***
30 . <-> ***
35 , <-> ***
41 : foo <-> foobar
5 yeah , <-> ***
8 . Yeah , all right , probably <-> I'll do
17 . <-> ?
27 *** <-> ?
43 foo <-> Foobar ,
------------------------------------------------------------
Unigram Prec. Recall
, 0/0 (0.0 %) 0/6 (0.0 %)
. 0/0 (0.0 %) 0/3 (0.0 %)
: 0/0 (0.0 %) 0/1 (0.0 %)
? 0/2 (0.0 %) 0/0 (0.0 %)
I'll 0/1 (0.0 %) 0/0 (0.0 %)
all 0/0 (0.0 %) 0/1 (0.0 %)
do 0/1 (0.0 %) 0/0 (0.0 %)
foo 0/0 (0.0 %) 0/1 (0.0 %)
i'll 0/1 (0.0 %) 0/0 (0.0 %)
probably 0/0 (0.0 %) 0/1 (0.0 %)
foobar 1/2 (50.0 %) 1/1 (100.0 %)
yeah 0/0 (0.0 %) 0/1 (0.0 %)
Foobar 1/2 (50.0 %) 1/1 (100.0 %)
, 3/4 (75.0 %) 3/6 (50.0 %)
. 1/1 (100.0 %) 1/3 (33.3 %)
right 1/1 (100.0 %) 1/2 (50.0 %)
yeah 2/2 (100.0 %) 2/4 (50.0 %)
Yeah 2/2 (100.0 %) 2/3 (66.7 %)
: 1/1 (100.0 %) 1/1 (100.0 %)
<crosstalk> 1/1 (100.0 %) 1/1 (100.0 %)
Are 1/1 (100.0 %) 1/1 (100.0 %)
I 2/2 (100.0 %) 2/2 (100.0 %)
When 1/1 (100.0 %) 1/1 (100.0 %)
a 1/1 (100.0 %) 1/1 (100.0 %)
about 1/1 (100.0 %) 1/1 (100.0 %)
any 1/1 (100.0 %) 1/1 (100.0 %)
are 1/1 (100.0 %) 1/1 (100.0 %)
come 1/1 (100.0 %) 1/1 (100.0 %)
hear 1/1 (100.0 %) 1/1 (100.0 %)
i 2/2 (100.0 %) 2/2 (100.0 %)
just 2/2 (100.0 %) 2/2 (100.0 %)
mind 1/1 (100.0 %) 1/1 (100.0 %)
or 1/1 (100.0 %) 1/1 (100.0 %)
Expand All @@ -80,46 +83,49 @@
think 1/1 (100.0 %) 1/1 (100.0 %)
to 1/1 (100.0 %) 1/1 (100.0 %)
visuals 1/1 (100.0 %) 1/1 (100.0 %)
when 1/1 (100.0 %) 1/1 (100.0 %)
------------------------------------------------------------
Bigram Precision Recall
, a 0/1 (0.0 %) 0/0 (0.0 %)
, all 0/0 (0.0 %) 0/1 (0.0 %)
, i 0/0 (0.0 %) 0/1 (0.0 %)
, probably 0/0 (0.0 %) 0/1 (0.0 %)
, right 0/0 (0.0 %) 0/1 (0.0 %)
, sure 0/0 (0.0 %) 0/1 (0.0 %)
, yeah 0/0 (0.0 %) 0/1 (0.0 %)
. are 0/0 (0.0 %) 0/1 (0.0 %)
. when 0/0 (0.0 %) 0/1 (0.0 %)
. yeah 0/0 (0.0 %) 0/1 (0.0 %)
: foo 0/0 (0.0 %) 0/1 (0.0 %)
. Are 0/0 (0.0 %) 0/1 (0.0 %)
. Yeah 0/0 (0.0 %) 0/1 (0.0 %)
: Foobar 0/1 (0.0 %) 0/0 (0.0 %)
? Are 0/1 (0.0 %) 0/0 (0.0 %)
? Yeah 0/1 (0.0 %) 0/0 (0.0 %)
I'll do 0/1 (0.0 %) 0/0 (0.0 %)
all right 0/0 (0.0 %) 0/1 (0.0 %)
do just 0/1 (0.0 %) 0/0 (0.0 %)
foo a 0/0 (0.0 %) 0/1 (0.0 %)
foobar , 0/0 (0.0 %) 0/1 (0.0 %)
foobar a 0/1 (0.0 %) 0/0 (0.0 %)
i'll do 0/1 (0.0 %) 0/0 (0.0 %)
or ? 0/1 (0.0 %) 0/0 (0.0 %)
probably just 0/0 (0.0 %) 0/1 (0.0 %)
right , 0/0 (0.0 %) 0/1 (0.0 %)
right . 0/0 (0.0 %) 0/1 (0.0 %)
sure . 0/0 (0.0 %) 0/1 (0.0 %)
that . 0/0 (0.0 %) 0/1 (0.0 %)
that : 0/0 (0.0 %) 0/1 (0.0 %)
yeah , 0/0 (0.0 %) 0/4 (0.0 %)
<crosstalk> yeah 1/1 (100.0 %) 1/1 (100.0 %)
that ? 0/1 (0.0 %) 0/0 (0.0 %)
yeah , 0/0 (0.0 %) 0/1 (0.0 %)
Foobar , 1/2 (50.0 %) 1/1 (100.0 %)
Yeah , 2/2 (100.0 %) 2/3 (66.7 %)
, I 1/1 (100.0 %) 1/1 (100.0 %)
, sure 1/1 (100.0 %) 1/1 (100.0 %)
. When 1/1 (100.0 %) 1/1 (100.0 %)
<crosstalk> Yeah 1/1 (100.0 %) 1/1 (100.0 %)
Are there 1/1 (100.0 %) 1/1 (100.0 %)
I hear 1/1 (100.0 %) 1/1 (100.0 %)
I think 1/1 (100.0 %) 1/1 (100.0 %)
When I 1/1 (100.0 %) 1/1 (100.0 %)
about just 1/1 (100.0 %) 1/1 (100.0 %)
any visuals 1/1 (100.0 %) 1/1 (100.0 %)
are there 1/1 (100.0 %) 1/1 (100.0 %)
come to 1/1 (100.0 %) 1/1 (100.0 %)
hear foobar 1/1 (100.0 %) 1/1 (100.0 %)
i hear 1/1 (100.0 %) 1/1 (100.0 %)
i think 1/1 (100.0 %) 1/1 (100.0 %)
hear Foobar 1/1 (100.0 %) 1/1 (100.0 %)
just that 2/2 (100.0 %) 2/2 (100.0 %)
mind or 1/1 (100.0 %) 1/1 (100.0 %)
or yeah 1/1 (100.0 %) 1/1 (100.0 %)
sure . 1/1 (100.0 %) 1/1 (100.0 %)
that : 1/1 (100.0 %) 1/1 (100.0 %)
that come 1/1 (100.0 %) 1/1 (100.0 %)
there any 1/1 (100.0 %) 1/1 (100.0 %)
think about 1/1 (100.0 %) 1/1 (100.0 %)
to mind 1/1 (100.0 %) 1/1 (100.0 %)
visuals that 1/1 (100.0 %) 1/1 (100.0 %)
when i 1/1 (100.0 %) 1/1 (100.0 %)
3 changes: 2 additions & 1 deletion test/fstalign_Test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,9 @@ TEST_CASE_METHOD(UniqueTestsFixture, "main-adapted-composition()") {
}

SECTION("NLP Hypothesis: wer with case and punctuation(nlp output)") {
const auto wer_sidecar_path = TEST_DATA + "short_punc.wer_tag.json";
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 --wer-sidecar short_punc.wer_tag.json");
exec(command("wer", approach, "short_punc.ref.nlp", "short_punc.hyp.nlp", sbs_output, nlp_output, TEST_SYNONYMS)+" --use-punctuation --use-case --wer-sidecar " + wer_sidecar_path);
const auto testFile = std::string{TEST_DATA} + "short.aligned.punc_case.nlp";
const auto testSbsFile = std::string{TEST_DATA} + "short.sbs.txt";

Expand Down

0 comments on commit 666057e

Please sign in to comment.