274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
|
if "." in sToken or "·" in sToken:
return True
return False
def isValid (self, sWord):
"checks if <sWord> is valid (different casing tested if the first letter is a capital)"
if not sWord:
return None
if "'" in sWord: # ugly hack
sWord = sWord.replace("'", "’")
if self.lookup(sWord):
return True
if sWord[0:1].isupper():
if len(sWord) > 1:
if sWord.istitle():
|
|
|
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
|
if "." in sToken or "·" in sToken:
return True
return False
def isValid (self, sWord):
"checks if <sWord> is valid (different casing tested if the first letter is a capital)"
if not sWord:
return True
if "'" in sWord: # ugly hack
sWord = sWord.replace("'", "’")
if self.lookup(sWord):
return True
if sWord[0:1].isupper():
if len(sWord) > 1:
if sWord.istitle():
|