20 lines
565 B
C++
20 lines
565 B
C++
#ifndef WORDUTILS_H
|
|
#define WORDUTILS_H
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <unordered_map>
|
|
#include <map>
|
|
#include <iostream>
|
|
|
|
using namespace std;
|
|
|
|
struct WordUtils {
|
|
static map<string, map<string, int>> load_data(const char *path);
|
|
static vector<string> predictNextWord(const string& input, const map<string, map<string, int>>& model, size_t count);
|
|
static string load_file(const char *path);
|
|
static vector<string> split_string(const string& input, const char *delimiters);
|
|
static string extract_url(const string& input);
|
|
};
|
|
|
|
#endif |