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

+ 1 - 1
markov.py

@@ -45,7 +45,7 @@ class Markov:
 
         text = orig_init_state if orig_init_state is not None else ""
         for word in words:
-            if word in "-–—" or not all(c in string.punctuation for c in word):
+            if word in "-–—" or not all(c in string.punctuation or c == "…" for c in word):
                 text += " "
 
             text += word