Esempio n. 1
0
 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
Esempio n. 2
0
 def validate(self, tweet):
     clean = wordtools.clean(tweet)
     syllableCount = wordtools.syllableCount(clean)
     if syllableCount == 7 or syllableCount == 5:
         return [syllableCount, tweet]
     else:
         return None
Esempio n. 3
0
	def validate(self,tweet):
		clean = wordtools.clean(tweet)
		syllableCount = wordtools.syllableCount(clean)
		if syllableCount==7 or syllableCount==5:
			return [syllableCount, tweet]
		else:
			return None
Esempio n. 4
0
	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
Esempio n. 5
0
 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
Esempio n. 6
0
	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
Esempio n. 7
0
	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
Esempio n. 10
0
	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
Esempio n. 11
0
 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
Esempio n. 12
0
	def readTweet(self, tweet):
		clean = wordtools.clean(tweet)
		syl = wordtools.syllableCount(clean)
		if syl>0:
			self.data = tweet
Esempio n. 13
0
 def validate(self, tweet):
     clean = wordtools.clean(tweet)
     syl = wordtools.syllableCount(clean)
     if syl > 0:
         return tweet
     return None