<commit_before>#ifndef NSB_FILE_HPP
#define NSB_FILE_HPP

#include "scriptfile.hpp"

#include <vector>
#include <map>

struct Line
{
    uint16_t Magic;
    std::vector<std::string> Params;
};

class NsbFile : public ScriptFile
{
public:
    NsbFile(const std::string& Name, char* Data = nullptr, uint32_t Size = 0);

    static bool IsValidMagic(uint16_t Magic);
    static const char* StringifyMagic(uint16_t Magic);
    static uint16_t MagicifyString(const char* String);
    Line* GetNextLine();
    uint32_t GetFunctionLine(const char* Name) const;
    void SetSourceIter(uint32_t NewIter);
    uint32_t GetNextLineEntry() const;

private:
    void Read(std::istream* pStream);

    uint32_t SourceIter;
    std::vector<Line> Source;
    std::map<const char*, uint32_t> Functions;
    std::string Name;
};

#endif<commit_msg>Fix fail. Symbol lookup works fine now<commit_after>#ifndef NSB_FILE_HPP
#define NSB_FILE_HPP

#include "scriptfile.hpp"

#include <vector>
#include <map>

struct Line
{
    uint16_t Magic;
    std::vector<std::string> Params;
};

class NsbFile : public ScriptFile
{
public:
    NsbFile(const std::string& Name, char* Data = nullptr, uint32_t Size = 0);

    static bool IsValidMagic(uint16_t Magic);
    static const char* StringifyMagic(uint16_t Magic);
    static uint16_t MagicifyString(const char* String);
    Line* GetNextLine();
    uint32_t GetFunctionLine(const char* Name) const;
    void SetSourceIter(uint32_t NewIter);
    uint32_t GetNextLineEntry() const;

private:
    void Read(std::istream* pStream);

    uint32_t SourceIter;
    std::vector<Line> Source;
    std::map<std::string, uint32_t> Functions;
    std::string Name;
};

#endif
{'fraction_non_alphanumeric': 0.10919881305637982, 'fraction_numerical': 0.024925816023738872, 'mean_word_length': 4.601328903654485, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '308705', 'n_tokens_mistral': 609, 'n_tokens_neox': 572, 'n_words': 148}