code: public int getDimension(DependencyPath path) {
          String endToken = path.last().word();
  
          // Extract out how the current word is related to the last word in the
          // path.  
          String relation = path.getRelation(path.length() - 1);
          return getDimensionInternal(endToken + "+" + relation);
      }
docs: Returns the dimension number corresponding to the term at the end of the
  provided path.
  
  @param path a path whose end represents a semantic connection
  
  @return the dimension for the occurrence of the last word in the path