def _try_tokenizer(modName):
"""Look for a tokenizer in the named module.
Returns the function if found, None otherwise.
"""
modBase = "enchant.tokenize."
funcName = "tokenize"
modName = modBase + modName
try:
mod = __import__(modName,globals(),{},funcName)
return getattr(mod,funcName)
except ImportError:
return None
评论列表
文章目录