def _lcs_ic(synset1, synset2, ic, verbose=False):
 if (synset1._pos != synset2._pos):
  raise WordNetError((u'Computing the least common subsumer requires ' + (u'%s and %s to have the same part of speech.' % (synset1, synset2))))
 ic1 = information_content(synset1, ic)
 ic2 = information_content(synset2, ic)
 subsumers = synset1.common_hypernyms(synset2)
 if (len(subsumers) == 0):
  subsumer_ic = 0
 else:
  subsumer_ic = max((information_content(s, ic) for s in subsumers))
 if verbose:
  print(u'> LCS Subsumer by content:', subsumer_ic)
 return (ic1, ic2, subsumer_ic)

def _lcs_ic ( synset1 , synset2 , ic , verbose = False ) : if ( synset1 . _pos != synset2 . _pos ) : raise WordNetError ( ( u'Computing the least common subsumer requires ' + ( u'%s and %s to have the same part of speech.' % ( synset1 , synset2 ) ) ) ) ic1 = information_content ( synset1 , ic ) ic2 = information_content ( synset2 , ic ) subsumers = synset1 . common_hypernyms ( synset2 ) if ( len ( subsumers ) == 0 ) : subsumer_ic = 0 else : subsumer_ic = max ( ( information_content ( s , ic ) for s in subsumers ) ) if verbose : print ( u'> LCS Subsumer by content:' , subsumer_ic ) return ( ic1 , ic2 , subsumer_ic )
get the information content of the least common subsumer that has the highest information content value .