public class Bigram extends Object
| Constructor and Description | 
|---|
| Bigram() | 
| Modifier and Type | Method and Description | 
|---|---|
| static Map<List<Word>,Float> | bigram(List<Word>... sentences)含有语境的二元模型分值算法
 计算多种分词结果的分值
 利用获得的二元模型分值重新计算分词结果的分值
 补偿细粒度切分获得分值而粗粒度切分未获得分值的情况 | 
| static float | bigram(List<Word> words)计算分词结果的二元模型分值 | 
| static int | getFrequency(String first,
            String second) | 
| static int | getMaxFrequency() | 
| static float | getScore(String first,
        String second)获取两个词一前一后紧挨着同时出现在语料库中的分值
 分值被归一化了:
 完全没有出现分值为0
 出现频率最高的分值为1 | 
| static void | reload() | 
public static void reload()
public static int getMaxFrequency()
public static Map<List<Word>,Float> bigram(List<Word>... sentences)
sentences - 多种分词结果public static float bigram(List<Word> words)
words - 分词结果public static float getScore(String first, String second)
first - 前一个词second - 后一个词Copyright © 2014–2015 APDPlat. All rights reserved.