def val_load(db):
 dbname = (db + u'.db')
 if (not os.access(dbname, os.R_OK)):
  sys.exit((u'Cannot read file: %s' % dbname))
 else:
  db_in = shelve.open(db)
  from nltk.sem import Valuation
  val = Valuation(db_in)
  return val

def val_load ( db ) : dbname = ( db + u'.db' ) if ( not os . access ( dbname , os . R_OK ) ) : sys . exit ( ( u'Cannot read file: %s' % dbname ) ) else : db_in = shelve . open ( db ) from nltk . sem import Valuation val = Valuation ( db_in ) return val
load a valuation from a persistent database .