code: public static <E extends Enum<E>> List<E> computeEnumSimply(List<EnumItem<E>> roleTagList, TransformMatrixDictionary<E> transformMatrixDictionary)
      {
          int length = roleTagList.size() - 1;
          List<E> tagList = new LinkedList<E>();
          Iterator<EnumItem<E>> iterator = roleTagList.iterator();
          EnumItem<E> start = iterator.next();
          E pre = start.labelMap.entrySet().iterator().next().getKey();
          E perfect_tag = pre;
          // 第一个是确定的
          tagList.add(pre);
          for (int i = 0; i < length; ++i)
          {
              double perfect_cost = Double.MAX_VALUE;
              EnumItem<E> item = iterator.next();
              for (E cur : item.labelMap.keySet())
              {
                  double now = transformMatrixDictionary.transititon_probability[pre.ordinal()][cur.ordinal()] - Math.log((item.getFrequency(cur) + 1e-8) / transformMatrixDictionary.getTotalFrequency(cur));
                  if (perfect_cost > now)
                  {
                      perfect_cost = now;
                      perfect_tag = cur;
                  }
              }
              pre = perfect_tag;
              tagList.add(pre);
          }
          return tagList;
      }
docs: 仅仅利用了转移矩阵的“维特比”算法
  
  @param roleTagList               观测序列
  @param transformMatrixDictionary 转移矩阵
  @param <E>                       EnumItem的具体类型
  @return 预测结果