<commit_before>package org.jpc.converter.catalog.primitive;

import org.jpc.converter.ConverterManager;
import org.jpc.term.Term;

public class PrimitiveConverterManager extends ConverterManager<Object, Term> {

	public PrimitiveConverterManager() {
		register(new CharacterConverter());
		register(new StringConverter());
		register(new BooleanConverter());
		register(new NumberConverter());
	}

}<commit_msg>adding extra check to improve performance on Primitive converters<commit_after>package org.jpc.converter.catalog.primitive;

import java.lang.reflect.Type;

import org.jpc.converter.ConverterManager;
import org.jpc.term.Compound;
import org.jpc.term.Term;

public class PrimitiveConverterManager extends ConverterManager<Object, Term> {

	public PrimitiveConverterManager() {
		register(new CharacterConverter());
		register(new StringConverter());
		register(new BooleanConverter());
		register(new NumberConverter());
	}

	@Override
	public boolean canConvertFromTerm(Term term, Type toType) {
		return super.canConvertFromTerm(term, toType) && (!(term instanceof Compound));
	}
	
}
{'fraction_non_alphanumeric': 0.10593607305936073, 'fraction_numerical': 0.0, 'mean_word_length': 6.71830985915493, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7253154', 'n_tokens_mistral': 317, 'n_tokens_neox': 301, 'n_words': 69}