Ejemplo n.º 1
0
 def check(self,word):
     """Check spelling of a word.
     
     This method takes a word in the dictionary language and returns
     True if it is correctly spelled, and false otherwise.
     """
     self._check_this()
     word = EnchantStr(word)
     val = _e.dict_check(self._this,word.encode())
     if val == 0:
         return True
     if val > 0:
         return False
     self._raise_error()
Ejemplo n.º 2
0
 def check(self, word):
     """Check spelling of a word.
     
     This method takes a word in the dictionary language and returns
     True if it is correctly spelled, and false otherwise.
     """
     self._check_this()
     word = EnchantStr(word)
     val = _e.dict_check(self._this, word.encode())
     if val == 0:
         return True
     if val > 0:
         return False
     self._raise_error()
Ejemplo n.º 3
0
    def check(self, word):
        """Check spelling of a word.

        This method takes a word in the dictionary language and returns
        True if it is correctly spelled, and false otherwise.
        """
        self._check_this()
        # Enchant asserts that the word is non-empty.
        # Check it up-front to avoid nasty warnings on stderr.
        if len(word) == 0:
            raise ValueError("can't check spelling of empty string")
        val = _e.dict_check(self._this, word.encode())
        if val == 0:
            return True
        if val > 0:
            return False
        self._raise_error()
Ejemplo n.º 4
0
 def check(self,word):
     """Check spelling of a word.
     
     This method takes a word in the dictionary language and returns
     True if it is correctly spelled, and false otherwise.
     """
     self._check_this()
     word = EnchantStr(word)
     # Enchant asserts that the word is non-empty.
     # Check it up-front to avoid nasty warnings on stderr.
     if len(word) == 0:
         raise ValueError("can't check spelling of empty string")
     val = _e.dict_check(self._this,word.encode())
     if val == 0:
         return True
     if val > 0:
         return False
     self._raise_error()