private void loadCustomDataset(String fileName, int maxCount) { try { database.loadFileCustomFormat( fileToPath(fileName), maxCount, Profile.paramInt("sequenceMinSize"), Profile.paramInt("sequenceMaxSize")); } catch (IOException e) { System.out.println("Could not load dataset, IOExeption"); e.printStackTrace(); } }
/** Loads a predefined dataset -- see full list in DatabaseHelper.Format */ private void loadPredefinedDataset(Format format, int maxCount) { // Loading the specified dataset (according to the format) try { switch (format) { case BMS: database.loadFileBMSFormat( fileToPath("BMS.dat"), maxCount, Profile.paramInt("sequenceMinSize"), Profile.paramInt("sequenceMaxSize")); break; case KOSARAK: database.loadFileCustomFormat( fileToPath("kosarak.dat"), maxCount, Profile.paramInt("sequenceMinSize"), Profile.paramInt("sequenceMaxSize")); break; case FIFA: database.loadFileFIFAFormat( fileToPath("FIFA_large.dat"), maxCount, Profile.paramInt("sequenceMinSize"), Profile.paramInt("sequenceMaxSize")); break; case MSNBC: database.loadFileMsnbsFormat( fileToPath("msnbc.seq"), maxCount, Profile.paramInt("sequenceMinSize"), Profile.paramInt("sequenceMaxSize")); break; case SIGN: database.loadFileSignLanguage( fileToPath("sign_language.txt"), maxCount, Profile.paramInt("sequenceMinSize"), Profile.paramInt("sequenceMaxSize")); break; case CANADARM1: database.loadFileSPMFFormat( fileToPath("Canadarm1_actions.txt"), maxCount, Profile.paramInt("sequenceMinSize"), Profile.paramInt("sequenceMaxSize")); break; case CANADARM2: database.loadFileSPMFFormat( fileToPath("Canadarm2_states.txt"), maxCount, Profile.paramInt("sequenceMinSize"), Profile.paramInt("sequenceMaxSize")); break; case SNAKE: database.loadSnakeDataset( fileToPath("snake.dat"), maxCount, Profile.paramInt("sequenceMinSize"), Profile.paramInt("sequenceMaxSize")); break; case BIBLE_CHAR: database.loadFileLargeTextFormatAsCharacter( fileToPath("Bible.txt"), maxCount, Profile.paramInt("sequenceMinSize"), Profile.paramInt("sequenceMaxSize")); break; case BIBLE_WORD: database.loadFileLargeTextFormatAsWords( fileToPath("Bible.txt"), maxCount, Profile.paramInt("sequenceMinSize"), Profile.paramInt("sequenceMaxSize"), true); break; case KORAN_WORD: database.loadFileLargeTextFormatAsWords( fileToPath("koran.txt"), maxCount, Profile.paramInt("sequenceMinSize"), Profile.paramInt("sequenceMaxSize"), false); break; case LEVIATHAN_WORD: database.loadFileLargeTextFormatAsWords( fileToPath("leviathan.txt"), maxCount, Profile.paramInt("sequenceMinSize"), Profile.paramInt("sequenceMaxSize"), false); break; default: System.out.println("Could not load dataset, unknown format."); } } catch (IOException e) { System.out.println("Could not load dataset, IOExeption"); e.printStackTrace(); } }