<commit_before>package uk.ac.ebi.quickgo.indexer.statistics;

import uk.ac.ebi.quickgo.miscellaneous.Miscellaneous;
import uk.ac.ebi.quickgo.solr.indexing.service.miscellaneous.MiscellaneousIndexer;
import uk.ac.ebi.quickgo.solr.mapper.SolrMapper;
import uk.ac.ebi.quickgo.solr.mapper.miscellaneous.SolrMiscellaneousMapper;
import uk.ac.ebi.quickgo.solr.model.miscellaneous.SolrMiscellaneous;
import uk.ac.ebi.quickgo.solr.query.service.annotation.AnnotationRetrieval;
import uk.ac.ebi.quickgo.solr.query.service.annotation.AnnotationRetrievalImpl;
import uk.ac.ebi.quickgo.solr.server.SolrServerProcessor;
import uk.ac.ebi.quickgo.solr.server.SolrServerProcessorImpl;

/**
 * @Author <NAME>
 * Date: 15/09/2015
 * Time: 14:38
 * Created with IntelliJ IDEA.
 */
public class CooccurenceStatsIndexIntegrationTest {

	private static final String ANNOTATION_SOLR_URL = "http://ves-hx-cf.ebi.ac.uk:8090/Solr/annotation";
	private static final String MISC_SOLR_URL = "http://ves-hx-cf.ebi.ac.uk:8090/Solr/miscellaneous";

	public static void main(String[] args) {

		QuickGOCOOccurrenceStatsIndexer statsIndexer = new QuickGOCOOccurrenceStatsIndexer();

		//Setup talking to the solr server for annotations
		SolrServerProcessorImpl annotationServerProcessor = new SolrServerProcessorImpl();
		annotationServerProcessor.setSolrURL(ANNOTATION_SOLR_URL);

		//Set up an object to retrieve the annotations from solr
		AnnotationRetrievalImpl annotationRetrieval  = new  AnnotationRetrievalImpl();
		annotationRetrieval.setAnnotationServerProcessor(annotationServerProcessor);

		//Setup talking to the solr server for miscellaneous
		SolrServerProcessorImpl miscServerProcessor = new SolrServerProcessorImpl();
		miscServerProcessor.setSolrURL(MISC_SOLR_URL);

		SolrMapper<Miscellaneous, SolrMiscellaneous> miscMapper = new SolrMiscellaneousMapper();


		//Setup an object to publish the stats calculations too
		MiscellaneousIndexer miscellaneousIndexer = new MiscellaneousIndexer();
		miscellaneousIndexer.setSolrServerProcessor(miscServerProcessor);
		miscellaneousIndexer.setSolrMapper(miscMapper);

		//Set up an object to index the stats
		statsIndexer.annotationRetrieval = annotationRetrieval;
		statsIndexer.miscellaneousIndexer = miscellaneousIndexer;


		statsIndexer.index();
	}
}<commit_msg>Spit out any exceptions.<commit_after>package uk.ac.ebi.quickgo.indexer.statistics;

import uk.ac.ebi.quickgo.miscellaneous.Miscellaneous;
import uk.ac.ebi.quickgo.solr.indexing.service.miscellaneous.MiscellaneousIndexer;
import uk.ac.ebi.quickgo.solr.mapper.SolrMapper;
import uk.ac.ebi.quickgo.solr.mapper.miscellaneous.SolrMiscellaneousMapper;
import uk.ac.ebi.quickgo.solr.model.miscellaneous.SolrMiscellaneous;
import uk.ac.ebi.quickgo.solr.query.service.annotation.AnnotationRetrieval;
import uk.ac.ebi.quickgo.solr.query.service.annotation.AnnotationRetrievalImpl;
import uk.ac.ebi.quickgo.solr.server.SolrServerProcessor;
import uk.ac.ebi.quickgo.solr.server.SolrServerProcessorImpl;

/**
 * @Author <NAME>
 * Date: 15/09/2015
 * Time: 14:38
 * Created with IntelliJ IDEA.
 */
public class CooccurenceStatsIndexIntegrationTest {

	private static final String ANNOTATION_SOLR_URL = "http://ves-hx-cf.ebi.ac.uk:8090/Solr/annotation";
	private static final String MISC_SOLR_URL = "http://ves-hx-cf.ebi.ac.uk:8090/Solr/miscellaneous";

	public static void main(String[] args) {

		QuickGOCOOccurrenceStatsIndexer statsIndexer = new QuickGOCOOccurrenceStatsIndexer();

		//Setup talking to the solr server for annotations
		SolrServerProcessorImpl annotationServerProcessor = new SolrServerProcessorImpl();
		annotationServerProcessor.setSolrURL(ANNOTATION_SOLR_URL);

		//Set up an object to retrieve the annotations from solr
		AnnotationRetrievalImpl annotationRetrieval  = new  AnnotationRetrievalImpl();
		annotationRetrieval.setAnnotationServerProcessor(annotationServerProcessor);

		//Setup talking to the solr server for miscellaneous
		SolrServerProcessorImpl miscServerProcessor = new SolrServerProcessorImpl();
		miscServerProcessor.setSolrURL(MISC_SOLR_URL);

		SolrMapper<Miscellaneous, SolrMiscellaneous> miscMapper = new SolrMiscellaneousMapper();


		//Setup an object to publish the stats calculations too
		MiscellaneousIndexer miscellaneousIndexer = new MiscellaneousIndexer();
		miscellaneousIndexer.setSolrServerProcessor(miscServerProcessor);
		miscellaneousIndexer.setSolrMapper(miscMapper);

		//Set up an object to index the stats
		statsIndexer.annotationRetrieval = annotationRetrieval;
		statsIndexer.miscellaneousIndexer = miscellaneousIndexer;


		try {
			statsIndexer.index();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
{'fraction_non_alphanumeric': 0.0889031705227078, 'fraction_numerical': 0.00856898029134533, 'mean_word_length': 6.084977238239757, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2660299', 'n_tokens_mistral': 1667, 'n_tokens_neox': 1461, 'n_words': 264}