docs: def _detectKsubcatRelType( sentence, i, kSubCatRelsLexicon ):
      ''' Given the adposition appearing in the sentence at the location i,
          checks whether the adposition appears in the kSubCatRelsLexicon, 
          and if so, attempts to further detect whether the adposition is a 
          preposition or a postposition;
           Returns a tuple (string, int), where the first item indicates the
          type of adposition ('pre', 'post', '_'), and the second item points
          to its possible child (index of the word in sentence, or -1, if 
          possible child was not detected from close range);
      ''' 
      curToken = sentence[i]
      root = curToken[ANALYSIS][0][ROOT]
      if root in kSubCatRelsLexicon:
          for [postPre, fpattern] in kSubCatRelsLexicon[root]:
              if postPre == 'post' and i-1 > -1:
                  lastTokenAnalysis = sentence[i-1][ANALYSIS][0]
                  if re.match(fpattern, lastTokenAnalysis[FORM]):
                      return ('post', i-1)
              elif postPre == 'pre' and i+1 < len(sentence):
                  nextTokenAnalysis = sentence[i+1][ANALYSIS][0]
                  if re.match(fpattern, nextTokenAnalysis[FORM]):
                      return ('pre', i+1)
          # If the word is not ambiguous between pre and post, but
          # the possible child was not detected, return only the
          # post/pre label:
          if len(kSubCatRelsLexicon[root]) == 1:
              return (kSubCatRelsLexicon[root][0][0], -1)
      return ('_', -1)