<commit_before>//
//  SpellCorrector.h
//  SoundBoard
//
//  Created by <NAME> on 3/14/15.
//  Copyright (c) 2015 Pure Virtual Studios, LLC. All rights reserved.
//

#ifndef __SoundBoard__SpellCorrector__
#define __SoundBoard__SpellCorrector__

#include <vector>
#include <map>

typedef std::vector<std::string> Vector;
typedef std::map<std::string, int> Dictionary;

class SpellCorrector
{
private:
   void edits(const std::string& word, Vector& result);
   void known(Vector& results, Dictionary& candidates);

   Dictionary dictionary;

public:
   void load(const std::string& filename);
   Dictionary corrections(const std::string& word);
};

#endif /* defined(__SoundBoard__SpellCorrector__) */<commit_msg>Formatting<commit_after>//
//  SpellCorrector.h
//  SoundBoard
//
//  Created by <NAME> on 3/14/15.
//  Copyright (c) 2015 Pure Virtual Studios, LLC. All rights reserved.
//

#ifndef __SoundBoard__SpellCorrector__
#define __SoundBoard__SpellCorrector__

#include <vector>
#include <map>

typedef std::vector<std::string> Vector;
typedef std::map<std::string, int> Dictionary;

class SpellCorrector
{
public:
   void load(const std::string& filename);
   Dictionary corrections(const std::string& word);

private:
   void edits(const std::string& word, Vector& result);
   void known(Vector& results, Dictionary& candidates);

   Dictionary dictionary;
};

#endif /* defined(__SoundBoard__SpellCorrector__) */
{'fraction_non_alphanumeric': 0.12684989429175475, 'fraction_numerical': 0.012684989429175475, 'mean_word_length': 5.042553191489362, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '2622627', 'n_tokens_mistral': 468, 'n_tokens_neox': 447, 'n_words': 120}