code: private boolean isAcceptableCandidate(int targetLength, ViterbiNode glueBase, ViterbiNode candidate) {
          return (glueBase == null || candidate.getSurface().length() < glueBase.getSurface().length())
                          && candidate.getSurface().length() >= targetLength;
      }
docs: Check whether a candidate for a glue node is acceptable.
  The candidate should be as short as possible, but long enough to overlap with the inserted user entry
  
  @param targetLength
  @param glueBase
  @param candidate
  @return whether candidate is acceptable