def readTweet(self, tweet): cleaned = wordtools.clean(tweet) syllableCount = wordtools.syllableCount(cleaned) if syllableCount > 0 and syllableCount < 20: rhyme = wordtools.getRhyme(cleaned[-1]) if rhyme == self.testRhyme: self.data = tweet
def validate(self, tweet): clean = wordtools.clean(tweet) syllableCount = wordtools.syllableCount(clean) if syllableCount == 7 or syllableCount == 5: return [syllableCount, tweet] else: return None
def validate(self,tweet): clean = wordtools.clean(tweet) syllableCount = wordtools.syllableCount(clean) if syllableCount==7 or syllableCount==5: return [syllableCount, tweet] else: return None
def validate(self,tweet): clean = wordtools.clean(tweet) syllableCount = wordtools.syllableCount(clean) if syllableCount==7 or syllableCount==5: return {self.syllables:syllableCount, self.text:tweet} else: return None
def validate(self, tweet): clean = wordtools.clean(tweet) syllableCount = wordtools.syllableCount(clean) if syllableCount == 7 or syllableCount == 5: return {self.syllables: syllableCount, self.text: tweet} else: return None
def validate(self,tweet): clean = wordtools.clean(tweet) syl = wordtools.syllableCount(clean) if syl>0: rhyme = wordtools.getRhyme(clean[-1]) if rhyme!= None: return {self.rhyme:rhyme,self.syllables:syl,self.clean:clean,self.text:tweet} return None
def validate(self,tweet): clean = wordtools.clean(tweet) syllableCount = wordtools.syllableCount(clean) if syllableCount==9 or syllableCount==6: rhyme = wordtools.getRhyme(clean[-1]) if rhyme!=None: return (syllableCount, rhyme, clean, tweet) return None
def validate(self,tweet): clean = wordtools.clean(tweet) syl = wordtools.syllableCount(clean) if syl>0: rhyme = wordtools.getRhyme(clean[-1]) if rhyme!= None: return [rhyme,syl,clean,tweet] return None
def validate(self, tweet): clean = wordtools.clean(tweet) syl = wordtools.syllableCount(clean) if syl > 0: rhyme = wordtools.getRhyme(clean[-1]) if rhyme != None: return [rhyme, syl, clean, tweet] return None
def validate(self, tweet): clean = wordtools.clean(tweet) syl = wordtools.syllableCount(clean) if syl > 3 and syl < 20: rhyme = wordtools.getRhyme(clean[-1]) if rhyme != None: return { self.rhyme: rhyme, self.syllables: syl, self.clean: clean, self.text: tweet } return None
def readTweet(self, tweet): clean = wordtools.clean(tweet) syl = wordtools.syllableCount(clean) if syl>0: self.data = tweet
def validate(self, tweet): clean = wordtools.clean(tweet) syl = wordtools.syllableCount(clean) if syl > 0: return tweet return None