Search in sources :

Example 1 with Analyser

use of io.github.vocabhunter.analysis.model.Analyser in project VocabHunter by VocabHunter.

the class AnalysisSystemTest method setUpClass.

@BeforeClass
public static void setUpClass() throws Exception {
    Analyser analyser = new SimpleAnalyser();
    FileStreamer target = new FileStreamer(analyser);
    URL resource = FileStreamerTest.class.getResource("/" + INPUT_DOCUMENT);
    Path file = Paths.get(resource.toURI());
    EnrichedSessionState enrichedSession = target.createNewSession(file);
    SessionState sessionState = enrichedSession.getState();
    words = sessionState.getOrderedUses();
}
Also used : Path(java.nio.file.Path) SessionState(io.github.vocabhunter.analysis.session.SessionState) EnrichedSessionState(io.github.vocabhunter.analysis.session.EnrichedSessionState) EnrichedSessionState(io.github.vocabhunter.analysis.session.EnrichedSessionState) SimpleAnalyser(io.github.vocabhunter.analysis.simple.SimpleAnalyser) Analyser(io.github.vocabhunter.analysis.model.Analyser) SimpleAnalyser(io.github.vocabhunter.analysis.simple.SimpleAnalyser) URL(java.net.URL) BeforeClass(org.junit.BeforeClass)

Aggregations

Analyser (io.github.vocabhunter.analysis.model.Analyser)1 EnrichedSessionState (io.github.vocabhunter.analysis.session.EnrichedSessionState)1 SessionState (io.github.vocabhunter.analysis.session.SessionState)1 SimpleAnalyser (io.github.vocabhunter.analysis.simple.SimpleAnalyser)1 URL (java.net.URL)1 Path (java.nio.file.Path)1 BeforeClass (org.junit.BeforeClass)1