Index: graphspell-js/ibdawg.js ================================================================== --- graphspell-js/ibdawg.js +++ graphspell-js/ibdawg.js @@ -223,10 +223,13 @@ if (sToken.gl_count("-") > 4) { return true; } return sToken.split("-").every(sWord => this.isValid(sWord)); } + if (sToken.includes("·")) { + return true; + } return false; } isValid (sWord) { // checks if sWord is valid (different casing tested if the first letter is a capital) @@ -237,13 +240,10 @@ sWord = sWord.replace("’", "'"); } if (this.lookup(sWord)) { return true; } - if (sWord.gl_isDigit()) { - return true; - } if (sWord.charAt(0).gl_isUpperCase()) { if (sWord.length > 1) { if (sWord.gl_isTitle()) { return !!this.lookup(sWord.toLowerCase()); } @@ -255,10 +255,13 @@ } return !!this.lookup(sWord.slice(0, 1).toLowerCase() + sWord.slice(1)); } else { return !!this.lookup(sWord.toLowerCase()); } + } + if (sWord.slice(0,1).gl_isDigit()) { + return true; } return false; } _convBytesToInteger (aBytes) { Index: graphspell/ibdawg.py ================================================================== --- graphspell/ibdawg.py +++ graphspell/ibdawg.py @@ -230,10 +230,12 @@ return True if "-" in sToken: if sToken.count("-") > 4: return True return all(self.isValid(sWord) for sWord in sToken.split("-")) + if "·" in sWord: + return True return False def isValid (self, sWord): "checks if is valid (different casing tested if the first letter is a capital)" if not sWord: @@ -240,12 +242,10 @@ return None if "’" in sWord: # ugly hack sWord = sWord.replace("’", "'") if self.lookup(sWord): return True - if sWord.isdigit(): - return True if sWord[0:1].isupper(): if len(sWord) > 1: if sWord.istitle(): return self.lookup(sWord.lower()) if sWord.isupper(): @@ -253,10 +253,12 @@ return True return self.lookup(sWord.lower()) or self.lookup(sWord.capitalize()) return self.lookup(sWord[:1].lower() + sWord[1:]) else: return self.lookup(sWord.lower()) + if sWord[0:1].isdigit(): + return True return False def lookup (self, sWord): "returns True if in dictionary (strict verification)" iAddr = 0