marf
Class MARF

java.lang.Object
  extended by marf.MARF

public class MARF
extends java.lang.Object

Provides basic recognition pipeline and its configuration.

$Id: MARF.java,v 1.111 2008/02/20 07:29:03 mokhov Exp $

Since:
0.0.1
Version:
$Revision: 1.111 $
Author:
Serguei Mokhov, Stephen Sinclair, The MARF Research and Development Group

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

UNSET

public static final int UNSET
Value indicating that some configuration parameter is not set.

See Also:
Constant Field Values

DUMMY

public static final int DUMMY
Indicates to use Dummy preprocessing module (just normalization).

See Also:
Constant Field Values

HIGH_FREQUENCY_BOOST_FFT_FILTER

public static final int HIGH_FREQUENCY_BOOST_FFT_FILTER
Indicates to use filter boosting high frequencies.

See Also:
Constant Field Values

BANDPASS_FFT_FILTER

public static final int BANDPASS_FFT_FILTER
Indicates to use band-pass filter.

See Also:
Constant Field Values

ENDPOINT

public static final int ENDPOINT
Indicates to use endpointing.

See Also:
Constant Field Values

LOW_PASS_FFT_FILTER

public static final int LOW_PASS_FFT_FILTER
Indicates to use low-pass FFT filter.

See Also:
Constant Field Values

HIGH_PASS_FFT_FILTER

public static final int HIGH_PASS_FFT_FILTER
Indicates to use high-pass FFT filter.

See Also:
Constant Field Values

HIGH_PASS_BOOST_FILTER

public static final int HIGH_PASS_BOOST_FILTER
Indicates to use high-pass high-frequency boost FFT filter.

Since:
0.3.0.1
See Also:
Constant Field Values

RAW

public static final int RAW
Indicates to use raw preprocessing, which means no preprocessing.

Since:
0.3.0.2
See Also:
Constant Field Values

PREPROCESSING_PLUGIN

public static final int PREPROCESSING_PLUGIN
Indicates to employ user-defined preprocessing plug-in.

Since:
0.3.0.3
See Also:
Constant Field Values

LOW_PASS_CFE_FILTER

public static final int LOW_PASS_CFE_FILTER
Indicates to use low-pass CFE filter.

Since:
0.3.0.6
See Also:
Constant Field Values

HIGH_PASS_CFE_FILTER

public static final int HIGH_PASS_CFE_FILTER
Indicates to use high-pass CFE filter.

Since:
0.3.0.6
See Also:
Constant Field Values

BAND_PASS_CFE_FILTER

public static final int BAND_PASS_CFE_FILTER
Indicates to use band-pass CFE filter.

Since:
0.3.0.6
See Also:
Constant Field Values

BAND_STOP_CFE_FILTER

public static final int BAND_STOP_CFE_FILTER
Indicates to use band-stop CFE filter.

Since:
0.3.0.6
See Also:
Constant Field Values

BAND_STOP_FFT_FILTER

public static final int BAND_STOP_FFT_FILTER
Indicates to use band-stop FFT filter.

Since:
0.3.0.6
See Also:
Constant Field Values

MAX_PREPROCESSING_METHOD

public static final int MAX_PREPROCESSING_METHOD
Upper boundary for preprocessing methods enumeration. Used in error checks. *Update it when add more methods.*

Since:
0.3.0.1
See Also:
Constant Field Values

MIN_PREPROCESSING_METHOD

public static final int MIN_PREPROCESSING_METHOD
Lower boundary for preprocessing methods enumeration. Used in error checks.

Since:
0.3.0.1
See Also:
Constant Field Values

LPC

public static final int LPC
Indicates to use LPC.

See Also:
Constant Field Values

FFT

public static final int FFT
Indicates to use FFT.

See Also:
Constant Field Values

F0

public static final int F0
Indicates to use F0.

See Also:
Constant Field Values

SEGMENTATION

public static final int SEGMENTATION
Indicates to use segmentation.

See Also:
Constant Field Values

CEPSTRAL

public static final int CEPSTRAL
Indicates to use cepstral analysis.

See Also:
Constant Field Values

RANDOM_FEATURE_EXTRACTION

public static final int RANDOM_FEATURE_EXTRACTION
Indicates to use random feature extraction.

Since:
0.2.0
See Also:
Constant Field Values

MIN_MAX_AMPLITUDES

public static final int MIN_MAX_AMPLITUDES
Indicates to use min/max amplitude extraction.

Since:
0.3.0
See Also:
Constant Field Values

