public class FeatureArrayIndexer extends Object
Modifier and Type | Field and Description |
---|---|
static int |
MAXDEPTH |
static int |
MAXLEVEL |
static int |
MINUNITS |
Constructor and Description |
---|
FeatureArrayIndexer(FeatureVector[] featureVectors,
FeatureDefinition featureDefinition)
Constructor which loads the feature vector array but does not launch an indexing operation.
|
FeatureArrayIndexer(FeatureVector[] featureVectors,
FeatureDefinition featureDefinition,
int[] setFeatureSequence)
Constructor which takes an array of feature vectors and launches an indexing operation according to a feature sequence
constraint.
|
FeatureArrayIndexer(FeatureVector[] featureVectors,
FeatureDefinition featureDefinition,
String[] setFeatureSequence)
Constructor which takes an array of feature vectors and launches an indexing operation according to a feature sequence
constraint.
|
Modifier and Type | Method and Description |
---|---|
void |
deepFill(MaryNode specTree)
Fill a tree which specifies a feature hierarchy but no corresponding units.
|
void |
deepSort(int[] setFeatureSequence)
Launches a deep sort on the array of feature vectors.
|
void |
deepSort(String[] setFeatureSequence)
Launches a deep sort on the array of feature vectors.
|
FeatureDefinition |
getFeatureDefinition() |
int[] |
getFeatureSequence()
Get the feature sequence, as an information about the underlying tree structure.
|
FeatureVector[] |
getFeatureVectors(int from,
int to)
Get the feature vectors from the big array according to the given indices
|
long |
getNumberOfLeaves()
Get the number of leaves.
|
long |
getTheoreticalNumberOfLeaves(int[] feaSeq)
Get the theoretical number of leaves, given a feature sequence.
|
MaryNode |
getTree()
Get the tree
|
FeatureFileIndexingResult |
retrieve(FeatureVector v)
Retrieve an array of unit features which complies with a specific target specification, according to an underlying tree.
|
FeatureFileIndexingResult |
retrieve(FeatureVector v,
int condition,
int parameter)
Retrieve an array of unit features which complies with a specific target specification, according to an underlying tree,
and given a stopping condition.
|
public static final int MAXDEPTH
public static final int MAXLEVEL
public static final int MINUNITS
public FeatureArrayIndexer(FeatureVector[] featureVectors, FeatureDefinition featureDefinition, int[] setFeatureSequence)
featureVectors
- an array of feature vectorsfeatureDefinition
- a feature definition to make sense of the feature vectorssetFeatureSequence
- An array of indexes indicating the hierarchical order (or, equivalently, the sequence) of the features to use
for the indexing.public FeatureArrayIndexer(FeatureVector[] featureVectors, FeatureDefinition featureDefinition, String[] setFeatureSequence)
featureVectors
- an array of feature vectorsfeatureDefinition
- a feature definition to make sense of the feature vectorssetFeatureSequence
- An array of feature names indicating the hierarchical order (or, equivalently, the sequence) of the features to
use for the indexing.public FeatureArrayIndexer(FeatureVector[] featureVectors, FeatureDefinition featureDefinition)
featureVectors
- an array of feature vectorsfeatureDefinition
- a feature definition to make sense of the feature vectorspublic void deepSort(int[] setFeatureSequence)
setFeatureSequence
- An array of feature indexes, indicating the sequence of features according to which the sorting should be
performed.public void deepSort(String[] setFeatureSequence)
setFeatureSequence
- An array of feature names, indicating the sequence of features according to which the sorting should be
performed.public void deepFill(MaryNode specTree)
specTree
- A specific treepublic FeatureFileIndexingResult retrieve(FeatureVector v)
v
- A feature vector for which to send back an array of complying unit indexes.deepSort(int[])
,
deepFill(MaryNode)
public FeatureFileIndexingResult retrieve(FeatureVector v, int condition, int parameter)
v
- A feature vector for which to send back an array of complying unit indexes.condition
- A constant indicating a stopping criterion, among: FeatureFileIndexer.MAXDEPTH : walk the tree until its leaves
(maximum depth); FeatureFileIndexer.MAXLEVEL : walk the tree until a certain depth level;
FeatureFileIndexer.MINUNITS : walk the tree until a certain number of units is reached.parameter
- A parameter interpreted according to the above condition: MAXDEPTH → parameter is ignored; MAXLEVEL →
parameter = maximum level to reach; MINUNITS → parameter = lower bound on the number of units to return.deepSort(int[])
,
deepFill(MaryNode)
public int[] getFeatureSequence()
public MaryNode getTree()
public FeatureVector[] getFeatureVectors(int from, int to)
from
- the start indexto
- the end indexpublic FeatureDefinition getFeatureDefinition()
public long getNumberOfLeaves()
public long getTheoreticalNumberOfLeaves(int[] feaSeq)
feaSeq
- feaSeqCopyright © 2000–2016 DFKI GmbH. All rights reserved.