docs: private void repairBrokenLatticeAfter(ViterbiLattice lattice, int nodeEndIndex) {
          ViterbiNode[][] nodeEndIndices = lattice.getEndIndexArr();
  
          for (int endIndex = nodeEndIndex + 1; endIndex < nodeEndIndices.length; endIndex++) {
              if (nodeEndIndices[endIndex] != null) {
                  ViterbiNode glueBase = findGlueNodeCandidate(nodeEndIndex, nodeEndIndices[endIndex], endIndex);
                  if (glueBase != null) {
                      int delta = endIndex - nodeEndIndex;
                      String glueBaseSurface = glueBase.getSurface();
                      String surface = glueBaseSurface.substring(glueBaseSurface.length() - delta);
                      ViterbiNode glueNode = createGlueNode(nodeEndIndex, glueBase, surface);
                      lattice.addNode(glueNode, nodeEndIndex, nodeEndIndex + glueNode.getSurface().length());
                      return;
                  }
              }
          }
      }