|
4 | 4 | import jsymbolic2.configuration.ConfigurationFileData; |
5 | 5 | import jsymbolic2.featureutils.FeatureExtractorAccess; |
6 | 6 | import org.apache.commons.lang3.tuple.ImmutablePair; |
| 7 | +import org.apache.commons.lang3.tuple.Pair; |
7 | 8 | import org.ddmal.jmei2midi.MeiSequence; |
8 | 9 | import org.ddmal.jmei2midi.meielements.meispecific.MeiSpecificStorage; |
9 | 10 |
|
|
19 | 20 | * |
20 | 21 | * @author Cory McKay and Tristano Tenaglia |
21 | 22 | */ |
22 | | -public enum FeatureExtractionJobProcessor { |
23 | | - ; |
| 23 | +public class FeatureExtractionJobProcessor { |
24 | 24 | /* PUBLIC STATIC METHODS ********************************************************************************/ |
25 | 25 |
|
26 | 26 | /** |
@@ -66,11 +66,11 @@ public static List<String> extractAndSaveSpecificFeatures(List<File> paths_of_fi |
66 | 66 | FeatureExtractorAccess.getAllImplementedFeatureExtractors(), |
67 | 67 | features_to_extract, |
68 | 68 | saveInfo.save_overall_recording_features()); |
69 | | - FilesPreprocessor filesPreprocessor = new FilesPreprocessor(paths_of_files_or_folders_to_parse, |
70 | | - printStreams.error_print_stream(), error_log); |
71 | | - FilesReader filesReader = new FilesReader(List.of(new SequencePreprocessor())); |
72 | | - List<ImmutablePair<String, Sequence>> midiPairs = filesReader.extractMidi(filesPreprocessor.getMidiFilesList()); |
73 | | - List<ImmutablePair<String, MeiSequence>> meiPairs = filesReader.extractMei(filesPreprocessor.getMeiFilesList()); |
| 69 | + |
| 70 | + SequenceExtractor sequenceExtractor = new SequenceExtractor(paths_of_files_or_folders_to_parse); |
| 71 | + |
| 72 | + List<Pair<String, Sequence>> midiPairs = sequenceExtractor.getMIDISequences(); |
| 73 | + List<Pair<String, MeiSequence>> meiPairs = sequenceExtractor.getMEISequences(); |
74 | 74 | // Extract features and save the feature values in DataBoard |
75 | 75 | DataBoard dataBoard = FeatureExtractionJobProcessor.extractFeatures(midiPairs, meiPairs, |
76 | 76 | processor, |
@@ -206,8 +206,8 @@ public static List<String> extractAndSaveFeaturesConfigFileSettings(List<File> p |
206 | 206 | * displayed and a direct printing of the associated error message to |
207 | 207 | * standard error. |
208 | 208 | */ |
209 | | - private static DataBoard extractFeatures(List<ImmutablePair<String, Sequence>> midiSequences, |
210 | | - List<ImmutablePair<String, MeiSequence>> meiSequences, |
| 209 | + private static DataBoard extractFeatures(List<Pair<String, Sequence>> midiSequences, |
| 210 | + List<Pair<String, MeiSequence>> meiSequences, |
211 | 211 | MIDIFeatureProcessor processor, |
212 | 212 | String feature_values_save_path, |
213 | 213 | PrintStreams printStreams, List<String> error_log, |
|
0 commit comments