Search in sources :

Example 1 with ManualSynthesizer

use of org.languagetool.synthesis.ManualSynthesizer in project languagetool by languagetool-org.

the class MatchTest method setUp.

//-- setup
@Before
public void setUp() throws Exception {
    tagger = new ManualTaggerAdapter(new ManualTagger(new ByteArrayInputStream(TEST_DATA.getBytes("UTF-8"))));
    synthesizer = new ManualSynthesizerAdapter(new ManualSynthesizer(new ByteArrayInputStream(TEST_DATA.getBytes("UTF-8"))));
    languageTool = new JLanguageTool(new Demo() {

        @Override
        public String getName() {
            return "TEST";
        }

        @Override
        public Synthesizer getSynthesizer() {
            return MatchTest.this.synthesizer;
        }

        @Override
        public Tagger getTagger() {
            return MatchTest.this.tagger;
        }
    });
}
Also used : Demo(org.languagetool.language.Demo) ManualTaggerAdapter(org.languagetool.tokenizers.ManualTaggerAdapter) ByteArrayInputStream(java.io.ByteArrayInputStream) JLanguageTool(org.languagetool.JLanguageTool) ManualSynthesizerAdapter(org.languagetool.synthesis.ManualSynthesizerAdapter) ManualTagger(org.languagetool.tagging.ManualTagger) ManualSynthesizer(org.languagetool.synthesis.ManualSynthesizer) Before(org.junit.Before)

Aggregations

ByteArrayInputStream (java.io.ByteArrayInputStream)1 Before (org.junit.Before)1 JLanguageTool (org.languagetool.JLanguageTool)1 Demo (org.languagetool.language.Demo)1 ManualSynthesizer (org.languagetool.synthesis.ManualSynthesizer)1 ManualSynthesizerAdapter (org.languagetool.synthesis.ManualSynthesizerAdapter)1 ManualTagger (org.languagetool.tagging.ManualTagger)1 ManualTaggerAdapter (org.languagetool.tokenizers.ManualTaggerAdapter)1