jmaxent
Class Feature

java.lang.Object
  extended by jmaxent.Feature

public class Feature
extends java.lang.Object

The Class Feature.


Field Summary
 int cp
          The cp.
 int idx
          The idx.
 int label
          The label.
 java.lang.String strId
          The str id.
 float val
          The val.
 double wgt
          The wgt.
 
Constructor Summary
Feature()
          Instantiates a new feature.
Feature(int label, int cp)
          Instantiates a new feature.
Feature(int label, int cp, java.util.Map fmap)
          Instantiates a new feature.
Feature(java.lang.String str, java.util.Map cpStr2Int, java.util.Map lbStr2Int)
          Instantiates a new feature.
Feature(java.lang.String str, java.util.Map cpStr2Int, java.util.Map lbStr2Int, java.util.Map fmap)
          Instantiates a new feature.
 
Method Summary
 void FeatureInit(int label, int cp)
          Feature init.
 void FeatureInit(java.lang.String str, java.util.Map cpStr2Int, java.util.Map lbStr2Int)
          Feature init.
 int index(java.util.Map fmap)
          Index.
 int strId2Idx(java.util.Map fmap)
          Str id2 idx.
 int strId2IdxAdd(java.util.Map fmap)
          Str id2 idx add.
 java.lang.String toString(java.util.Map cpInt2Str, java.util.Map lbInt2Str)
          To string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

idx

public int idx
The idx.


strId

public java.lang.String strId
The str id.


label

public int label
The label.


cp

public int cp
The cp.


val

public float val
The val.


wgt

public double wgt
The wgt.

Constructor Detail

Feature

public Feature()
Instantiates a new feature.


Feature

public Feature(int label,
               int cp)
Instantiates a new feature.

Parameters:
label - the label
cp - the cp

Feature

public Feature(int label,
               int cp,
               java.util.Map fmap)
Instantiates a new feature.

Parameters:
label - the label
cp - the cp
fmap - the fmap

Feature

public Feature(java.lang.String str,
               java.util.Map cpStr2Int,
               java.util.Map lbStr2Int)
Instantiates a new feature.

Parameters:
str - the str
cpStr2Int - the cp str2 int
lbStr2Int - the lb str2 int

Feature

public Feature(java.lang.String str,
               java.util.Map cpStr2Int,
               java.util.Map lbStr2Int,
               java.util.Map fmap)
Instantiates a new feature.

Parameters:
str - the str
cpStr2Int - the cp str2 int
lbStr2Int - the lb str2 int
fmap - the fmap
Method Detail

FeatureInit

public void FeatureInit(int label,
                        int cp)
Feature init.

Parameters:
label - the label
cp - the cp

FeatureInit

public void FeatureInit(java.lang.String str,
                        java.util.Map cpStr2Int,
                        java.util.Map lbStr2Int)
Feature init.

Parameters:
str - the str
cpStr2Int - the cp str2 int
lbStr2Int - the lb str2 int

strId2Idx

public int strId2Idx(java.util.Map fmap)
Str id2 idx.

Parameters:
fmap - the fmap
Returns:
the int

strId2IdxAdd

public int strId2IdxAdd(java.util.Map fmap)
Str id2 idx add.

Parameters:
fmap - the fmap
Returns:
the int

index

public int index(java.util.Map fmap)
Index.

Parameters:
fmap - the fmap
Returns:
the int

toString

public java.lang.String toString(java.util.Map cpInt2Str,
                                 java.util.Map lbInt2Str)
To string.

Parameters:
cpInt2Str - the cp int2 str
lbInt2Str - the lb int2 str
Returns:
the string