code: protected List<Term> decorateResultForIndexMode(List<Vertex> vertexList, WordNet wordNetAll)
      {
          List<Term> termList = new LinkedList<Term>();
          int line = 1;
          ListIterator<Vertex> listIterator = vertexList.listIterator();
          listIterator.next();
          int length = vertexList.size() - 2;
          for (int i = 0; i < length; ++i)
          {
              Vertex vertex = listIterator.next();
              Term termMain = convert(vertex);
              termList.add(termMain);
              termMain.offset = line - 1;
              if (vertex.realWord.length() > 2)
              {
                  // 过长词所在的行
                  int currentLine = line;
                  while (currentLine < line + vertex.realWord.length())
                  {
                      Iterator<Vertex> iterator = wordNetAll.descendingIterator(currentLine);// 这一行的词，逆序遍历保证字典序稳定地由大到小
                      while (iterator.hasNext())// 这一行的短词
                      {
                          Vertex smallVertex = iterator.next();
                          if (
                              ((termMain.nature == Nature.mq && smallVertex.hasNature(Nature.q)) ||
                                  smallVertex.realWord.length() >= config.indexMode)
                                  && smallVertex != vertex // 防止重复添加
                                  && currentLine + smallVertex.realWord.length() <= line + vertex.realWord.length() // 防止超出边界
                              )
                          {
                              listIterator.add(smallVertex);
                              Term termSub = convert(smallVertex);
                              termSub.offset = currentLine - 1;
                              termList.add(termSub);
                          }
                      }
                      ++currentLine;
                  }
              }
              line += vertex.realWord.length();
          }
  
          return termList;
      }
docs: 为了索引模式修饰结果
  
  @param vertexList
  @param wordNetAll