Skip to content

Instantly share code, notes, and snippets.

@dulimarta
Last active January 29, 2016 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dulimarta/91e1a576e43a2c0e2382 to your computer and use it in GitHub Desktop.
Save dulimarta/91e1a576e43a2c0e2382 to your computer and use it in GitHub Desktop.
CS263 TextPredictor.h
//
// Created by Hans Dulimarta
//
#ifndef TEXTPREDICTOR_TEXTPREDICTOR_H
#define TEXTPREDICTOR_TEXTPREDICTOR_H
#include <fstream>
#include <vector>
#include <map>
#include <set>
#include <unordered_map>
using namespace std;
class TextPredictor {
private:
/* TODO: declare your data structures here */
public:
TextPredictor();
void scanWordsFrom (istream&);
vector<string> wordsFromPrefix (const string& a_prefix) const;
vector<string> wordsAfter (const string& a_word) const;
private:
string lowercaseof (const string&) const;
/* TODO add your private functions here */
};
#endif //TEXTPREDICTOR_TEXTPREDICTOR_H
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment