<commit_before>#ifndef VERSIONING_H
#define VERSIONING_H

#include <string> //std::string

using std::string;

namespace Versioning
{
    /**
     * \brief Gets an old file content and upgrades it to new version.
     *
     * \param version   Current world data version
     * \param content   String containing old world data structure.
     * \return          World data upgraded.
     */
    string upgrade(int version, string content);

    const int VERSION = 4;

    // Versioning functions
    typedef string (*UpgradeFunc) (string);
    string upgradeFrom1To2(string content);
    string upgradeFrom2To3(string content);
    string upgradeFrom3To4(string content);
    const UpgradeFunc upgrade_funcs[] = {upgradeFrom1To2,
                                         upgradeFrom2To3,
                                         upgradeFrom3To4};
}

#endif // VERSIONING_H<commit_msg>document latest versioning function<commit_after>#ifndef VERSIONING_H
#define VERSIONING_H

#include <string> //std::string

using std::string;

namespace Versioning
{
    /**
     * \brief Gets an old file content and upgrades it to new version.
     *
     * \param version   Current world data version
     * \param content   String containing old world data structure.
     * \return          World data upgraded.
     */
    string upgrade(int version, string content);

    const int VERSION = 4;

    // Versioning functions
    typedef string (*UpgradeFunc) (string);
    string upgradeFrom1To2(string content);
    string upgradeFrom2To3(string content);
    ///Rename attribute "id" to "next" to improve readability
    string upgradeFrom3To4(string content);
    const UpgradeFunc upgrade_funcs[] = {upgradeFrom1To2,
                                         upgradeFrom2To3,
                                         upgradeFrom3To4};
}

#endif // VERSIONING_H
{'fraction_non_alphanumeric': 0.07704741379310345, 'fraction_numerical': 0.014008620689655173, 'mean_word_length': 2.3580470162748646, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1743648', 'n_tokens_mistral': 490, 'n_tokens_neox': 485, 'n_words': 156}