Bug 310099 - simonmodeltest does hot handle deletion errors correctly
Summary: simonmodeltest does hot handle deletion errors correctly
Status: RESOLVED FIXED
Alias: None
Product: simon
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Peter Grasch
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-14 16:06 UTC by Peter Grasch
Modified: 2012-11-14 16:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Grasch 2012-11-14 16:06:19 UTC
Deletion errors are sometimes assigned 1 deletion error *and* 1 insertion error.
Comment 1 Peter Grasch 2012-11-14 16:30:04 UTC
Git commit f4cde5200e81623a814d99f2e064db3fde02bc5c by Peter Grasch.
Committed on 14/11/2012 at 17:23.
Pushed by grasch into branch 'master'.

Bugfixing the calculation of deletion errors

Deletion errors are internally represented as notes that carry the label
of the word that is not present in the result and have the "deletion"
flag set.

While analyzing the a recognition result (in simonmodeltest) these
leaves were inserted at the end of the list of result nodes of the test
sample while processing it. This caused the algorithm to count them
again - this time as insertion errors - when it encountered the new,
trailing nodes.

Example:
Prompt: Foo Bar
Result: Bar
Algorithm:
0. Nodes: {Bar}
1. i = 0; Foo is missing, Bar is okay -> Nodes: {Bar[Okay], Foo[Deletion]}
2. i = 1; Foo at the end is too much -> Nodes {Bar[Okay], Foo[Insertion,
Deletion]}
2. i = 2; Done

After the fix:
0. Nodes: {Bar}
1. i = 0; Foo is missing, Bar is okay -> Nodes: {Foo[Deletion], Bar[Okay]}
          i = 2
2. i = 2; Done

M  +6    -3    simonlib/simonmodeltest/testresult.cpp
M  +1    -1    simonlib/simonmodeltest/testresult.h

http://commits.kde.org/simon/f4cde5200e81623a814d99f2e064db3fde02bc5c