Markov: don't crash when learning a sentence that's only whitespace
This commit is contained in:
		
							parent
							
								
									c17623bcf6
								
							
						
					
					
						commit
						2b8f0d2843
					
				| @ -187,6 +187,9 @@ class Markov(Module): | ||||
|         k2 = self.start2 | ||||
| 
 | ||||
|         words = line.split() | ||||
|         if len(words) <= 0: | ||||
|             return line | ||||
| 
 | ||||
|         self.starts.append(words[0]) | ||||
| 
 | ||||
|         try: | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user