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 Example s |
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 Example s |
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)
SequenceExampleGenerator
Example
with the labels assigned by the classifier to the
previous Example
sgenerateExampleWithHistory
in interface SequenceExampleGenerator
sequenceExample
- The targeted sequencep
- the sequence of Label
assigned from a classifier
to the SequenceExamlpe
elementId
- the offset of the targeted word in the sequencepublic SequenceExample generateSequenceExampleEnrichedWithHistory(SequenceExample sequenceExample)
SequenceExampleGenerator
Example
from an input
SequenceExample
with the labels assigned by the classifier
to the previous Example
sgenerateSequenceExampleEnrichedWithHistory
in interface SequenceExampleGenerator
sequenceExample
- The input sequencepublic String getRepresentationName()
public int getTransitionsOrder()
getTransitionsOrder
in interface SequenceExampleGenerator
n
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.