[marf-cvs] marf/src/marf MARF.java,1.13,1.14
Brought to you by:
mokhov
From: <mo...@us...> - 2002-11-30 22:07:56
|
Update of /cvsroot/marf/marf/src/marf In directory sc8-pr-cvs1:/tmp/cvs-serv12359/marf Modified Files: MARF.java Log Message: MARF now includes and invokes all the modules, so few similar potential compile problems fixed in the unimplemented modules. Index: MARF.java =================================================================== RCS file: /cvsroot/marf/marf/src/marf/MARF.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** MARF.java 24 Nov 2002 16:16:21 -0000 1.13 --- MARF.java 30 Nov 2002 22:07:52 -0000 1.14 *************** *** 14,17 **** --- 14,18 ---- import marf.Preprocessing.*; import marf.Preprocessing.Dummy.*; + import marf.Preprocessing.BandpassFilter.*; import marf.FeatureExtraction.*; *************** *** 19,26 **** --- 20,30 ---- import marf.FeatureExtraction.FFT.*; import marf.FeatureExtraction.F0.*; + import marf.FeatureExtraction.Segmentation.*; + import marf.FeatureExtraction.Cepstral.*; import marf.Classification.*; import marf.Classification.NeuralNetwork.*; import marf.Classification.Stochastic.*; + import marf.Classification.Markov.*; /** *************** *** 40,44 **** public static final int FILTER = 1; */ ! public static final int DUMMY = 0; /* --- 44,50 ---- public static final int FILTER = 1; */ ! public static final int DUMMY = 0; ! public static final int FFT_FILTER = 1; ! public static final int BANDPASS_FILTER = 2; /* *************** *** 46,59 **** */ ! public static final int LPC = 0; ! public static final int FFT = 1; ! public static final int F0 = 2; /* ! * Classification Modules */ public static final int NEURAL_NETWORK = 0; public static final int STOCHASTIC = 1; /* --- 52,68 ---- */ ! public static final int LPC = 0; ! public static final int FFT = 1; ! public static final int F0 = 2; ! public static final int SEGMENTATION = 3; ! public static final int CEPSTRAL = 4; /* ! * Classification Modules Ennumeration */ public static final int NEURAL_NETWORK = 0; public static final int STOCHASTIC = 1; + public static final int MARKOV = 2; /* *************** *** 78,89 **** * Current state of MARF */ ! private static int iPreprocessingMethod = UNSET; ! private static int iFeatureExtractionMethod = UNSET; ! private static int iClassificationMethod = UNSET; ! private static int iSampleFormat = UNSET; ! private static String strFileName = ""; ! private static String strSamplesDir = ""; ! private static Result oResult = null; ! private static ModuleParams oModuleParams = null; /** --- 87,98 ---- * Current state of MARF */ ! private static int iPreprocessingMethod = UNSET; ! private static int iFeatureExtractionMethod = UNSET; ! private static int iClassificationMethod = UNSET; ! private static int iSampleFormat = UNSET; ! private static String strFileName = ""; ! private static String strSamplesDir = ""; ! private static Result oResult = null; ! private static ModuleParams oModuleParams = null; /** *************** *** 204,207 **** --- 213,217 ---- { // TODO: Enhance error reporting here + strFileName = "MARF.startRecognitionPipeline() - Some params were unset."; bSetupErrors = true; } *************** *** 248,254 **** oPreprocessing = new Dummy(oSample); break; /* ! case FILTER: ! oPreprocessing = new Filter(oSample); break; --- 258,269 ---- oPreprocessing = new Dummy(oSample); break; + + case BANDPASS_FILTER: + oPreprocessing = new BandpassFilter(oSample); + break; + /* ! case FFT_FILTER: ! oPreprocessing = new FFTFilter(oSample); break; *************** *** 285,288 **** --- 300,311 ---- break; + case SEGMENTATION: + oFeatureExtraction = new Segmentation(oPreprocessing); + break; + + case CEPSTRAL: + oFeatureExtraction = new Cepstral(oPreprocessing); + break; + default: throw new MARFException("Unknown feature extractionprocessing method " + iFeatureExtractionMethod); *************** *** 304,308 **** case STOCHASTIC: ! throw new NotImplementedException("MARF.STOCHASTIC"); default: --- 327,336 ---- case STOCHASTIC: ! oClassification = new Stochastic(oFeatureExtraction); ! break; ! ! case MARKOV: ! oClassification = new Markov(oFeatureExtraction); ! break; default: |