jflexcrf
Class Labeling

java.lang.Object
  extended by jflexcrf.Labeling

public class Labeling
extends java.lang.Object

The Class Labeling.


Field Summary
 Dictionary taggerDict
          The tagger dict.
 Maps taggerMaps
          The tagger maps.
 
Constructor Summary
Labeling(java.lang.String modelDir, TaggingData dataTagger, DataReader dataReader, DataWriter dataWriter)
          Instantiates a new labeling.
 
Method Summary
 boolean init(java.lang.String modelDir)
          Inits the.
 java.util.List seqLabeling(java.io.File file)
          labeling observation sequences.
 java.util.List seqLabeling(java.lang.String data)
          labeling observation sequences.
 void setDataReader(DataReader reader)
          Sets the data reader.
 void setDataTagger(TaggingData tagger)
          Sets the data tagger.
 void setDataWriter(DataWriter writer)
          Sets the data writer.
 java.lang.String strLabeling(java.io.File file)
          labeling observation sequences.
 java.lang.String strLabeling(java.lang.String data)
          labeling observation sequences.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

taggerMaps

public Maps taggerMaps
The tagger maps.


taggerDict

public Dictionary taggerDict
The tagger dict.

Constructor Detail

Labeling

public Labeling(java.lang.String modelDir,
                TaggingData dataTagger,
                DataReader dataReader,
                DataWriter dataWriter)
Instantiates a new labeling.

Parameters:
modelDir - the model dir
dataTagger - the data tagger
dataReader - the data reader
dataWriter - the data writer
Method Detail

init

public boolean init(java.lang.String modelDir)
Inits the.

Parameters:
modelDir - the model dir
Returns:
true, if successful

setDataReader

public void setDataReader(DataReader reader)
Sets the data reader.

Parameters:
reader - the new data reader

setDataTagger

public void setDataTagger(TaggingData tagger)
Sets the data tagger.

Parameters:
tagger - the new data tagger

setDataWriter

public void setDataWriter(DataWriter writer)
Sets the data writer.

Parameters:
writer - the new data writer

seqLabeling

public java.util.List seqLabeling(java.lang.String data)
labeling observation sequences.

Parameters:
data - list of sequences with specified format which can be read by DataReader
Returns:
a list of sentences with tags annotated

seqLabeling

public java.util.List seqLabeling(java.io.File file)
labeling observation sequences.

Parameters:
file - the file
Returns:
a list of sentences with tags annotated

strLabeling

public java.lang.String strLabeling(java.lang.String data)
labeling observation sequences.

Parameters:
data - the data
Returns:
string representing label sequences, the format is specified by writer

strLabeling

public java.lang.String strLabeling(java.io.File file)
labeling observation sequences.

Parameters:
file - contains a list of observation sequence, this file has a format wich can be read by DataReader
Returns:
string representing label sequences, the format is specified by writer