FEATURE_EXTRACTION_PLUGIN

public static final int FEATURE_EXTRACTION_PLUGIN
Indicates to employ user-defined feature extraction plug-in.

Since:
0.3.0.3
See Also:
Constant Field Values

FEATURE_EXTRACTION_AGGREGATOR

public static final int FEATURE_EXTRACTION_AGGREGATOR
Indicates to use an aggregation of several feature extraction modules. The modules to aggregate must be specified in the MARF's ModuleParams.

Since:
0.3.0.5
See Also:
FeatureExtractionAggregator, setModuleParams(ModuleParams), Constant Field Values

MAX_FEATUREEXTRACTION_METHOD

public static final int MAX_FEATUREEXTRACTION_METHOD
Upper boundary for feature extraction methods enumeration. Used in error checks. *Update it when add more methods.*

Since:
0.3.0.1
See Also:
Constant Field Values

MIN_FEATUREEXTRACTION_METHOD

public static final int MIN_FEATUREEXTRACTION_METHOD
Lower boundary for feature extraction methods enumeration. Used in error checks.

Since:
0.3.0.1
See Also:
Constant Field Values

NEURAL_NETWORK

public static final int NEURAL_NETWORK
Indicates to use Neural Network for classification.

See Also:
Constant Field Values

STOCHASTIC

public static final int STOCHASTIC
Indicates to use stochastic models for classification.

See Also:
Constant Field Values

MARKOV

public static final int MARKOV
Indicates to use Hidden Markov Models for classification.

See Also:
Constant Field Values

EUCLIDEAN_DISTANCE

public static final int EUCLIDEAN_DISTANCE
Indicates to use Euclidean distance for classification.

See Also:
Constant Field Values

CHEBYSHEV_DISTANCE

public static final int CHEBYSHEV_DISTANCE
Indicates to use Chebyshev distance for classification.

See Also:
Constant Field Values

MANHATTAN_DISTANCE

public static final int MANHATTAN_DISTANCE
A synonym to Chebyshev distance.

Since:
0.2.0
See Also:
Constant Field Values

CITYBLOCK_DISTANCE

public static final int CITYBLOCK_DISTANCE
A synonym to Chebyshev distance.

Since:
0.3.0.1
See Also:
Constant Field Values

MINKOWSKI_DISTANCE

public static final int MINKOWSKI_DISTANCE
Indicates to use Minkowski distance for classification.

Since:
0.2.0
See Also:
Constant Field Values

MAHALANOBIS_DISTANCE

public static final int MAHALANOBIS_DISTANCE
Indicates to use Mahalanobis distance for classification.

Since:
0.2.0
See Also:
Constant Field Values

RANDOM_CLASSIFICATION

public static final int RANDOM_CLASSIFICATION
Indicates to use random classification.

Since:
0.2.0
See Also:
Constant Field Values

DIFF_DISTANCE

public static final int DIFF_DISTANCE
Indicates to use diff-distance classification.

Since:
0.3.0.2
See Also:
Constant Field Values

CLASSIFICATION_PLUGIN

public static final int CLASSIFICATION_PLUGIN
Indicates to employ user-defined classification plug-in.

Since:
0.3.0.3
See Also:
Constant Field Values

ZIPFS_LAW

public static final int ZIPFS_LAW
Indicates to employ Zipf's Law-based classifier.

Since:
0.3.0.6
See Also:
Constant Field Values

HAMMING_DISTANCE

public static final int HAMMING_DISTANCE
Indicates to use the Hamming distance classifier.

Since:
0.3.0.6
See Also:
Constant Field Values

COSINE_SIMILARITY_MEASURE

public static final int COSINE_SIMILARITY_MEASURE
Indicates to use the cosine similarity measure classifier.

Since:
0.3.0.6
See Also:
Constant Field Values

MAX_CLASSIFICATION_METHOD

public static final int MAX_CLASSIFICATION_METHOD
Upper boundary for classification methods enumeration. Used in error checks. *Update it when add more methods.*

Since:
0.3.0.1
See Also:
Constant Field Values

MIN_CLASSIFICATION_METHOD

public static final int MIN_CLASSIFICATION_METHOD
Lower boundary for classification methods enumeration. Used in error checks.

Since:
0.3.0.1
See Also:
Constant Field Values

WAV

public static final int WAV
Indicates WAVE incoming sample file format.

See Also:
Constant Field Values

ULAW

public static final int ULAW
Indicates ULAW incoming sample file format.

