<commit_before>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package net.domesdaybook.compiler.multisequence;

import java.util.List;
import net.domesdaybook.automata.AssociatedState;
import net.domesdaybook.compiler.CompileException;
import net.domesdaybook.compiler.Compiler;
import net.domesdaybook.compiler.automata.TrieCompiler;
import net.domesdaybook.matcher.multisequence.TrieMatcher;
import net.domesdaybook.matcher.sequence.SequenceMatcher;

/**
 *
 * @author matt
 */
public class TrieMatcherCompiler implements Compiler<TrieMatcher, List<SequenceMatcher>> {

    private static TrieMatcherCompiler defaultCompiler;
    public static TrieMatcher trieMatcherFrom(List<SequenceMatcher> expression) throws CompileException {
        defaultCompiler = new TrieMatcherCompiler();
        return defaultCompiler.compile(expression);
    }
    
    
    final Compiler<AssociatedState<SequenceMatcher>, List<SequenceMatcher>> compiler;
   
    
    public TrieMatcherCompiler() {
        this(null);<commit_msg>Added convenience static compilers if the defaults are acceptable.<commit_after>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package net.domesdaybook.compiler.multisequence;

import java.util.List;
import net.domesdaybook.automata.AssociatedState;
import net.domesdaybook.compiler.CompileException;
import net.domesdaybook.compiler.Compiler;
import net.domesdaybook.compiler.automata.TrieCompiler;
import net.domesdaybook.matcher.multisequence.TrieMatcher;
import net.domesdaybook.matcher.sequence.SequenceMatcher;

/**
 *
 * @author matt
 */
public final class TrieMatcherCompiler implements Compiler<TrieMatcher, List<SequenceMatcher>> {

    private static TrieMatcherCompiler defaultCompiler;
    public static TrieMatcher trieMatcherFrom(List<SequenceMatcher> expression) throws CompileException {
        defaultCompiler = new TrieMatcherCompiler();
        return defaultCompiler.compile(expression);
    }
    
    
    final Compiler<AssociatedState<SequenceMatcher>, List<SequenceMatcher>> compiler;
   
    
    public TrieMatcherCompiler() {
        this(null);
{'fraction_non_alphanumeric': 0.081474738279472, 'fraction_numerical': 0.0, 'mean_word_length': 4.989100817438692, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '3873237', 'n_tokens_mistral': 599, 'n_tokens_neox': 594, 'n_words': 132}