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

[Phylo] Fix label list parsing

parent f5af597e
...@@ -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
then
str # String.length
>>> (\length -> String.splitAt (length - 1) str) >>> (\length -> String.splitAt (length - 1) str)
>>> (\{ before } -> String.splitAt 1 before) >>> (\{ before } -> String.splitAt 1 before)
>>> (\{ after } -> String.split (String.Pattern "|") after) >>> (\{ after } -> String.split (String.Pattern "|") after)
>>> map String.trim >>> 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