Fix line-by-line mode not working for BIO-F1
This commit is contained in:
parent
3e4978fdbf
commit
8d8ca7f4b1
@ -162,9 +162,9 @@ isPreprocessable CharMatch = True
|
||||
isPreprocessable MAP = False
|
||||
isPreprocessable LogLoss = False
|
||||
isPreprocessable Likelihood = False
|
||||
isPreprocessable BIOF1 = False
|
||||
isPreprocessable BIOF1Labels = False
|
||||
isPreprocessable BIOWeightedF1 = False
|
||||
isPreprocessable BIOF1 = True
|
||||
isPreprocessable BIOF1Labels = True
|
||||
isPreprocessable BIOWeightedF1 = True
|
||||
isPreprocessable TokenAccuracy = True
|
||||
isPreprocessable SegmentAccuracy = True
|
||||
isPreprocessable MAE = False
|
||||
|
@ -382,6 +382,8 @@ main = hspec $ do
|
||||
describe "Preprocessing operations" $ do
|
||||
it "F1 with preprocessing" $ do
|
||||
runGEvalTest "f1-with-preprocessing" `shouldReturnAlmost` 0.57142857142857
|
||||
it "BIO-F1 with preprocessing" $ do
|
||||
runGEvalTest "bio-f1-flags" `shouldReturnAlmost` 0.75
|
||||
it "Regexp substition" $ do
|
||||
runGEvalTest "accuracy-with-flags" `shouldReturnAlmost` 0.8
|
||||
let sampleChallenge = GEvalSpecification
|
||||
@ -895,7 +897,7 @@ extractVal (Left result) = do
|
||||
|
||||
runGEvalTest testName = do
|
||||
r <- runGEvalTestExtraOptions [] testName
|
||||
-- _ <- runGEvalTestExtraOptions ["--line-by-line", "-i", "expected.tsv"] testName
|
||||
-- _ <- runGEvalTestExtraOptions ["--line-by-line", "-i", "expected.tsv"] testName
|
||||
return r
|
||||
|
||||
runGEvalTestExtraOptions extraOptions testName = (runGEval ([
|
||||
|
3
test/bio-f1-flags/bio-f1-flags-solution/test-A/out.tsv
Normal file
3
test/bio-f1-flags/bio-f1-flags-solution/test-A/out.tsv
Normal file
@ -0,0 +1,3 @@
|
||||
foo bar
|
||||
bar
|
||||
foo
|
|
1
test/bio-f1-flags/bio-f1-flags/config.txt
Normal file
1
test/bio-f1-flags/bio-f1-flags/config.txt
Normal file
@ -0,0 +1 @@
|
||||
--metric BIO-F1:s<foo><B-FOO>s<bar><B-BAR>
|
3
test/bio-f1-flags/bio-f1-flags/test-A/expected.tsv
Normal file
3
test/bio-f1-flags/bio-f1-flags/test-A/expected.tsv
Normal file
@ -0,0 +1,3 @@
|
||||
foo bar
|
||||
foo
|
||||
foo
|
|
Loading…
Reference in New Issue
Block a user