<commit_before>/*
 * put your module comment here
 * formatted with JxBeauty (c) <EMAIL>
 */


package  com.swabunga.spell.examples;

import  javax.swing.*;
import  java.awt.*;
import  java.awt.event.*;
import  javax.swing.text.*;
import  com.swabunga.spell.swing.*;
import  com.swabunga.spell.engine.*;
import  java.io.*;


/** This class shows an example of how to use the spell checking capability
 *  on a JTextComponent.
 *
 * @author <NAME> (<EMAIL>)
 */
public class JTextComponentSpellCheckExample extends JFrame {
  private static final String dictionaryFile = "dict.sv";
  private static final String phoneticFile = "swedish_phonet.dat";
  private SpellDictionary dictionary;
  JTextComponent text = null;
  JButton spell = null;

  public JTextComponentSpellCheckExample () {
    setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    addWindowListener(new WindowAdapter() {

      public void windowClosed (WindowEvent e) {
        System.exit(0);
      }
    });
    try {
      dictionary = new SpellDictionary(new File(dictionaryFile));//, new File(phoneticFile));
    } catch (Exception ex) {
      ex.printStackTrace();<commit_msg>Stupid mistake, now uses SpellDictionary again<commit_after>/*
 * put your module comment here
 * formatted with JxBeauty (c) <EMAIL>
 */


package  com.swabunga.spell.examples;

import  javax.swing.*;
import  java.awt.*;
import  java.awt.event.*;
import  javax.swing.text.*;
import  com.swabunga.spell.swing.*;
import  com.swabunga.spell.engine.*;
import  java.io.*;


/** This class shows an example of how to use the spell checking capability
 *  on a JTextComponent.
 *
 * @author <NAME> (<EMAIL>)
 */
public class JTextComponentSpellCheckExample extends JFrame {
  private static final String dictionaryFile = "dict.sv";
  private static final String phoneticFile = "swedish_phonet.dat";
  private SpellDictionary dictionary;
  JTextComponent text = null;
  JButton spell = null;

  public JTextComponentSpellCheckExample () {
    setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    addWindowListener(new WindowAdapter() {

      public void windowClosed (WindowEvent e) {
        System.exit(0);
      }
    });
    try {
      dictionary = new SpellDictionary(new File(dictionaryFile), new File(phoneticFile));
    } catch (Exception ex) {
      ex.printStackTrace();
{'fraction_non_alphanumeric': 0.10795698924731183, 'fraction_numerical': 0.0008602150537634409, 'mean_word_length': 3.845833333333333, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '6000812', 'n_tokens_mistral': 706, 'n_tokens_neox': 697, 'n_words': 192}