-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspellcheck.h
More file actions
executable file
·36 lines (30 loc) · 852 Bytes
/
spellcheck.h
File metadata and controls
executable file
·36 lines (30 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef _CHECK_H
#define _CHECK_H
#include <iostream>
#include <fstream>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <sstream>
#include <ctime>
#include <set>
#include "hash.h"
using namespace std;
class dictionary{
public:
//Constructor
dictionary(){};
//Function that reads in the dictionary
void loadDictionary(const string &dictionaryFileName);
//Function that reads in the file to be spellchecked
void readFile(const string fileToCheckName, const string outFileName);
private:
//HashTable that stores the dictionary
hashTable *h = new hashTable();
//Function that converts all strings into lower case
string toLowerCase(const string &word);
//boolean to get rid of all invalid words
bool isValidWord(const char c);
bool hasDigits(const string& word);
};
#endif //_CHECK_H