mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-24 12:12:36 -06:00
Fix upper case sequence list
This commit is contained in:
parent
a4708291ac
commit
7046c641ae
1 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,7 @@ class WhiteList:
|
||||||
self.sequenceList = sequences
|
self.sequenceList = sequences
|
||||||
|
|
||||||
def getSequenceList(self, word):
|
def getSequenceList(self, word):
|
||||||
return self.sequenceList[word] if word in self.sequenceList else None
|
return self.sequenceList[word] if word and word in self.sequenceList else None
|
||||||
|
|
||||||
def cleanText(self, text):
|
def cleanText(self, text):
|
||||||
return text.strip('.,?!').lower()
|
return text.strip('.,?!').lower()
|
||||||
|
@ -70,7 +70,7 @@ class WhiteList:
|
||||||
sequence = sequences[sequenceNum].split()
|
sequence = sequences[sequenceNum].split()
|
||||||
total = wordNum + len(sequence) + 1
|
total = wordNum + len(sequence) + 1
|
||||||
|
|
||||||
if total <= len(words) and sequence == words[wordNum + 1:total]:
|
if total <= len(words) and sequence == [word.lower() for word in words[wordNum + 1:total]]:
|
||||||
words[wordNum:total] = self.getReplacement(' '.join(words[wordNum:total]), av, garbler).split()
|
words[wordNum:total] = self.getReplacement(' '.join(words[wordNum:total]), av, garbler).split()
|
||||||
|
|
||||||
return ' '.join(words)
|
return ' '.join(words)
|
||||||
|
|
Loading…
Reference in a new issue