Убрал пустые предложения

This commit is contained in:
2024-12-09 14:47:22 +03:00
parent 1c7c0a0fd6
commit f92d91571a

View File

@@ -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 [] = []