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 = ...@@ -486,12 +486,17 @@ stringedMaybeToNumber s =
-- | -- |
-- | To ["user", "sentiment analysis"] :: Array String -- | To ["user", "sentiment analysis"] :: Array String
stringedArrayToArray :: String -> Array String stringedArrayToArray :: String -> Array String
stringedArrayToArray str stringedArrayToArray str =
= str # String.length if String.contains (String.Pattern "\\\"") str
>>> (\length -> String.splitAt (length - 1) str) then
>>> (\{ before } -> String.splitAt 1 before) str # String.length
>>> (\{ after } -> String.split (String.Pattern "|") after) >>> (\length -> String.splitAt (length - 1) str)
>>> map String.trim >>> (\{ 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 -- | 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