def make_valuation(concepts, read=False, lexicon=False):
 vals = []
 for c in concepts:
  vals.append((c.prefLabel, c.extension))
 if lexicon:
  read = True
 if read:
  from nltk.sem import Valuation
  val = Valuation({})
  val.update(vals)
  val = label_indivs(val, lexicon=lexicon)
  return val
 else:
  return vals

def make_valuation ( concepts , read = False , lexicon = False ) : vals = [ ] for c in concepts : vals . append ( ( c . prefLabel , c . extension ) ) if lexicon : read = True if read : from nltk . sem import Valuation val = Valuation ( { } ) val . update ( vals ) val = label_indivs ( val , lexicon = lexicon ) return val else : return vals
convert a list of concept objects into a list of pairs; optionally create a valuation object .