docs: public List<String> sentenceProcess(String sentence) {
          List<String> tokens = new ArrayList<String>();
          int N = sentence.length();
          Map<Integer, List<Integer>> dag = createDAG(sentence);
          Map<Integer, Pair<Integer>> route = calc(sentence, dag);
  
          int x = 0;
          int y = 0;
          String buf;
          StringBuilder sb = new StringBuilder();
          while (x < N) {
              y = route.get(x).key + 1;
              String lWord = sentence.substring(x, y);
              if (y - x == 1)
                  sb.append(lWord);
              else {
                  if (sb.length() > 0) {
                      buf = sb.toString();
                      sb = new StringBuilder();
                      if (buf.length() == 1) {
                          tokens.add(buf);
                      }
                      else {
                          if (wordDict.containsWord(buf)) {
                              tokens.add(buf);
                          }
                          else {
                              finalSeg.cut(buf, tokens);
                          }
                      }
                  }
                  tokens.add(lWord);
              }
              x = y;
          }
          buf = sb.toString();
          if (buf.length() > 0) {
              if (buf.length() == 1) {
                  tokens.add(buf);
              }
              else {
                  if (wordDict.containsWord(buf)) {
                      tokens.add(buf);
                  }
                  else {
                      finalSeg.cut(buf, tokens);
                  }
              }
  
          }
          return tokens;
      }