#ifndef WORDUTILS_H
#define WORDUTILS_H

#include <string>
#include <vector>
#include <unordered_map>
#include "../include/DataType.h"

using namespace std;

struct WordUtils {
    static unordered_map<string, unordered_map<string, int>> load_data(const string& path);
    static string load_css(const string& path);
    static vector<string> predict_next_word(const string& input, const unordered_map<string, unordered_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 extract_user_agent(const string& input);
    static bool contains_image(const string& input);
    static string extract_image_name(const string& input);
    static string create_tag(const unordered_map<string, unordered_map<string, int>>& word_frequencies, const char& hash);
    static string create_link(const unordered_map<string, unordered_map<string, int>>& word_frequencies, unsigned long  hash);
    static string create_image(const string& image);
    static unsigned int hash_url(const string& input);
    static unsigned long djb2Hash(const string& str);
    static unsigned long fnv1aHash(const string& str);
};

#endif