txlyre hai 1 semana
pai
achega
75d4785f4b
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      markov.py

+ 2 - 2
markov.py

@@ -63,8 +63,8 @@ class Markov:
             "",
             text,
         )
-        text = list(self.nlp(text))
-        text = map(lambda word: word.strip(), text)
+        text = self.nlp(text)
+        text = map(lambda word: str(word).strip(), text)
         text = filter(bool, text)
         text = list(text)