[marf-cvs] marf/src/marf MARF.java,1.110,1.111
Brought to you by:
mokhov
From: Serguei A. M. <mo...@us...> - 2008-02-20 07:29:12
|
Update of /cvsroot/marf/marf/src/marf In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv8521/marf Modified Files: MARF.java Log Message: Fix a minor bug in Cluser when it was "forgetting" the first filename per subject, as simply the addFilename() call was not made on the new sample event. Enhance some debug output. The rest is cosmetic. Index: MARF.java =================================================================== RCS file: /cvsroot/marf/marf/src/marf/MARF.java,v retrieving revision 1.110 retrieving revision 1.111 diff -C2 -d -r1.110 -r1.111 *** MARF.java 31 Dec 2007 00:17:05 -0000 1.110 --- MARF.java 20 Feb 2008 07:29:03 -0000 1.111 *************** *** 415,419 **** * -------------------------------------------------------- */ ! /** * Provides human-readable description by mapping module constants --- 415,419 ---- * -------------------------------------------------------- */ ! /** * Provides human-readable description by mapping module constants *************** *** 422,426 **** */ public static final Map MODULE_NAMES_MAPPING = new HashMap(); ! static { --- 422,426 ---- */ public static final Map MODULE_NAMES_MAPPING = new HashMap(); ! static { *************** *** 679,683 **** { Configuration oOldConfig = getConfiguration(); ! siPreprocessingMethod = poConfiguration.iPreprocessingMethod; siFeatureExtractionMethod = poConfiguration.iFeatureExtractionMethod; --- 679,683 ---- { Configuration oOldConfig = getConfiguration(); ! siPreprocessingMethod = poConfiguration.iPreprocessingMethod; siFeatureExtractionMethod = poConfiguration.iFeatureExtractionMethod; *************** *** 731,735 **** return oOldConfig; } ! /** * Allows querying for the current MARF configuration. --- 731,735 ---- return oOldConfig; } ! /** * Allows querying for the current MARF configuration. *************** *** 996,1000 **** throw new MARFException("Plugin class cannot be null."); } ! soSampleLoaderPluginClass = poClass; } --- 996,1000 ---- throw new MARFException("Plugin class cannot be null."); } ! soSampleLoaderPluginClass = poClass; } *************** *** 1007,1011 **** public static synchronized final Class getSampleLoaderPluginClass() { ! return soSampleLoaderPluginClass; } --- 1007,1011 ---- public static synchronized final Class getSampleLoaderPluginClass() { ! return soSampleLoaderPluginClass; } *************** *** 1042,1046 **** throw new MARFException("Plugin class cannot be null."); } ! soPreprocessingPluginClass = poClass; } --- 1042,1046 ---- throw new MARFException("Plugin class cannot be null."); } ! soPreprocessingPluginClass = poClass; } *************** *** 1053,1057 **** public static synchronized final Class getPreprocessingPluginClass() { ! return soPreprocessingPluginClass; } --- 1053,1057 ---- public static synchronized final Class getPreprocessingPluginClass() { ! return soPreprocessingPluginClass; } *************** *** 1088,1092 **** throw new MARFException("Plugin class cannot be null."); } ! soFeatureExtractionPluginClass = poClass; } --- 1088,1092 ---- throw new MARFException("Plugin class cannot be null."); } ! soFeatureExtractionPluginClass = poClass; } *************** *** 1099,1103 **** public static synchronized final Class getFeatureExtractionPluginClass() { ! return soFeatureExtractionPluginClass; } --- 1099,1103 ---- public static synchronized final Class getFeatureExtractionPluginClass() { ! return soFeatureExtractionPluginClass; } *************** *** 1134,1138 **** throw new MARFException("Plugin class cannot be null."); } ! soClassificationPluginClass = poClass; } --- 1134,1138 ---- throw new MARFException("Plugin class cannot be null."); } ! soClassificationPluginClass = poClass; } *************** *** 1145,1149 **** public static synchronized final Class getClassificationPluginClass() { ! return soClassificationPluginClass; } --- 1145,1149 ---- public static synchronized final Class getClassificationPluginClass() { ! return soClassificationPluginClass; } *************** *** 1151,1155 **** * Returns a string representation of the MARF version. * As of 0.3.0.3 MINOR_REVISION is also returned. ! * * @return version String * @see #MINOR_REVISION --- 1151,1155 ---- * Returns a string representation of the MARF version. * As of 0.3.0.3 MINOR_REVISION is also returned. ! * * @return version String * @see #MINOR_REVISION *************** *** 1343,1347 **** throw new ClassificationException("Training returned false."); } ! //XXX batch: soClassification.dump(); } --- 1343,1347 ---- throw new ClassificationException("Training returned false."); } ! //XXX batch: soClassification.dump(); } *************** *** 1377,1381 **** synchronized(sstrFileName) { ! Debug.debug("Loading sample \"" + getSampleFile() + "\""); soSampleLoader = SampleLoaderFactory.create(siSampleFormat); --- 1377,1381 ---- synchronized(sstrFileName) { ! Debug.debug("MARF: Loading sample \"" + getSampleFile() + "\""); soSampleLoader = SampleLoaderFactory.create(siSampleFormat); *************** *** 1389,1403 **** synchronized(soSample) { ! Debug.debug("Preprocessing..."); soPreprocessing = PreprocessingFactory.create(siPreprocessingMethod, soSample); ! synchronized(soPreprocessing) { // TODO: [SM]: Should this be in the preprocessing itself somewhere? ! if(sbDumpWaveGraph) { ! Debug.debug("Dumping initial wave graph..."); ! new WaveGrapher ( --- 1389,1403 ---- synchronized(soSample) { ! Debug.debug("MARF: Preprocessing..."); soPreprocessing = PreprocessingFactory.create(siPreprocessingMethod, soSample); ! synchronized(soPreprocessing) { // TODO: [SM]: Should this be in the preprocessing itself somewhere? ! if(sbDumpWaveGraph) { ! Debug.debug("MARF: Dumping initial wave graph..."); ! new WaveGrapher ( *************** *** 1410,1421 **** } ! Debug.debug("Invoking preprocess() of " + soPreprocessing.getClass().getName()); soPreprocessing.preprocess(); ! Debug.debug("Done preprocess() of " + soPreprocessing.getClass().getName()); if(sbDumpWaveGraph) { ! Debug.debug("Dumping preprocessed wave graph..."); ! new WaveGrapher ( --- 1410,1421 ---- } ! Debug.debug("MARF: Invoking preprocess() of " + soPreprocessing.getClass().getName()); soPreprocessing.preprocess(); ! Debug.debug("MARF: Done preprocess() of " + soPreprocessing.getClass().getName()); if(sbDumpWaveGraph) { ! Debug.debug("MARF: Dumping preprocessed wave graph..."); ! new WaveGrapher ( *************** *** 1431,1435 **** * Feature Extraction Stage */ ! Debug.debug("Feature extraction..."); soFeatureExtraction = FeatureExtractionFactory.create(siFeatureExtractionMethod, soPreprocessing); --- 1431,1435 ---- * Feature Extraction Stage */ ! Debug.debug("MARF: Feature extraction..."); soFeatureExtraction = FeatureExtractionFactory.create(siFeatureExtractionMethod, soPreprocessing); *************** *** 1441,1447 **** * Classification Stage */ ! Debug.debug("Classification..."); soClassification = ClassificationFactory.create(siClassificationMethod, soFeatureExtraction); ! /* * Classification ends in here, as it is continue in one --- 1441,1447 ---- * Classification Stage */ ! Debug.debug("MARF: Classification..."); soClassification = ClassificationFactory.create(siClassificationMethod, soFeatureExtraction); ! /* * Classification ends in here, as it is continue in one *************** *** 1489,1493 **** } } ! /** * Meant to provide implementation of the buffered sample processing for large samples. --- 1489,1493 ---- } } ! /** * Meant to provide implementation of the buffered sample processing for large samples. *************** *** 1715,1719 **** */ private static int siNgramModel = ENgramModels.BIGRAM; ! /** * Current natural language. --- 1715,1719 ---- */ private static int siNgramModel = ENgramModels.BIGRAM; ! /** * Current natural language. |