underscores can be used in the BIO format
This commit is contained in:
parent
3f7384f467
commit
65e8d2562e
@ -93,7 +93,7 @@ bioLabelParser =
|
||||
(string "O" *> pure Outside) <|>
|
||||
(do
|
||||
labelType <- bioMarkerParser
|
||||
string "-"
|
||||
(string "-" <|> string "_")
|
||||
label <- takeWhile1 (\c -> not (isSpace c) && c /= '/')
|
||||
normalized <- (do
|
||||
string "/"
|
||||
|
@ -259,6 +259,8 @@ main = hspec $ do
|
||||
runGEvalTest "bio-f1-complex" `shouldReturnAlmost` 0.625
|
||||
it "calculate F1" $ do
|
||||
runGEvalTest "bio-f1-simple" `shouldReturnAlmost` 0.5
|
||||
it "calculate F1 with underscores rather than minus signs" $ do
|
||||
runGEvalTest "bio-f1-simple-underscores" `shouldReturnAlmost` 0.5
|
||||
it "check perfect score" $ do
|
||||
runGEvalTest "bio-f1-perfect" `shouldReturnAlmost` 1.0
|
||||
it "check inconsistent input" $ do
|
||||
|
@ -0,0 +1,3 @@
|
||||
O O B_city/POZNAŃ O O B_date/MARCH I_date/12
|
||||
B_city/BUK O O O
|
||||
B_name/FOO O B_surname/KOWALSKI
|
|
@ -0,0 +1 @@
|
||||
--metric BIO-F1
|
@ -0,0 +1,3 @@
|
||||
O O B_city/POZNAŃ O O B_date/MARCH I_date/12
|
||||
O O O O
|
||||
O B_city/KONIN O
|
|
Loading…
Reference in New Issue
Block a user