24 lines
821 B
C++
24 lines
821 B
C++
#ifndef WORDUTILS_H
|
|
#define WORDUTILS_H
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <unordered_map>
|
|
#include <map>
|
|
#include <iostream>
|
|
#include "../include/DataType.h"
|
|
|
|
using namespace std;
|
|
|
|
struct WordUtils {
|
|
static map<string, map<string, int>> load_data(const string& path);
|
|
static vector<string> load_css(const string& path);
|
|
static vector<string> predict_next_word(const string& input, const map<string, map<string, int>>& word_frequencies, size_t count);
|
|
static string load_file(const string& path);
|
|
static vector<string> split_string(const string& input, data_type type);
|
|
static string extract_url(const string& input);
|
|
static string create_tag(const map<string, map<string, int>>& word_frequencies, const char& hash);
|
|
static unsigned int hash_url(const string& input);
|
|
};
|
|
|
|
#endif |