unidecode markov blabbers

neu
Tomáš Mládek 2019-12-17 13:31:55 +01:00
parent 902a49dcb2
commit 6311672c9e
3 changed files with 6 additions and 4 deletions

View File

@ -28,6 +28,7 @@ import telegram
import youtube_dl
from mutagen.easyid3 import EasyID3
from telegram.ext import Updater, CommandHandler, MessageHandler
from unidecode import unidecode
from youtube_dl import DownloadError
from youtube_dl.version import __version__ as YTDL_VERSION
@ -760,7 +761,7 @@ class MarkovBlabberer:
with open(filepath) as f:
text = f.read()
self.markov = markovify.NewlineText(text.lower())
self.markov = markovify.NewlineText(unidecode(text.lower()))
self.logger.info("Sentence of the day: " + self.make_sentence())
def make_sentence(self, tries=100):

View File

@ -5,4 +5,5 @@ filetype
mutagen
pyacoustid
pytumblr
markovify
markovify
unidecode

View File

@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --upgrade
# pip-compile
#
asn1crypto==0.24.0 # via cryptography
audioread==2.1.8 # via pyacoustid
@ -23,6 +23,6 @@ pytumblr==0.0.8
requests-oauthlib==1.2.0 # via pytumblr
requests==2.22.0
six==1.12.0 # via cryptography
unidecode==1.0.23 # via markovify
unidecode==1.0.23
urllib3==1.25.3 # via requests
youtube-dl==2019.5.20