public abstract class FeatureIndex extends Object
| Modifier and Type | Field and Description |
|---|---|
protected double[] |
alpha_ |
protected float[] |
alphaFloat_ |
protected List<String> |
bigramTempls_ |
static String[] |
BOS |
protected boolean |
checkMaxXsize_ |
protected double |
costFactor_ |
static String[] |
EOS |
protected int |
max_xsize_ |
protected int |
maxid_ |
protected List<List<Node>> |
nodeList_ |
protected List<List<Path>> |
pathList_ |
protected String |
templs_ |
protected int |
threadNum_ |
protected List<String> |
unigramTempls_ |
protected int |
xsize_ |
protected List<String> |
y_ |
| Constructor and Description |
|---|
FeatureIndex() |
public static String[] BOS
public static String[] EOS
protected int maxid_
protected double[] alpha_
protected float[] alphaFloat_
protected double costFactor_
protected int xsize_
protected boolean checkMaxXsize_
protected int max_xsize_
protected int threadNum_
protected String templs_
protected abstract int getID(String s)
public void calcCost(Node node)
node - public void calcCost(Path path)
path - 边public String getTemplate()
public String getIndex(String[] idxStr, int cur, TaggerImpl tagger)
public String applyRule(String str, int cur, TaggerImpl tagger)
public boolean buildFeatures(TaggerImpl tagger)
public void rebuildFeatures(TaggerImpl tagger)
public boolean open(String file)
public boolean open(InputStream stream)
public void clear()
public int size()
public int ysize()
public int getMaxid_()
public void setMaxid_(int maxid_)
public double[] getAlpha_()
public void setAlpha_(double[] alpha_)
public float[] getAlphaFloat_()
public void setAlphaFloat_(float[] alphaFloat_)
public double getCostFactor_()
public void setCostFactor_(double costFactor_)
public int getXsize_()
public void setXsize_(int xsize_)
public int getMax_xsize_()
public void setMax_xsize_(int max_xsize_)
public int getThreadNum_()
public void setThreadNum_(int threadNum_)
Copyright © 2014–2021 码农场. All rights reserved.