| Package | Description |
|---|---|
| com.hankcs.hanlp.model.crf | |
| com.hankcs.hanlp.model.crf.crfpp |
这个包下面是由Zhifa Chen移植的CRF++。
做了一些注释、修改与debug。本来想自己移植的,后来发现已经有移植版,所以就没有浪费时间重复造轮子。 关于理论,请参考《CRF++代码分析》。 这份代码(含CRF++和darts-java)的许可证是LGPL & Modified BSD,需注明如下版权声明: |
| Modifier and Type | Method and Description |
|---|---|
void |
CRFTagger.train(String trainFile,
String modelFile,
int maxitr,
int freq,
double eta,
double C,
int threadNum,
int shrinkingSize,
Encoder.Algorithm algorithm) |
void |
CRFTagger.train(String templFile,
String trainFile,
String modelFile,
int maxitr,
int freq,
double eta,
double C,
int threadNum,
int shrinkingSize,
Encoder.Algorithm algorithm)
训练
|
| Modifier and Type | Method and Description |
|---|---|
static Encoder.Algorithm |
Encoder.Algorithm.fromString(String algorithm) |
static Encoder.Algorithm |
Encoder.Algorithm.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Encoder.Algorithm[] |
Encoder.Algorithm.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
Encoder.learn(String templFile,
String trainFile,
String modelFile,
boolean textModelFile,
int maxitr,
int freq,
double eta,
double C,
int threadNum,
int shrinkingSize,
Encoder.Algorithm algorithm)
训练
|
Copyright © 2014–2021 码农场. All rights reserved.