/*
 * Copyright (C) 2012 Fabian Hirschmann <fabian@hirschm.net>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
package com.github.fhirschmann.clozegen.lib;

/**
 *
 * @author Fabian Hirschmann <fabian@hirschm.net>
 */
public class Test {
    public static void main(String[] args) throws Exception {
        ClozeTestGenerator g = new ClozeTestGenerator();
        g.run();
        System.err.println(g.getPipeline().toString());
    }
}

@@ -825,16 +825,1180 @@
 n.lib;%0A%0A
+import com.github.fhirschmann.clozegen.lib.annotators.en.PrepositionGapGenerator;%0Aimport com.github.fhirschmann.clozegen.lib.io.DebugWriter;%0Aimport com.github.fhirschmann.clozegen.lib.multiset.MapMultiset;%0Aimport com.github.fhirschmann.clozegen.lib.pipeline.DefaultPipeline;%0Aimport com.github.fhirschmann.clozegen.lib.pipeline.Pipeline;%0Aimport com.google.common.base.CharMatcher;%0Aimport com.google.common.base.Charsets;%0Aimport com.google.common.base.Splitter;%0Aimport com.google.common.collect.*;%0Aimport com.google.common.io.Resources;%0Aimport de.tudarmstadt.ukp.dkpro.core.api.frequency.util.ConditionalFrequencyDistribution;%0Aimport de.tudarmstadt.ukp.dkpro.core.api.frequency.util.FrequencyDistribution;%0Aimport java.io.File;%0Aimport java.net.URL;%0Aimport java.util.HashMap;%0Aimport java.util.Iterator;%0Aimport java.util.List;%0Aimport java.util.Map;%0Aimport org.apache.commons.io.FileUtils;%0Aimport org.apache.uima.analysis_engine.AnalysisEngine;%0Aimport org.apache.uima.analysis_engine.AnalysisEngineDescription;%0Aimport org.apache.uima.jcas.JCas;%0Aimport org.uimafit.factory.JCasFactory;%0Aimport static org.uimafit.factory.AnalysisEngineFactory.createPrimitiveDescription;%0A%0A
 /**%0A *%0A 
@@ -2070,16 +2070,17 @@
  Test %7B%0A
+%0A
     publ
@@ -2145,65 +2145,229 @@
     
-ClozeTestGenerator g = new ClozeTestGenerator(
+Pipeline pipeline = new DefaultPipeline();%0A%0A        JCas j = JCasFactory.createJCas();%0A        j.setDocumentLanguage(%22en%22);%0A        j.setDocumentText(%22He studies at the university. He can't think of anything.%22
 );%0A
+%0A
         
 g.ru
@@ -2366,70 +2366,279 @@
     
-g.run();%0A        System.err.println(g.getPipeline().toString()
+AnalysisEngineDescription an = createPrimitiveDescription(PrepositionGapGenerator.class,%0A                PrepositionGapGenerator.PARAM_MODEL_PATH, %22frequency/prepositions%22);%0A        pipeline.addStep(an);%0A        pipeline.addStep(DebugWriter.class);%0A        pipeline.run(j
 );%0A 

test file for prep annotator