Убрал пустые предложения
This commit is contained in:
@@ -4,7 +4,7 @@ import Data.Char (isLetter, toLower)
|
|||||||
|
|
||||||
|
|
||||||
splitText :: String -> [[String]]
|
splitText :: String -> [[String]]
|
||||||
splitText text = map (processSentence . words) (splitSentences text)
|
splitText text = filter (not . null) $ map (processSentence . words) (splitSentences text)
|
||||||
where
|
where
|
||||||
splitSentences :: String -> [String]
|
splitSentences :: String -> [String]
|
||||||
splitSentences [] = []
|
splitSentences [] = []
|
||||||
|
|||||||
Reference in New Issue
Block a user