code: def lch_similarity(self, synset):
          
  
          if self._raw_synset.pos != synset._raw_synset.pos:
              return None
  
          depth = MAX_TAXONOMY_DEPTHS[self._raw_synset.pos] 
  
          distance = self._shortest_path_distance(synset)      
  
          if distance >= 0: 
              return -math.log((distance + 1) / (2.0 * depth)) 
          else: 
              return None
docs: Calculates Leacock and Chodorow's similarity between the two synsets.
  
          Notes
          -----
            Similarity is calculated using the formula -log( (dist(synset1,synset2)+1) / (2*maximum taxonomy depth) ).
  
          Parameters
          ----------
            synset : Synset
          Synset from which the similarity is calculated.    
  
          Returns
          -------
            float
          Leacock and Chodorow's from `synset`.
          None, if synsets are not connected via hypernymy/hyponymy relations. Obvious, if part-of-speeches don't match.