<commit_before>package org.apache.uima.alchemy.digester;

import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;

import org.apache.commons.digester.Digester;
import org.apache.uima.alchemy.digester.domain.Entities;
import org.apache.uima.alchemy.digester.domain.Entity;
import org.apache.uima.alchemy.digester.domain.Results;
import org.xml.sax.SAXException;


public class EntityExtractionDigester implements AlchemyOutputDigester{
	
	public Results parseAlchemyXML(InputStream stream) throws IOException, SAXException, URISyntaxException {
		Digester digester = new Digester();
		digester.setValidating( false );

		digester.addObjectCreate("results",Results.class);
		digester.addBeanPropertySetter("results/status","status");
		digester.addBeanPropertySetter("results/language","language");
		digester.addObjectCreate("results/entities",Entities.class);
		digester.addObjectCreate("results/entities/entity",Entity.class);
		digester.addBeanPropertySetter("results/entities/entity/type","type");
		digester.addBeanPropertySetter("results/entities/entity/relevance","relevance");
		digester.addBeanPropertySetter("results/entities/entity/count","count");
		digester.addBeanPropertySetter("results/entities/entity/text","text");
		//TODO try to get the disambiguation results if any
		try {
			
		}
		catch (Exception e) {
			
		}
		digester.addSetNext("results/entities/entity", "addEntity" );
		
		return (Results)digester.parse(stream);
	}

}<commit_msg>resolved entities binding issue on digester<commit_after>package org.apache.uima.alchemy.digester;

import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;

import org.apache.commons.digester.Digester;
import org.apache.uima.alchemy.digester.domain.Entities;
import org.apache.uima.alchemy.digester.domain.Entity;
import org.apache.uima.alchemy.digester.domain.Results;
import org.xml.sax.SAXException;


public class EntityExtractionDigester implements AlchemyOutputDigester{
	
	public Results parseAlchemyXML(InputStream stream) throws IOException, SAXException, URISyntaxException {
		Digester digester = new Digester();
		digester.setValidating( false );

		digester.addObjectCreate("results",Results.class);
		digester.addBeanPropertySetter("results/status","status");
		digester.addBeanPropertySetter("results/language","language");
		digester.addObjectCreate("results/entities",Entities.class);
		digester.addObjectCreate("results/entities/entity",Entity.class);
		digester.addBeanPropertySetter("results/entities/entity/type","type");
		digester.addBeanPropertySetter("results/entities/entity/relevance","relevance");
		digester.addBeanPropertySetter("results/entities/entity/count","count");
		digester.addBeanPropertySetter("results/entities/entity/text","text");
		//TODO try to get the disambiguation results if any
		try {
			
		}
		catch (Exception e) {
			
		}
		digester.addSetNext("results/entities/entity", "addEntity" );
		digester.addSetNext("results/entities","setEntities");
		
		return (Results)digester.parse(stream);
	}

}
{'fraction_non_alphanumeric': 0.12211757063981812, 'fraction_numerical': 0.0, 'mean_word_length': 6.4939172749391725, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1118756', 'n_tokens_mistral': 994, 'n_tokens_neox': 915, 'n_words': 132}