<commit_before>package de.unistuttgart.ims.drama.main.annotation;

import java.io.IOException;

import org.apache.uima.UIMAException;
import org.apache.uima.collection.CollectionReaderDescription;
import org.apache.uima.fit.factory.AggregateBuilder;
import org.apache.uima.fit.factory.AnalysisEngineFactory;
import org.apache.uima.fit.factory.CollectionReaderFactory;
import org.apache.uima.fit.pipeline.SimplePipeline;
import org.apache.uima.resource.ResourceInitializationException;

import com.lexicalscope.jewel.cli.CliFactory;

import de.tudarmstadt.ukp.dkpro.core.io.xmi.XmiWriter;
import de.tudarmstadt.ukp.dkpro.core.tokit.BreakIteratorSegmenter;
import de.unistuttgart.ims.drama.main.Options;
import de.unistuttgart.quadrama.core.CreateDkproCoreference;
import de.unistuttgart.quadrama.io.tei.textgrid.GerDraCorUrlReader;

public class Export {

	public static void main(String[] args) throws ResourceInitializationException, UIMAException, IOException {
		Options options = CliFactory.parseArguments(Options.class, args);

		CollectionReaderDescription reader = CollectionReaderFactory.createReaderDescription(GerDraCorUrlReader.class,
				GerDraCorUrlReader.PARAM_INPUT, options.getInput(), GerDraCorUrlReader.PARAM_TEI_COMPAT, true,
				GerDraCorUrlReader.PARAM_CLEANUP, true);

		AggregateBuilder builder = new AggregateBuilder();
		builder.add(AnalysisEngineFactory.createEngineDescription(BreakIteratorSegmenter.class,
				BreakIteratorSegmenter.PARAM_WRITE_SENTENCE, false));
		builder.add(AnalysisEngineFactory.createEngineDescription(CreateDkproCoreference.class,
				CreateDkproCoreference.PARAM_INCLUDE_SPEAKERS, true));
		builder.add(AnalysisEngineFactory.createEngineDescription(XmiWriter.class, XmiWriter.PARAM_TARGET_LOCATION,
				options.getOutput()));

		SimplePipeline.runPipeline(reader, builder.createAggregateDescription());
	}

}<commit_msg>All three at once<commit_after>package de.unistuttgart.ims.drama.main.annotation;

import java.io.IOException;

import org.apache.uima.UIMAException;
import org.apache.uima.collection.CollectionReaderDescription;
import org.apache.uima.fit.factory.AggregateBuilder;
import org.apache.uima.fit.factory.AnalysisEngineFactory;
import org.apache.uima.fit.factory.CollectionReaderFactory;
import org.apache.uima.fit.pipeline.SimplePipeline;
import org.apache.uima.resource.ResourceInitializationException;

import com.lexicalscope.jewel.cli.CliFactory;

import de.tudarmstadt.ukp.dkpro.core.io.xmi.XmiWriter;
import de.tudarmstadt.ukp.dkpro.core.tokit.BreakIteratorSegmenter;
import de.unistuttgart.ims.drama.main.Options;
import de.unistuttgart.quadrama.core.CreateDkproCoreference;
import de.unistuttgart.quadrama.io.tei.textgrid.GerDraCorUrlReader;

public class Export {

	public static void main(String[] args) throws ResourceInitializationException, UIMAException, IOException {

		runMain("AnnikaHaag",
				new String[] { "--input",
						"/Users/reiterns/Documents/QuaDramA/Coreference Annotations/annotations_last_tei/AH.xml",
						"--output", "/Users/reiterns/Documents/QuaDramA/Coreference Annotations/WebAnno-Start/AH" });
		runMain("AnjaSchmelzle",
				new String[] { "--input",
						"/Users/reiterns/Documents/QuaDramA/Coreference Annotations/annotations_last_tei/AS.xml",
						"--output", "/Users/reiterns/Documents/QuaDramA/Coreference Annotations/WebAnno-Start/AS" });
		runMain("SonjaEberhardt",
				new String[] { "--input",
						"/Users/reiterns/Documents/QuaDramA/Coreference Annotations/annotations_last_tei/SE.xml",
						"--output", "/Users/reiterns/Documents/QuaDramA/Coreference Annotations/WebAnno-Start/SE" });
	}

	public static void runMain(String documentId, String[] args) throws UIMAException, IOException {
		Options options = CliFactory.parseArguments(Options.class, args);

		CollectionReaderDescription reader = CollectionReaderFactory.createReaderDescription(GerDraCorUrlReader.class,
				GerDraCorUrlReader.PARAM_INPUT, options.getInput(), GerDraCorUrlReader.PARAM_TEI_COMPAT, true,
				GerDraCorUrlReader.PARAM_CLEANUP, true);

		AggregateBuilder builder = new AggregateBuilder();
		builder.add(AnalysisEngineFactory.createEngineDescription(BreakIteratorSegmenter.class,
				BreakIteratorSegmenter.PARAM_WRITE_SENTENCE, false));
		builder.add(AnalysisEngineFactory.createEngineDescription(CreateDkproCoreference.class,
				CreateDkproCoreference.PARAM_INCLUDE_SPEAKERS, true));
		builder.add(AnalysisEngineFactory.createEngineDescription(XmiWriter.class, XmiWriter.PARAM_TARGET_LOCATION,
				options.getOutput()));

		SimplePipeline.runPipeline(reader, builder.createAggregateDescription());
	}

}
{'fraction_non_alphanumeric': 0.10264756944444445, 'fraction_numerical': 0.0, 'mean_word_length': 6.720268006700167, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1571309', 'n_tokens_mistral': 1545, 'n_tokens_neox': 1428, 'n_words': 180}