code: public List<List<Vertex>> biSegment(char[] sSentence, int nKind, WordNet wordNetOptimum, WordNet wordNetAll)
      {
          List<List<Vertex>> coarseResult = new LinkedList<List<Vertex>>();
          ////////////////生成词网////////////////////
          generateWordNet(wordNetAll);
  //        logger.trace("词网大小：" + wordNetAll.size());
  //        logger.trace("打印词网：\n" + wordNetAll);
          ///////////////生成词图////////////////////
          Graph graph = generateBiGraph(wordNetAll);
  //        logger.trace(graph.toString());
          if (HanLP.Config.DEBUG)
          {
              System.out.printf("打印词图：%s\n", graph.printByTo());
          }
          ///////////////N-最短路径////////////////////
          NShortPath nShortPath = new NShortPath(graph, nKind);
          List<int[]> spResult = nShortPath.getNPaths(nKind * 2);
          if (spResult.size() == 0)
          {
              throw new RuntimeException(nKind + "-最短路径求解失败，请检查上面的词网是否存在负圈或悬孤节点");
          }
  //        logger.trace(nKind + "-最短路径");
  //        for (int[] path : spResult)
  //        {
  //            logger.trace(Graph.parseResult(graph.parsePath(path)));
  //        }
          //////////////日期、数字合并策略
          for (int[] path : spResult)
          {
              List<Vertex> vertexes = graph.parsePath(path);
              generateWord(vertexes, wordNetOptimum);
              coarseResult.add(vertexes);
          }
          return coarseResult;
      }
docs: 二元语言模型分词
  @param sSentence 待分词的句子
  @param nKind     需要几个结果
  @param wordNetOptimum
  @param wordNetAll
  @return 一系列粗分结果