list/src/test/java/CorpusTests.java

43 lines
1.4 KiB
Java
Raw Normal View History

2018-06-19 07:15:37 +00:00
import java.io.File;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOCase;
import org.apache.commons.io.filefilter.FileFilterUtils;
import org.apache.commons.io.filefilter.TrueFileFilter;
import org.junit.Test;
import data.*;
import javafx.collections.ObservableList;
public class CorpusTests {
@Test
public void solarTest() {
//File selectedDirectory = new File("/home/andrej/Desktop/corpus-analyzer/src/main/resources/Solar");
// File selectedDirectory = new File("/home/andrej/Desktop/corpus-analyzer/src/main/resources/GOS");
File selectedDirectory = new File("/home/luka/Developement/corpus-analyzer2/src/main/resources/Gigafida_subset");
2018-06-19 07:15:37 +00:00
Settings.resultsFilePath = new File(selectedDirectory.getAbsolutePath().concat(File.separator));
Settings.corpus = FileUtils.listFiles(selectedDirectory, FileFilterUtils.suffixFileFilter("xml", IOCase.INSENSITIVE), TrueFileFilter.INSTANCE);
File f = Settings.corpus.iterator().next();
Statistics stats = new Statistics(AnalysisLevel.STRING_LEVEL, 2, 0, CalculateFor.WORD);
// stats.setCorpusType(CorpusType.GOS);
stats.setCorpusType(CorpusType.SOLAR);
// XML_processing.readXMLGos(f.toString(), stats);
// XML_processing.readXML(f.toString(), stats);
// XML_processing.readXMLHeaderTag(f.toString(), "stats");
}
@Test
public void test() {
ObservableList<String> var = GosTaxonomy.getForComboBox();
String debug = "";
}
}