Handle more than one possibility in TokenAccuracy
This commit is contained in:
parent
b2a0cd28f0
commit
9322307813
@ -1,5 +1,5 @@
|
|||||||
name: geval
|
name: geval
|
||||||
version: 1.10.0.0
|
version: 1.10.1.0
|
||||||
synopsis: Machine learning evaluation tools
|
synopsis: Machine learning evaluation tools
|
||||||
description: Please see README.md
|
description: Please see README.md
|
||||||
homepage: http://github.com/name/project
|
homepage: http://github.com/name/project
|
||||||
|
@ -703,7 +703,7 @@ gevalCore' TokenAccuracy _ = gevalCoreWithoutInput intoTokens
|
|||||||
matchFun :: (Int, Int) -> (Text, Text) -> (Int, Int)
|
matchFun :: (Int, Int) -> (Text, Text) -> (Int, Int)
|
||||||
matchFun (h, t) (e, o)
|
matchFun (h, t) (e, o)
|
||||||
| e == (pack "*") = (h, t)
|
| e == (pack "*") = (h, t)
|
||||||
| o == e = (h + 1, t + 1)
|
| o `Prelude.elem` (splitOn (pack ";") e) = (h + 1, t + 1)
|
||||||
| otherwise = (h, t + 1)
|
| otherwise = (h, t + 1)
|
||||||
hitsAndTotalsAgg = CC.foldl (\(h1, t1) (h2, t2) -> (h1 + h2, t1 + t2)) (0, 0)
|
hitsAndTotalsAgg = CC.foldl (\(h1, t1) (h2, t2) -> (h1 + h2, t1 + t2)) (0, 0)
|
||||||
|
|
||||||
|
@ -263,6 +263,10 @@ Get part of speech tags for each token
|
|||||||
This is a sample challenge for TokenAccuracy. We just
|
This is a sample challenge for TokenAccuracy. We just
|
||||||
count the accuracy per token and skip entries marked as "*"
|
count the accuracy per token and skip entries marked as "*"
|
||||||
in the expected file.
|
in the expected file.
|
||||||
|
|
||||||
|
More than one option separated with semicolons can be given
|
||||||
|
in the expected file (but not in the output file).
|
||||||
|
|
||||||
|] ++ (commonReadmeMDContents testName)
|
|] ++ (commonReadmeMDContents testName)
|
||||||
|
|
||||||
readmeMDContents (MultiLabelFMeasure beta) testName = [i|
|
readmeMDContents (MultiLabelFMeasure beta) testName = [i|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
foo * * bar
|
qqqq;foo * * bar
|
||||||
baz
|
baz
|
||||||
foo bar baz
|
foo bar baz
|
||||||
|
|
Loading…
Reference in New Issue
Block a user