See Also:
Constant Field Values

MP3

public static final int MP3
Indicates MP3 incoming sample file format.

See Also:
Constant Field Values

SINE

public static final int SINE
Sine sample format.

Since:
0.3.0.2
See Also:
Constant Field Values

AIFF

public static final int AIFF
AIFF sample format.

Since:
0.3.0.2
See Also:
Constant Field Values

AIFFC

public static final int AIFFC
AIFF-C sample format.

Since:
0.3.0.2
See Also:
Constant Field Values

AU

public static final int AU
AU sample format.

Since:
0.3.0.2
See Also:
Constant Field Values

SND

public static final int SND
SND sample format.

Since:
0.3.0.2
See Also:
Constant Field Values

MIDI

public static final int MIDI
MIDI sample format.

Since:
0.3.0.2
See Also:
Constant Field Values

CUSTOM

public static final int CUSTOM
Custom (plug-in) sample format.

Since:
0.3.0.5
See Also:
Constant Field Values

TEXT

public static final int TEXT
Textual sample format.

Since:
0.3.0.6
See Also:
Constant Field Values

MODULE_NAMES_MAPPING

public static final java.util.Map MODULE_NAMES_MAPPING
Provides human-readable description by mapping module constants to their names.

Since:
0.3.0.6

MAJOR_VERSION

public static final int MAJOR_VERSION
Indicates major MARF version, like 1.x.x. As of 0.3.0.3 made public. As of 0.3.0.5 is always equals to Version.MAJOR_VERSION.

See Also:
Version.MAJOR_VERSION, Constant Field Values

MINOR_VERSION

public static final int MINOR_VERSION
Indicates minor MARF version, like 1.1.x. As of 0.3.0.3 made public. As of 0.3.0.5 is always equals to Version.MINOR_VERSION.

See Also:
Version.MINOR_VERSION, Constant Field Values

REVISION

public static final int REVISION
Indicates MARF revision, like 1.1.1. As of 0.3.0.3 made public. As of 0.3.0.5 is always equals to Version.REVISION.

See Also:
Version.REVISION, Constant Field Values

MINOR_REVISION

public static final int MINOR_REVISION
Indicates MARF minor development revision, like 1.1.1.1. This is primarily for development releases. On the final release the counting stops and is reset to 0 every minor version. As of 0.3.0.3 made public. As of 0.3.0.5 is always equals to Version.MINOR_REVISION.

Since:
0.3.0.2
See Also:
MINOR_VERSION, Version.MINOR_REVISION, Constant Field Values
Method Detail

setConfiguration

public static final Configuration setConfiguration(Configuration poConfiguration)
                                            throws MARFException
Allows setting a complete MARF configuration parameters.

Parameters:
poConfiguration - the configuration parameters
Returns:
previous configuration
Throws:
MARFException - in case of any exception
Since:
0.3.0.6

getConfiguration

public static final Configuration getConfiguration()
Allows querying for the current MARF configuration.

Returns:
encapsulated configuration parameters object
Since:
0.3.0.6

setPreprocessingMethod

public static final void setPreprocessingMethod(int piPreprocessingMethod)
                                         throws MARFException
Sets preprocessing method to be used.

Parameters:
piPreprocessingMethod - one of the allowed preprocessing methods
Throws:
MARFException - if the parameter outside of the valid range

getPreprocessingMethod

public static final int getPreprocessingMethod()
Gets currently selected preprocessing method.

Returns:
one of the preprocessing methods

setFeatureExtractionMethod

public static final void setFeatureExtractionMethod(int piFeatureExtractionMethod)
                                             throws MARFException
Sets feature extraction method to be used.

Parameters:
piFeatureExtractionMethod - one of the allowed feature extraction methods
Throws:
MARFException - if the parameter outside of the valid range

getFeatureExtractionMethod

public static final int getFeatureExtractionMethod()
Gets currently selected feature extraction method.

Returns:
current feature extraction method

setClassificationMethod

public static final void setClassificationMethod(int piClassificationMethod)
                                          throws MARFException
Sets classification method to be used.

Parameters:
piClassificationMethod - one of the allowed classification methods
Throws:
MARFException - if the parameter outside of the valid range

getClassificationMethod

public static final int getClassificationMethod()
Gets classification method to be used.

Returns:
current classification method

setSampleFormat

public static final void setSampleFormat(int piSampleFormat)
Sets input sample file format.

Parameters:
piSampleFormat - one of the allowed sample formats

getSampleFormat

