code: public List<Word> segDefault(String text) {
          List<String> sentences = Punctuation.seg(text, KEEP_PUNCTUATION);
          if(sentences.size() == 1){
              return segSentence(sentences.get(0));
          }
          if(!PARALLEL_SEG){
              //串行顺序处理，不能利用多核优势
              return sentences.stream().flatMap(sentence->segSentence(sentence).stream()).collect(Collectors.toList());
          }
          //如果是多个句子，可以利用多核提升分词速度
          Map<Integer, String> sentenceMap = new HashMap<>();
          int len = sentences.size();
          for(int i=0; i<len; i++){
              //记住句子的先后顺序，因为后面的parallelStream方法不保证顺序
              sentenceMap.put(i, sentences.get(i));
          }
          //用数组收集句子分词结果
          List<Word>[] results = new List[sentences.size()];
          sentenceMap.entrySet().stream().forEach(entry -> {
              int index = entry.getKey();
              String sentence = entry.getValue();
              results[index] = segSentence(sentence);
          });
          sentences.clear();
          sentences = null;
          sentenceMap.clear();
          sentenceMap = null;
          List<Word> resultList = new ArrayList<>();
          for(List<Word> result : results){
              if(result == null || result.isEmpty()){
                  continue;
              }
              resultList.addAll(result);
          }
          return resultList;
      }
docs: 默认分词算法实现：
  1、把要分词的文本根据标点符号进行分割
  2、对分割后的文本进行分词
  3、组合分词结果
  @param text 文本
  @return 分词结果