code: public static Map<List<Word>, Float> trigram(List<Word>... sentences){
          Map<List<Word>, Float> map = new HashMap<>();
          //计算多种分词结果的分值
          for(List<Word> sentence : sentences){
              if(map.get(sentence) != null){
                  //相同的分词结果只计算一次分值
                  continue;
              }
              float score=0;
              //计算其中一种分词结果的分值
              if(sentence.size() > 2){
                  for(int i=0; i<sentence.size()-2; i++){
                      String first = sentence.get(i).getText();
                      String second = sentence.get(i+1).getText();
                      String third = sentence.get(i+2).getText();
                      float trigramScore = getScore(first, second, third);
                      if(trigramScore > 0){
                          score += trigramScore;
                      }
                  }
              }
              map.put(sentence, score);
          }
          
          return map;
      }
docs: 一次性计算多种分词结果的三元模型分值
  @param sentences 多种分词结果
  @return 分词结果及其对应的分值