public static final int getSampleFormat()
Gets input sample file format.

Returns:
current sample format

setSampleFile

public static final void setSampleFile(java.lang.String pstrFileName)
Sets input sample file name.

Parameters:
pstrFileName - string representing sample file to be read

getSampleFile

public static final java.lang.String getSampleFile()
Obtains filename of a sample currently being processed.

Returns:
file name of a string representing sample file

setSamplesDir

public static final void setSamplesDir(java.lang.String pstrSamplesDir)
Sets directory with sample files to be read from.

Parameters:
pstrSamplesDir - string representing directory name

setModuleParams

public static final void setModuleParams(ModuleParams poModuleParams)
Sets module-specific parameters an application programmer wishes to pass on to the module.

Parameters:
poModuleParams - parameters' instance

getModuleParams

public static final ModuleParams getModuleParams()
Gets module-specific parameters an application programmer passed on to the module.

Returns:
ModuleParams object reference

setDumpSpectrogram

public static final void setDumpSpectrogram(boolean pbDump)
Indicates whether spectrogram is wanted as an output of a FeatureExtraction module.

Parameters:
pbDump - true if wanted, false if not

getDumpSpectrogram

public static final boolean getDumpSpectrogram()
Whether spectrogram wanted or not.

Returns:
true if spectrogram being dumped, false otherwise

setDumpWaveGraph

public static final void setDumpWaveGraph(boolean pbDump)
Indicates whether wave graph is wanted as an output.

Parameters:
pbDump - true if wanted, false if not

getDumpWaveGraph

public static final boolean getDumpWaveGraph()
Whether wave graph wanted or not.

Returns:
true if graph wanted being dumped, false otherwise

setCurrentSubject

public static final void setCurrentSubject(int piSubjectID)
Sets ID of a subject currently being trained on.

Parameters:
piSubjectID - integer ID of the subject

getCurrentSubject

public static final int getCurrentSubject()
Gets ID of a subject currently being trained on.

Returns:
integer ID of the subject
Since:
0.2.0

setSampleLoaderPluginClass

public static final void setSampleLoaderPluginClass(java.lang.String pstrClassName)
                                             throws MARFException
Allows loading a sample loader plug-in by its name.

Parameters:
pstrClassName - class name of the plug-in sample loader module
Throws:
MARFException - if class cannot be loaded for any reason
Since:
0.3.0.5

setSampleLoaderPluginClass

public static final void setSampleLoaderPluginClass(java.lang.Class poClass)
                                             throws MARFException
Allows setting a loaded sample loader plug-in class.

Parameters:
poClass - class representing a sample loader plug-in object
Throws:
MARFException - if the parameter is null
Since:
0.3.0.5

getSampleLoaderPluginClass

public static final java.lang.Class getSampleLoaderPluginClass()
Allows querying for the current preprocessing plug-in class.

Returns:
the internal plug-in class
Since:
0.3.0.5

setPreprocessingPluginClass

public static final void setPreprocessingPluginClass(java.lang.String pstrClassName)
                                              throws MARFException
Allows loading a preprocessing plug-in by its name.

Parameters:
pstrClassName - class name of the plug-in preprocessing module
Throws:
MARFException - if class cannot be loaded for any reason
Since:
0.3.0.4

setPreprocessingPluginClass

public static final void setPreprocessingPluginClass(java.lang.Class poClass)
                                              throws MARFException
Allows setting a loaded preprocessing plug-in class.

Parameters:
poClass - class representing a preprocessing plug-in object
Throws:
MARFException - if the parameter is null
Since:
0.3.0.4

getPreprocessingPluginClass

public static final java.lang.Class getPreprocessingPluginClass()
Allows querying for the current preprocessing plug-in class.

Returns:
the internal plug-in class
Since:
0.3.0.4

setFeatureExtractionPluginClass

public static final void setFeatureExtractionPluginClass(java.lang.String pstrClassName)
                                                  throws MARFException
Allows loading a feature extraction plug-in by its name.

Parameters:
pstrClassName - class name of the plug-in feature extraction module
Throws:
MARFException - if class cannot be loaded for any reason
Since:
0.3.0.4

setFeatureExtractionPluginClass

public static final void setFeatureExtractionPluginClass(java.lang.Class poClass)
                                                  throws MARFException
Allows setting a loaded feature extraction class plug-in class.

Parameters:
poClass - class representing a feature extraction plug-in object
Throws:
MARFException - if the parameter is null
Since:
0.3.0.4

getFeatureExtractionPluginClass

