<commit_before>/**
 * 
 */
package edu.ucdenver.ccp.nlp.pipelines.evaluation;

import java.util.Collection;
import java.util.Set;

import org.apache.uima.collection.CollectionReader;
import org.apache.uima.collection.CollectionReaderDescription;
import org.apache.uima.resource.ResourceInitializationException;
import org.apache.uima.resource.metadata.TypeSystemDescription;
import org.uimafit.factory.CollectionReaderFactory;

import edu.ucdenver.ccp.craft.CraftConceptType;
import edu.ucdenver.ccp.craft.CraftRelease;
import edu.ucdenver.ccp.craft.uima.cr.CcpCraftCollectionReader;
import edu.ucdenver.ccp.nlp.ext.uima.annotators.comparison.AnnotationComparator_AE.MentionComparatorType;
import edu.ucdenver.ccp.nlp.ext.uima.annotators.comparison.AnnotationComparator_AE.SpanComparatorType;

/**
 * @author Colorado Computational Pharmacology, UC Denver; <EMAIL>
 * 
 */
public class CraftEvaluationPipeline extends EvaluationPipeline {

	/**
	 * @param craftRelease
	 * @param conceptTypesToLoad
	 * @param spanComparatorType
	 * @param mentionComparatorType
	 * @param tsd
	 * @param annotationTypeRegexes
	 * @throws ResourceInitializationException
	 */
	public CraftEvaluationPipeline(CraftRelease craftRelease, Set<CraftConceptType> conceptTypesToLoad,
			TypeSystemDescription tsd, SpanComparatorType spanComparatorType,
			MentionComparatorType mentionComparatorType, Collection<String> annotationTypeRegexes)
			throws ResourceInitializationException {
		super(tsd, getCraftCollectionReader(craftRelease, conceptTypesToLoad), spanComparatorType,
				mentionComparatorType, annotationTypeRegexes);
	}

	/**
	 * @param craftRelease
	 * @param conceptTypesToLoad
	 * @return a {@link CollectionReader} component for the specified {@link CraftRelease}
	 *         initialized to include the {@link CraftConceptType}s noted in the input
	 * @throws ResourceInitializationException
	 */
	private static CollectionReader getCraftCollectionReader(CraftRelease craftRelease,
			Set<CraftConceptType> conceptTypesToLoad) throws ResourceInitializationException {
		CollectionReaderDescription crDesc = CcpCraftCollectionReader.getDescription(craftRelease, conceptTypesToLoad);
		return CollectionReaderFactory.createCollectionReader(crDesc);
	}

}<commit_msg>changed visibility of getCraftCollectionReader to public<commit_after>/**
 * 
 */
package edu.ucdenver.ccp.nlp.pipelines.evaluation;

import java.util.Collection;
import java.util.Set;

import org.apache.uima.collection.CollectionReader;
import org.apache.uima.collection.CollectionReaderDescription;
import org.apache.uima.resource.ResourceInitializationException;
import org.apache.uima.resource.metadata.TypeSystemDescription;
import org.uimafit.factory.CollectionReaderFactory;

import edu.ucdenver.ccp.craft.CraftConceptType;
import edu.ucdenver.ccp.craft.CraftRelease;
import edu.ucdenver.ccp.craft.uima.cr.CcpCraftCollectionReader;
import edu.ucdenver.ccp.nlp.ext.uima.annotators.comparison.AnnotationComparator_AE.MentionComparatorType;
import edu.ucdenver.ccp.nlp.ext.uima.annotators.comparison.AnnotationComparator_AE.SpanComparatorType;

/**
 * @author Colorado Computational Pharmacology, UC Denver; <EMAIL>
 * 
 */
public class CraftEvaluationPipeline extends EvaluationPipeline {

	/**
	 * @param craftRelease
	 * @param conceptTypesToLoad
	 * @param spanComparatorType
	 * @param mentionComparatorType
	 * @param tsd
	 * @param annotationTypeRegexes
	 * @throws ResourceInitializationException
	 */
	public CraftEvaluationPipeline(CraftRelease craftRelease, Set<CraftConceptType> conceptTypesToLoad,
			TypeSystemDescription tsd, SpanComparatorType spanComparatorType,
			MentionComparatorType mentionComparatorType, Collection<String> annotationTypeRegexes)
			throws ResourceInitializationException {
		super(tsd, getCraftCollectionReader(craftRelease, conceptTypesToLoad), spanComparatorType,
				mentionComparatorType, annotationTypeRegexes);
	}

	/**
	 * @param craftRelease
	 * @param conceptTypesToLoad
	 * @return a {@link CollectionReader} component for the specified {@link CraftRelease}
	 *         initialized to include the {@link CraftConceptType}s noted in the input
	 * @throws ResourceInitializationException
	 */
	public static CollectionReader getCraftCollectionReader(CraftRelease craftRelease,
			Set<CraftConceptType> conceptTypesToLoad) throws ResourceInitializationException {
		CollectionReaderDescription crDesc = CcpCraftCollectionReader.getDescription(craftRelease, conceptTypesToLoad);
		return CollectionReaderFactory.createCollectionReader(crDesc);
	}

}
{'fraction_non_alphanumeric': 0.0785432207108381, 'fraction_numerical': 0.0, 'mean_word_length': 6.727118644067796, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '5112747', 'n_tokens_mistral': 1318, 'n_tokens_neox': 1254, 'n_words': 235}