Fixed small issue with dicts
This commit is contained in:
		@@ -74,8 +74,6 @@ class SpellChecker(object):
 | 
			
		||||
			if len(suggestions) == 0:
 | 
			
		||||
				continue
 | 
			
		||||
			for s in suggestions:
 | 
			
		||||
				print(s.term)
 | 
			
		||||
				print(s.distance)
 | 
			
		||||
				if s.distance == 0:
 | 
			
		||||
					valid_word = False
 | 
			
		||||
			if valid_word == False:
 | 
			
		||||
@@ -90,8 +88,6 @@ class SpellChecker(object):
 | 
			
		||||
			else:
 | 
			
		||||
				context = " ".join(self.transformed_words[word-5:word+5])
 | 
			
		||||
			self.word_index = word
 | 
			
		||||
#			print(self.word)
 | 
			
		||||
#			print(suggestions[0].distance)
 | 
			
		||||
			yield (suggestions, context, word)
 | 
			
		||||
 | 
			
		||||
	def replace(self, suggestion):
 | 
			
		||||
 
 | 
			
		||||
@@ -19,7 +19,7 @@ class spellChecker(object):
 | 
			
		||||
		self.checker = checker.SpellChecker()
 | 
			
		||||
		log.debug("Using language: %s" % (languageHandler.getLanguage(),))
 | 
			
		||||
		try:
 | 
			
		||||
			self.checker.set_language(languageHandler.curLang)
 | 
			
		||||
			self.checker.set_language(languageHandler.curLang::2])
 | 
			
		||||
		except ValueError:
 | 
			
		||||
			log.exception("Dictionary for language %s not found." % (languageHandler.curLang,))
 | 
			
		||||
			wx_ui.dict_not_found_error()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user