public static final java.lang.Class getFeatureExtractionPluginClass()
Allows querying for the current feature extraction plug-in class.

Returns:
the internal plug-in class
Since:
0.3.0.4

setClassificationPluginClass

public static final void setClassificationPluginClass(java.lang.String pstrClassName)
                                               throws MARFException
Allows loading a classification plug-in by its name.

Parameters:
pstrClassName - class name of the plug-in classification module
Throws:
MARFException - if class cannot be loaded for any reason
Since:
0.3.0.4

setClassificationPluginClass

public static final void setClassificationPluginClass(java.lang.Class poClass)
                                               throws MARFException
Allows setting a loaded classification plug-in class.

Parameters:
poClass - class representing a classification plug-in object
Throws:
MARFException - if the parameter is null
Since:
0.3.0.4

getClassificationPluginClass

public static final java.lang.Class getClassificationPluginClass()
Allows querying for the current classification plug-in class.

Returns:
the internal plug-in class
Since:
0.3.0.4

getVersion

public static final java.lang.String getVersion()
Returns a string representation of the MARF version. As of 0.3.0.3 MINOR_REVISION is also returned.

Returns:
version String
See Also:
MINOR_REVISION

getIntVersion

public static final int getIntVersion()
Returns an integer representation of the MARF version. As of 0.3.0.3, MINOR_REVISION is included into calculations and the formula changed to begin with 1000 as a MAJOR_VERSION coefficient.

Returns:
integer version as MAJOR_VERSION * 1000 + MINOR_VERSION * 100 + REVISION * 10 + MINOR_REVISION
See Also:
MAJOR_VERSION, MINOR_VERSION, REVISION, MINOR_REVISION

getDoubleVersion

public static final double getDoubleVersion()
Retrieves double version of MARF. Unlike the integer version, the double one begins with 100 and the minor revision is returned after the point, e.g. 123.4 for 1.2.3.4.

Returns:
double version as MAJOR_VERSION * 100 + MINOR_VERSION * 10 + REVISION + MINOR_REVISION / 10
Since:
0.3.0.3
See Also:
MAJOR_VERSION, MINOR_VERSION, REVISION, MINOR_REVISION

getConfig

public static final java.lang.String getConfig()
Returns a string representation of the current MARF configuration.

Returns:
configuration string

getSample

public static final Sample getSample()
Retrieves current Sample reference.

Returns:
Sample object
Since:
0.2.0

getSampleLoader

public static final ISampleLoader getSampleLoader()
Retrieves current SampleLoader reference.

Returns:
SampleLoader object
Since:
0.2.0

getPreprocessing

public static final IPreprocessing getPreprocessing()
Retrieves current Preprocessing reference.

Returns:
Preprocessing object
Since:
0.2.0

getFeatureExtraction

public static final IFeatureExtraction getFeatureExtraction()
Retrieves current FeatureExtraction reference.

Returns:
FeatureExtraction object
Since:
0.2.0

getClassification

public static final IClassification getClassification()
Retrieves current Classification reference.

Returns:
Classification object
Since:
0.2.0

queryResultID

public static final int queryResultID()
Queries for the final classification result.

Returns:
integer ID of the identified subject

getResult

public static final Result getResult()
Gets the entire Result object of the likely outcome.

Returns:
Result ID and all the statistics of the classification

getResultSet

public static final ResultSet getResultSet()
Gets the entire collection of results.

Returns:
ResultSet object with one or more results.
Since:
0.3.0.2

recognize

public static final void recognize()
                            throws MARFException
Recognition/Identification mode.

Throws:
MARFException - if there was an error in the pipeline or classification
Since:
0.2.0

train

public static final void train()
                        throws MARFException
Training mode.

Throws:
MARFException - if the subject is unset or there was an error in training in the underlying classification module
Since:
0.2.0

checkSettings

public static void checkSettings()
                          throws MARFException
Checks for all necessary settings to be present. Specifically, checks whether preprocessing, feature extraction, classification methods are set as well as the audio sample format. The filename of the sample or a directory must also be present.

Throws:
MARFException - if any of the settings are unset
Since:
0.3.0.5

streamedRecognition

public static final void streamedRecognition()
Meant to provide implementation of the buffered sample processing for large samples. Not implemented.

Throws:
NotImplementedException

getMARFSourceCodeRevision

public static java.lang.String getMARFSourceCodeRevision()
Retrieves class' revision.

Returns:
revision string
Since:
0.3.0.2


SourceForge Logo