def __init__(self): try: prefix = os.path.dirname(__file__) self.filename = os.path.join( prefix, 'genia_cache' ) self.cache = load_pickled_obj(self.filename) except IOError: self.cache = {}
def __init__(self): try: UmlsCache.filename = os.path.join(umls_tables, 'umls_cache') UmlsCache.cache = load_pickled_obj(UmlsCache.filename) except IOError: UmlsCache.cache = {}
def __init__(self): try: prefix = os.environ['CLINER_DIR'] self.filename = os.path.join(prefix, 'umls_tables/umls_cache') self.cache = load_pickled_obj(self.filename) except IOError: self.cache = {}
def __init__(self): try: prefix = os.environ['CLINER_DIR'] self.filename = os.path.join( prefix, 'umls_tables/umls_cache' ) self.cache = load_pickled_obj(self.filename) except IOError: self.cache = {}
def __init__(self): # Ensure cache dir exists cache_dir = os.path.join(os.getenv('CLINER_DIR'), 'caches') helper.mkpath(cache_dir) # Read data self.filename = os.path.join(cache_dir, 'url.cache') try: self.cache = load_pickled_obj(self.filename) except IOError: self.cache = {} self.new = {}