public class CWSEvaluator extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CWSEvaluator.Result |
| Constructor and Description |
|---|
CWSEvaluator() |
CWSEvaluator(Set<String> dic) |
CWSEvaluator(String dictPath) |
| Modifier and Type | Method and Description |
|---|---|
void |
compare(String gold,
String pred)
比较标准答案与分词结果
|
static CWSEvaluator.Result |
evaluate(Segment segment,
String outputPath,
String goldFile,
String dictPath)
标准化评测分词器
|
static CWSEvaluator.Result |
evaluate(Segment segment,
String testFile,
String outputPath,
String goldFile,
String dictPath)
标准化评测分词器
|
static CWSEvaluator.Result |
evaluate(String goldFile,
String predFile)
在标准答案与分词结果上执行评测
|
static CWSEvaluator.Result |
evaluate(String goldFile,
String predFile,
String dictPath)
在标准答案与分词结果上执行评测
|
CWSEvaluator.Result |
getResult()
获取PRF
|
CWSEvaluator.Result |
getResult(boolean percentage)
获取PRF
|
public CWSEvaluator()
public CWSEvaluator(String dictPath) throws IOException
IOExceptionpublic CWSEvaluator.Result getResult(boolean percentage)
percentage - 百分制public CWSEvaluator.Result getResult()
public static CWSEvaluator.Result evaluate(String goldFile, String predFile) throws IOException
goldFile - predFile - IOExceptionpublic static CWSEvaluator.Result evaluate(Segment segment, String outputPath, String goldFile, String dictPath) throws IOException
segment - 分词器outputPath - 分词预测输出文件goldFile - 测试集segmented filedictPath - 训练集单词列表IOExceptionpublic static CWSEvaluator.Result evaluate(Segment segment, String testFile, String outputPath, String goldFile, String dictPath) throws IOException
segment - 分词器testFile - 测试集raw textoutputPath - 分词预测输出文件goldFile - 测试集segmented filedictPath - 训练集单词列表IOExceptionpublic static CWSEvaluator.Result evaluate(String goldFile, String predFile, String dictPath) throws IOException
goldFile - predFile - IOExceptionCopyright © 2014–2021 码农场. All rights reserved.