docs: def load_subcat_info( subcat_lex_file ):
      ''' Loads subcategorization rules (for verbs and adpositions) from a text 
          file. 
          
          It is expected that the rules are given as pairs, where the first item is 
          the lemma (of verb/adposition), followed on the next line by the 
          subcategorization rule, in the following form: 
             on the left side of '>' is the condition (POS-tag requirement for the 
             lemma), 
           and 
             on the right side is the listing of subcategorization settings (hashtag 
             items, e.g. names of morphological cases of nominals);
          If there are multiple subcategorization rules to be associated with a
          single lemma, different rules are separated by '&'.
          
          Example, an excerpt from the rules file:
            läbi
            _V_ >#Part &_K_ post >#gen |#nom |#el &_K_ pre >#gen 
            läbista
            _V_ >#NGP-P 
            läbistu
            _V_ >#Intr 
  
          Returns a dict of lemma to a-list-of-subcatrules mappings.
      '''
      rules = {}
      nonSpacePattern = re.compile('^\S+$')
      posTagPattern   = re.compile('_._')
      in_f = codecs.open(subcat_lex_file, mode='r', encoding='utf-8')
      lemma = ''
      subcatRules = ''
      for line in in_f:
          line = line.rstrip()
          if nonSpacePattern.match(line) and not posTagPattern.search(line):
             lemma = line
          elif posTagPattern.search(line):
             subcatRules = line
          if len(lemma) > 0 and len(subcatRules) > 0:
             if lemma not in rules:
                rules[lemma] = []
             parts = subcatRules.split('&')
             for part in parts:
                part = part.strip()
                rules[lemma].append( part )
             lemma = ''
             subcatRules = ''
      in_f.close()
      #print( len(rules.keys()) )   # 4484
      return rules