public class TaggerImpl extends Tagger
| Modifier and Type | Class and Description |
|---|---|
static class |
TaggerImpl.Mode |
static class |
TaggerImpl.ReadStatus |
| Constructor and Description |
|---|
TaggerImpl(TaggerImpl.Mode mode) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(String line) |
boolean |
add(String[] cols) |
double |
alpha(int i,
int j) |
int |
answer(int i) |
double |
bestCost(int i,
int j) |
double |
beta(int i,
int j) |
void |
buildLattice() |
boolean |
clear() |
void |
clearNodes() |
void |
close() |
double |
collins(List<Double> collins) |
float |
costFactor() |
int |
dsize() |
double |
emissionCost(int i,
int j) |
List<Integer> |
emissionVector(int i,
int j) |
boolean |
empty() |
int |
eval() |
void |
forwardbackward()
前向后向算法
|
List<Integer> |
getAnswer_() |
double |
getCost_() |
int |
getFeature_id_() |
FeatureIndex |
getFeature_index_() |
List<List<Integer>> |
getFeatureCache_() |
TaggerImpl.Mode |
getMode_() |
int |
getNbest_() |
List<List<Node>> |
getNode_() |
List<Integer> |
getResult_() |
int |
getThread_id_() |
int |
getVlevel_() |
List<List<String>> |
getX_() |
int |
getYsize_() |
double |
getZ_() |
double |
gradient(double[] expected)
计算梯度
|
boolean |
initNbest() |
static void |
main(String[] args) |
boolean |
next() |
double |
nextTransitionCost(int i,
int j,
int k) |
List<Integer> |
nextTransitionVector(int i,
int j,
int k) |
Node |
node(int i,
int j) |
boolean |
open(FeatureIndex featureIndex) |
boolean |
open(FeatureIndex featureIndex,
int nbest,
int vlevel) |
boolean |
open(FeatureIndex featureIndex,
int nbest,
int vlevel,
double costFactor) |
boolean |
open(InputStream stream,
int nbest,
int vlevel,
double costFactor) |
boolean |
open(String filename) |
boolean |
parse() |
String |
parse(String s) |
String |
parse(String s,
int i) |
String |
parse(String s,
int i,
String s2,
int j) |
double |
penalty(int i,
int j) |
double |
prevTransitionCost(int i,
int j,
int k) |
List<Integer> |
prevTransitionVector(int i,
int j,
int k) |
double |
prob() |
double |
prob(int i) |
double |
prob(int i,
int j) |
TaggerImpl.ReadStatus |
read(BufferedReader br) |
int |
result(int i) |
void |
set_node(Node n,
int i,
int j) |
void |
setAnswer_(List<Integer> answer_) |
void |
setCost_(double cost_) |
void |
setFeature_id_(int feature_id_) |
void |
setFeature_index_(FeatureIndex feature_index_) |
void |
setFeatureCache_(List<List<Integer>> featureCache_) |
void |
setMode_(TaggerImpl.Mode mode_) |
boolean |
setModel(ModelImpl model) |
void |
setNbest_(int nbest_) |
void |
setNode_(List<List<Node>> node_) |
void |
setPenalty(int i,
int j,
double penalty) |
void |
setResult_(List<Integer> result_) |
void |
setThread_id_(int thread_id_) |
void |
setVlevel_(int vlevel_) |
void |
setX_(List<List<String>> x_) |
void |
setYsize_(int ysize_) |
void |
setZ_(double z_) |
boolean |
shrink() |
int |
size() |
String |
toString() |
void |
viterbi() |
float[] |
weightVector() |
List<String> |
x(int i) |
String |
x(int i,
int j) |
int |
xsize() |
int |
y(int i) |
String |
y2(int i) |
String |
yname(int i) |
public TaggerImpl(TaggerImpl.Mode mode)
public void clearNodes()
public void setPenalty(int i,
int j,
double penalty)
setPenalty in class Taggerpublic void forwardbackward()
public void viterbi()
public void buildLattice()
public boolean initNbest()
public Node node(int i, int j)
public void set_node(Node n, int i, int j)
public int eval()
public double gradient(double[] expected)
expected - 梯度向量public boolean shrink()
public TaggerImpl.ReadStatus read(BufferedReader br)
public boolean open(FeatureIndex featureIndex)
public boolean setModel(ModelImpl model)
public float[] weightVector()
weightVector in class Taggerpublic double emissionCost(int i,
int j)
emissionCost in class Taggerpublic double nextTransitionCost(int i,
int j,
int k)
nextTransitionCost in class Taggerpublic double prevTransitionCost(int i,
int j,
int k)
prevTransitionCost in class Taggerpublic List<Integer> emissionVector(int i, int j)
emissionVector in class Taggerpublic List<Integer> nextTransitionVector(int i, int j, int k)
nextTransitionVector in class Taggerpublic List<Integer> prevTransitionVector(int i, int j, int k)
prevTransitionVector in class Taggerpublic float costFactor()
public boolean open(FeatureIndex featureIndex, int nbest, int vlevel)
public boolean open(FeatureIndex featureIndex, int nbest, int vlevel, double costFactor)
public boolean open(InputStream stream, int nbest, int vlevel, double costFactor)
public TaggerImpl.Mode getMode_()
public void setMode_(TaggerImpl.Mode mode_)
public int getVlevel_()
public void setVlevel_(int vlevel_)
public int getNbest_()
public void setNbest_(int nbest_)
public int getYsize_()
public void setYsize_(int ysize_)
public double getCost_()
public void setCost_(double cost_)
public double getZ_()
public void setZ_(double z_)
public int getFeature_id_()
public void setFeature_id_(int feature_id_)
public int getThread_id_()
public void setThread_id_(int thread_id_)
public FeatureIndex getFeature_index_()
public void setFeature_index_(FeatureIndex feature_index_)
Copyright © 2014–2021 码农场. All rights reserved.