<commit_before>/**
 * Created by jalpanranderi on 11/7/14.
 */
public class Trie {
}<commit_msg>added insert method<commit_after>/**
 *
 * Trie
 *   - root
 *
 * Created by jalpanranderi on 11/7/14.
 */
public class Trie {
    private static Node root = new Node();

    public void insert(String word){
        Node next = root;
        for(int i = 0; i < word.length(); i++){
            char c = word.charAt(i);
            // check if character is present inside the children
            //  false than add it inside the list
            if(!root.children.containsKey(c)){
                root.children.put(c, new Node(c));
            }
            next = root.children.get(c);
        }
    }
}
{'fraction_non_alphanumeric': 0.12571428571428572, 'fraction_numerical': 0.015714285714285715, 'mean_word_length': 1.8380566801619433, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, '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': '6907828', 'n_tokens_mistral': 223, 'n_tokens_neox': 212, 'n_words': 65}