Commit 1b0e28bd authored by Karen Konou's avatar Karen Konou

[Phylo] Fix label list parsing

parent f5af597e
Pipeline #6029 failed with stage
in 8 minutes and 46 seconds
......@@ -486,12 +486,17 @@ stringedMaybeToNumber s =
-- |
-- | To ["user", "sentiment analysis"] :: Array String
stringedArrayToArray :: String -> Array String
stringedArrayToArray str
= str # String.length
>>> (\length -> String.splitAt (length - 1) str)
>>> (\{ before } -> String.splitAt 1 before)
>>> (\{ after } -> String.split (String.Pattern "|") after)
>>> map String.trim
stringedArrayToArray str =
if String.contains (String.Pattern "\\\"") str
then
str # String.length
>>> (\length -> String.splitAt (length - 1) str)
>>> (\{ before } -> String.splitAt 1 before)
>>> (\{ after } -> String.split (String.Pattern "|") after)
>>> map String.trim
else
str # String.split (String.Pattern "|")
>>> map String.trim
-- | From "\"97 | 257 | 542 | 574 | 577 | 597 | 785\"" :: String
-- |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment