public class SequenceExampleGeneratorLinear extends Object implements SequenceExampleGenerator
SequenceExampleGeneratorLinearAlg allows to explicitly
enrich a targeted Example (reflecting an item in a
SequenceExample) with information derived from the | Constructor and Description |
|---|
SequenceExampleGeneratorLinear() |
SequenceExampleGeneratorLinear(int transitionsOrder,
String originalRepresentationName,
float transitionWeight) |
| Modifier and Type | Method and Description |
|---|---|
Example |
generateExampleWithHistory(SequenceExample sequenceExample,
SequencePath p,
int elementId)
At labeling time, this method allows to enrich a specific
Example with the labels assigned by the classifier to the
previous Examples |
SequenceExample |
generateSequenceExampleEnrichedWithHistory(SequenceExample sequenceExample)
This method allows to enrich each
Example from an input
SequenceExample with the labels assigned by the classifier
to the previous Examples |
String |
getRepresentationName() |
int |
getTransitionsOrder() |
float |
getTransitionWeight() |
void |
setRepresentationName(String representationName) |
public SequenceExampleGeneratorLinear()
public SequenceExampleGeneratorLinear(int transitionsOrder,
String originalRepresentationName,
float transitionWeight)
transitionsOrder - The number of examples preceding a target example to be
considered during the manipulation processoriginalRepresentationName - The identifier of the representation used to represent an
example in the sequence and which will be enrichedenrichedWithHistoryRepresentationName - The identifier of the new representation produced in the
manipulation processtransitionWeight - The weight to assign to each new feature added in the
manipulation processpublic Example generateExampleWithHistory(SequenceExample sequenceExample, SequencePath p, int elementId)
SequenceExampleGeneratorExample with the labels assigned by the classifier to the
previous ExamplesgenerateExampleWithHistory in interface SequenceExampleGeneratorsequenceExample - The targeted sequencep - the sequence of Label assigned from a classifier
to the SequenceExamlpeelementId - the offset of the targeted word in the sequencepublic SequenceExample generateSequenceExampleEnrichedWithHistory(SequenceExample sequenceExample)
SequenceExampleGeneratorExample from an input
SequenceExample with the labels assigned by the classifier
to the previous ExamplesgenerateSequenceExampleEnrichedWithHistory in interface SequenceExampleGeneratorsequenceExample - The input sequencepublic String getRepresentationName()
public int getTransitionsOrder()
getTransitionsOrder in interface SequenceExampleGeneratorn of elements (in the sequence) whose
labels are to be considered to enrich a targeted elementpublic float getTransitionWeight()
public void setRepresentationName(String representationName)
representationName - The identifier of the representation used to represent a
example in the sequence and which will be enrichedCopyright © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.