Package org.aksw.palmetto.vector
Class AbstractVectorCreator
- java.lang.Object
-
- org.aksw.palmetto.vector.AbstractVectorCreator
-
- All Implemented Interfaces:
VectorCreator
- Direct Known Subclasses:
DirectConfirmationBasedVectorCreator,ProbabilityBasedVectorCreator
public abstract class AbstractVectorCreator extends Object implements VectorCreator
Abstract class containing the process of the vector creation.- Author:
- m.roeder
-
-
Field Summary
Fields Modifier and Type Field Description private ProbabilityEstimatorsupplierprivate static StringVECTOR_SPACE_NAME
-
Constructor Summary
Constructors Constructor Description AbstractVectorCreator(ProbabilityEstimator supplier)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract SubsetVectors[]createVectors(String[][] wordsets, SegmentationDefinition[] definitions, SubsetProbabilities[] probabilities)StringgetProbabilityEstimatorName()CallsProbabilityEstimator.getName()of the probability estimator and returns the name of the estimator.SubsetVectors[]getVectors(String[][] wordsets, SegmentationDefinition[] definitions)Creates vectors for the given word sets and their segmentations.StringgetVectorSpaceName()Returns the name of the vector space.voidsetMinFrequency(int minFrequency)Sets the minimum frequency of the probability estimator.voidsetProbabilityEstimator(ProbabilityEstimator supplier)Sets the probability estimator used by the vector creator.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.aksw.palmetto.vector.VectorCreator
getVectorCreatorName
-
-
-
-
Field Detail
-
VECTOR_SPACE_NAME
private static final String VECTOR_SPACE_NAME
- See Also:
- Constant Field Values
-
supplier
private ProbabilityEstimator supplier
-
-
Constructor Detail
-
AbstractVectorCreator
public AbstractVectorCreator(ProbabilityEstimator supplier)
-
-
Method Detail
-
getVectors
public SubsetVectors[] getVectors(String[][] wordsets, SegmentationDefinition[] definitions)
Description copied from interface:VectorCreatorCreates vectors for the given word sets and their segmentations.- Specified by:
getVectorsin interfaceVectorCreator- Returns:
-
createVectors
protected abstract SubsetVectors[] createVectors(String[][] wordsets, SegmentationDefinition[] definitions, SubsetProbabilities[] probabilities)
-
getProbabilityEstimatorName
public String getProbabilityEstimatorName()
Description copied from interface:VectorCreatorCallsProbabilityEstimator.getName()of the probability estimator and returns the name of the estimator.- Specified by:
getProbabilityEstimatorNamein interfaceVectorCreator- Returns:
-
getVectorSpaceName
public String getVectorSpaceName()
Description copied from interface:VectorCreatorReturns the name of the vector space.- Specified by:
getVectorSpaceNamein interfaceVectorCreator- Returns:
-
setMinFrequency
public void setMinFrequency(int minFrequency)
Description copied from interface:VectorCreatorSets the minimum frequency of the probability estimator.- Specified by:
setMinFrequencyin interfaceVectorCreator
-
setProbabilityEstimator
public void setProbabilityEstimator(ProbabilityEstimator supplier)
Description copied from interface:VectorCreatorSets the probability estimator used by the vector creator.- Specified by:
setProbabilityEstimatorin interfaceVectorCreator
-
-