txlyre 1 week ago
parent
commit
e00987070b
1 changed files with 1 additions and 1 deletions
  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