|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object marf.MARF
public class MARF
Provides basic recognition pipeline and its configuration.
$Id: MARF.java,v 1.111 2008/02/20 07:29:03 mokhov Exp $
Nested Class Summary | |
---|---|
static interface |
MARF.ENgramModels
Enumeration of N-gram Models. |
static interface |
MARF.EStatisticalEstimators
Enumeration of Statistical Estimators. |
static class |
MARF.NLP
Class NLP is more related to the Natural Language Processing part of MARF. |
Field Summary | |
---|---|
static int |
AIFF
AIFF sample format. |
static int |
AIFFC
AIFF-C sample format. |
static int |
AU
AU sample format. |
static int |
BAND_PASS_CFE_FILTER
Indicates to use band-pass CFE filter. |
static int |
BAND_STOP_CFE_FILTER
Indicates to use band-stop CFE filter. |
static int |
BAND_STOP_FFT_FILTER
Indicates to use band-stop FFT filter. |
static int |
BANDPASS_FFT_FILTER
Indicates to use band-pass filter. |
static int |
CEPSTRAL
Indicates to use cepstral analysis. |
static int |
CHEBYSHEV_DISTANCE
Indicates to use Chebyshev distance for classification. |
static int |
CITYBLOCK_DISTANCE
A synonym to Chebyshev distance. |
static int |
CLASSIFICATION_PLUGIN
Indicates to employ user-defined classification plug-in. |
static int |
COSINE_SIMILARITY_MEASURE
Indicates to use the cosine similarity measure classifier. |
static int |
CUSTOM
Custom (plug-in) sample format. |
static int |
DIFF_DISTANCE
Indicates to use diff-distance classification. |
static int |
DUMMY
Indicates to use Dummy preprocessing module (just normalization). |
static int |
ENDPOINT
Indicates to use endpointing. |
static int |
EUCLIDEAN_DISTANCE
Indicates to use Euclidean distance for classification. |
static int |
F0
Indicates to use F0. |
static int |
FEATURE_EXTRACTION_AGGREGATOR
Indicates to use an aggregation of several feature extraction modules. |
static int |
FEATURE_EXTRACTION_PLUGIN
Indicates to employ user-defined feature extraction plug-in. |
static int |
FFT
Indicates to use FFT. |
static int |
HAMMING_DISTANCE
Indicates to use the Hamming distance classifier. |
static int |
HIGH_FREQUENCY_BOOST_FFT_FILTER
Indicates to use filter boosting high frequencies. |
static int |
HIGH_PASS_BOOST_FILTER
Indicates to use high-pass high-frequency boost FFT filter. |
static int |
HIGH_PASS_CFE_FILTER
Indicates to use high-pass CFE filter. |
static int |
HIGH_PASS_FFT_FILTER
Indicates to use high-pass FFT filter. |
static int |
LOW_PASS_CFE_FILTER
Indicates to use low-pass CFE filter. |
static int |
LOW_PASS_FFT_FILTER
Indicates to use low-pass FFT filter. |
static int |
LPC
Indicates to use LPC. |
static int |
MAHALANOBIS_DISTANCE
Indicates to use Mahalanobis distance for classification. |
static int |
MAJOR_VERSION
Indicates major MARF version, like 1.x.x. |
static int |
MANHATTAN_DISTANCE
A synonym to Chebyshev distance. |
static int |
MARKOV
Indicates to use Hidden Markov Models for classification. |
static int |
MAX_CLASSIFICATION_METHOD
Upper boundary for classification methods enumeration. |
static int |
MAX_FEATUREEXTRACTION_METHOD
Upper boundary for feature extraction methods enumeration. |
static int |
MAX_PREPROCESSING_METHOD
Upper boundary for preprocessing methods enumeration. |
static int |
MIDI
MIDI sample format. |
static int |
MIN_CLASSIFICATION_METHOD
Lower boundary for classification methods enumeration. |
static int |
MIN_FEATUREEXTRACTION_METHOD
Lower boundary for feature extraction methods enumeration. |
static int |
MIN_MAX_AMPLITUDES
Indicates to use min/max amplitude extraction. |
static int |
MIN_PREPROCESSING_METHOD
Lower boundary for preprocessing methods enumeration. |
static int |
MINKOWSKI_DISTANCE
Indicates to use Minkowski distance for classification. |
static int |
MINOR_REVISION
Indicates MARF minor development revision, like 1.1.1.1. |
static int |
MINOR_VERSION
Indicates minor MARF version, like 1.1.x. |
static java.util.Map |
MODULE_NAMES_MAPPING
Provides human-readable description by mapping module constants to their names. |
static int |
MP3
Indicates MP3 incoming sample file format. |
static int |
NEURAL_NETWORK
Indicates to use Neural Network for classification. |
static int |
PREPROCESSING_PLUGIN
Indicates to employ user-defined preprocessing plug-in. |
static int |
RANDOM_CLASSIFICATION
Indicates to use random classification. |
static int |
RANDOM_FEATURE_EXTRACTION
Indicates to use random feature extraction. |
static int |
RAW
Indicates to use raw preprocessing, which means no preprocessing. |
static int |
REVISION
Indicates MARF revision, like 1.1.1. |
static int |
SEGMENTATION
Indicates to use segmentation. |
static int |
SINE
Sine sample format. |
static int |
SND
SND sample format. |
static int |
STOCHASTIC
Indicates to use stochastic models for classification. |
static int |
TEXT
Textual sample format. |
static int |
ULAW
Indicates ULAW incoming sample file format. |
static int |
UNSET
Value indicating that some configuration parameter is not set. |
static int |
WAV
Indicates WAVE incoming sample file format. |
static int |
ZIPFS_LAW
Indicates to employ Zipf's Law-based classifier. |
Method Summary | |
---|---|
static void |
checkSettings()
Checks for all necessary settings to be present. |
static IClassification |
getClassification()
Retrieves current Classification reference. |
static int |
getClassificationMethod()
Gets classification method to be used. |
static java.lang.Class |
getClassificationPluginClass()
Allows querying for the current classification plug-in class. |
static java.lang.String |
getConfig()
Returns a string representation of the current MARF configuration. |
static Configuration |
getConfiguration()
Allows querying for the current MARF configuration. |
static int |
getCurrentSubject()
Gets ID of a subject currently being trained on. |
static double |
getDoubleVersion()
Retrieves double version of MARF. |
static boolean |
getDumpSpectrogram()
Whether spectrogram wanted or not. |
static boolean |
getDumpWaveGraph()
Whether wave graph wanted or not. |
static IFeatureExtraction |
getFeatureExtraction()
Retrieves current FeatureExtraction reference. |
static int |
getFeatureExtractionMethod()
Gets currently selected feature extraction method. |
static java.lang.Class |
getFeatureExtractionPluginClass()
Allows querying for the current feature extraction plug-in class. |
static int |
getIntVersion()
Returns an integer representation of the MARF version. |
static java.lang.String |
getMARFSourceCodeRevision()
Retrieves class' revision. |
static ModuleParams |
getModuleParams()
Gets module-specific parameters an application programmer passed on to the module. |
static IPreprocessing |
getPreprocessing()
Retrieves current Preprocessing reference. |
static int |
getPreprocessingMethod()
Gets currently selected preprocessing method. |
static java.lang.Class |
getPreprocessingPluginClass()
Allows querying for the current preprocessing plug-in class. |
static Result |
getResult()
Gets the entire Result object of the likely outcome. |
static ResultSet |
getResultSet()
Gets the entire collection of results. |
static Sample |
getSample()
Retrieves current Sample reference. |
static java.lang.String |
getSampleFile()
Obtains filename of a sample currently being processed. |
static int |
getSampleFormat()
Gets input sample file format. |
static ISampleLoader |
getSampleLoader()
Retrieves current SampleLoader reference. |
static java.lang.Class |
getSampleLoaderPluginClass()
Allows querying for the current preprocessing plug-in class. |
static java.lang.String |
getVersion()
Returns a string representation of the MARF version. |
static int |
queryResultID()
Queries for the final classification result. |
static void |
recognize()
Recognition/Identification mode. |
static void |
setClassificationMethod(int piClassificationMethod)
Sets classification method to be used. |
static void |
setClassificationPluginClass(java.lang.Class poClass)
Allows setting a loaded classification plug-in class. |
static void |
setClassificationPluginClass(java.lang.String pstrClassName)
Allows loading a classification plug-in by its name. |
static Configuration |
setConfiguration(Configuration poConfiguration)
Allows setting a complete MARF configuration parameters. |
static void |
setCurrentSubject(int piSubjectID)
Sets ID of a subject currently being trained on. |
static void |
setDumpSpectrogram(boolean pbDump)
Indicates whether spectrogram is wanted as an output of a FeatureExtraction module. |
static void |
setDumpWaveGraph(boolean pbDump)
Indicates whether wave graph is wanted as an output. |
static void |
setFeatureExtractionMethod(int piFeatureExtractionMethod)
Sets feature extraction method to be used. |
static void |
setFeatureExtractionPluginClass(java.lang.Class poClass)
Allows setting a loaded feature extraction class plug-in class. |
static void |
setFeatureExtractionPluginClass(java.lang.String pstrClassName)
Allows loading a feature extraction plug-in by its name. |
static void |
setModuleParams(ModuleParams poModuleParams)
Sets module-specific parameters an application programmer wishes to pass on to the module. |
static void |
setPreprocessingMethod(int piPreprocessingMethod)
Sets preprocessing method to be used. |
static void |
setPreprocessingPluginClass(java.lang.Class poClass)
Allows setting a loaded preprocessing plug-in class. |
static void |
setPreprocessingPluginClass(java.lang.String pstrClassName)
Allows loading a preprocessing plug-in by its name. |
static void |
setSampleFile(java.lang.String pstrFileName)
Sets input sample file name. |
static void |
setSampleFormat(int piSampleFormat)
Sets input sample file format. |
static void |
setSampleLoaderPluginClass(java.lang.Class poClass)
Allows setting a loaded sample loader plug-in class. |
static void |
setSampleLoaderPluginClass(java.lang.String pstrClassName)
Allows loading a sample loader plug-in by its name. |
static void |
setSamplesDir(java.lang.String pstrSamplesDir)
Sets directory with sample files to be read from. |
static void |
streamedRecognition()
Meant to provide implementation of the buffered sample processing for large samples. |
static void |
train()
Training mode. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int UNSET
public static final int DUMMY
public static final int HIGH_FREQUENCY_BOOST_FFT_FILTER
public static final int BANDPASS_FFT_FILTER
public static final int ENDPOINT
public static final int LOW_PASS_FFT_FILTER
public static final int HIGH_PASS_FFT_FILTER
public static final int HIGH_PASS_BOOST_FILTER
public static final int RAW
public static final int PREPROCESSING_PLUGIN
public static final int LOW_PASS_CFE_FILTER
public static final int HIGH_PASS_CFE_FILTER
public static final int BAND_PASS_CFE_FILTER
public static final int BAND_STOP_CFE_FILTER
public static final int BAND_STOP_FFT_FILTER
public static final int MAX_PREPROCESSING_METHOD
public static final int MIN_PREPROCESSING_METHOD
public static final int LPC
public static final int FFT
public static final int F0
public static final int SEGMENTATION
public static final int CEPSTRAL
public static final int RANDOM_FEATURE_EXTRACTION
public static final int MIN_MAX_AMPLITUDES
public static final int FEATURE_EXTRACTION_PLUGIN
public static final int FEATURE_EXTRACTION_AGGREGATOR
ModuleParams
.
FeatureExtractionAggregator
,
setModuleParams(ModuleParams)
,
Constant Field Valuespublic static final int MAX_FEATUREEXTRACTION_METHOD
public static final int MIN_FEATUREEXTRACTION_METHOD
public static final int NEURAL_NETWORK
public static final int STOCHASTIC
public static final int MARKOV
public static final int EUCLIDEAN_DISTANCE
public static final int CHEBYSHEV_DISTANCE
public static final int MANHATTAN_DISTANCE
public static final int CITYBLOCK_DISTANCE
public static final int MINKOWSKI_DISTANCE
public static final int MAHALANOBIS_DISTANCE
public static final int RANDOM_CLASSIFICATION
public static final int DIFF_DISTANCE
public static final int CLASSIFICATION_PLUGIN
public static final int ZIPFS_LAW
public static final int HAMMING_DISTANCE
public static final int COSINE_SIMILARITY_MEASURE
public static final int MAX_CLASSIFICATION_METHOD
public static final int MIN_CLASSIFICATION_METHOD
public static final int WAV
public static final int ULAW
public static final int MP3
public static final int SINE
public static final int AIFF
public static final int AIFFC
public static final int AU
public static final int SND
public static final int MIDI
public static final int CUSTOM
public static final int TEXT
public static final java.util.Map MODULE_NAMES_MAPPING
public static final int MAJOR_VERSION
Version.MAJOR_VERSION
.
Version.MAJOR_VERSION
,
Constant Field Valuespublic static final int MINOR_VERSION
Version.MINOR_VERSION
.
Version.MINOR_VERSION
,
Constant Field Valuespublic static final int REVISION
Version.REVISION
.
Version.REVISION
,
Constant Field Valuespublic static final int MINOR_REVISION
Version.MINOR_REVISION
.
MINOR_VERSION
,
Version.MINOR_REVISION
,
Constant Field ValuesMethod Detail |
---|
public static final Configuration setConfiguration(Configuration poConfiguration) throws MARFException
poConfiguration
- the configuration parameters
MARFException
- in case of any exceptionpublic static final Configuration getConfiguration()
public static final void setPreprocessingMethod(int piPreprocessingMethod) throws MARFException
piPreprocessingMethod
- one of the allowed preprocessing methods
MARFException
- if the parameter outside of the valid rangepublic static final int getPreprocessingMethod()
public static final void setFeatureExtractionMethod(int piFeatureExtractionMethod) throws MARFException
piFeatureExtractionMethod
- one of the allowed feature extraction methods
MARFException
- if the parameter outside of the valid rangepublic static final int getFeatureExtractionMethod()
public static final void setClassificationMethod(int piClassificationMethod) throws MARFException
piClassificationMethod
- one of the allowed classification methods
MARFException
- if the parameter outside of the valid rangepublic static final int getClassificationMethod()
public static final void setSampleFormat(int piSampleFormat)
piSampleFormat
- one of the allowed sample formatspublic static final int getSampleFormat()
public static final void setSampleFile(java.lang.String pstrFileName)
pstrFileName
- string representing sample file to be readpublic static final java.lang.String getSampleFile()
public static final void setSamplesDir(java.lang.String pstrSamplesDir)
pstrSamplesDir
- string representing directory namepublic static final void setModuleParams(ModuleParams poModuleParams)
poModuleParams
- parameters' instancepublic static final ModuleParams getModuleParams()
public static final void setDumpSpectrogram(boolean pbDump)
pbDump
- true
if wanted, false
if notpublic static final boolean getDumpSpectrogram()
true
if spectrogram being dumped, false
otherwisepublic static final void setDumpWaveGraph(boolean pbDump)
pbDump
- true
if wanted, false
if notpublic static final boolean getDumpWaveGraph()
true
if graph wanted being dumped, false
otherwisepublic static final void setCurrentSubject(int piSubjectID)
piSubjectID
- integer ID of the subjectpublic static final int getCurrentSubject()
public static final void setSampleLoaderPluginClass(java.lang.String pstrClassName) throws MARFException
pstrClassName
- class name of the plug-in sample loader module
MARFException
- if class cannot be loaded for any reasonpublic static final void setSampleLoaderPluginClass(java.lang.Class poClass) throws MARFException
poClass
- class representing a sample loader plug-in object
MARFException
- if the parameter is null
public static final java.lang.Class getSampleLoaderPluginClass()
public static final void setPreprocessingPluginClass(java.lang.String pstrClassName) throws MARFException
pstrClassName
- class name of the plug-in preprocessing module
MARFException
- if class cannot be loaded for any reasonpublic static final void setPreprocessingPluginClass(java.lang.Class poClass) throws MARFException
poClass
- class representing a preprocessing plug-in object
MARFException
- if the parameter is null
public static final java.lang.Class getPreprocessingPluginClass()
public static final void setFeatureExtractionPluginClass(java.lang.String pstrClassName) throws MARFException
pstrClassName
- class name of the plug-in feature extraction module
MARFException
- if class cannot be loaded for any reasonpublic static final void setFeatureExtractionPluginClass(java.lang.Class poClass) throws MARFException
poClass
- class representing a feature extraction plug-in object
MARFException
- if the parameter is null
public static final java.lang.Class getFeatureExtractionPluginClass()
public static final void setClassificationPluginClass(java.lang.String pstrClassName) throws MARFException
pstrClassName
- class name of the plug-in classification module
MARFException
- if class cannot be loaded for any reasonpublic static final void setClassificationPluginClass(java.lang.Class poClass) throws MARFException
poClass
- class representing a classification plug-in object
MARFException
- if the parameter is null
public static final java.lang.Class getClassificationPluginClass()
public static final java.lang.String getVersion()
MINOR_REVISION
public static final int getIntVersion()
MAJOR_VERSION * 1000 + MINOR_VERSION * 100 + REVISION * 10 + MINOR_REVISION
MAJOR_VERSION
,
MINOR_VERSION
,
REVISION
,
MINOR_REVISION
public static final double getDoubleVersion()
MAJOR_VERSION * 100 + MINOR_VERSION * 10 + REVISION + MINOR_REVISION / 10
MAJOR_VERSION
,
MINOR_VERSION
,
REVISION
,
MINOR_REVISION
public static final java.lang.String getConfig()
public static final Sample getSample()
Sample
reference.
public static final ISampleLoader getSampleLoader()
SampleLoader
reference.
public static final IPreprocessing getPreprocessing()
Preprocessing
reference.
public static final IFeatureExtraction getFeatureExtraction()
FeatureExtraction
reference.
public static final IClassification getClassification()
Classification
reference.
public static final int queryResultID()
public static final Result getResult()
public static final ResultSet getResultSet()
public static final void recognize() throws MARFException
MARFException
- if there was an error in the pipeline
or classificationpublic static final void train() throws MARFException
MARFException
- if the subject is unset or there was
an error in training in the underlying classification modulepublic static void checkSettings() throws MARFException
MARFException
- if any of the settings are unsetpublic static final void streamedRecognition()
NotImplementedException
public static java.lang.String getMARFSourceCodeRevision()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |