<commit_before>/**
 * @file User.h
 * @author <NAME>
 * @date 2011-04-18
 */

#ifndef USER_H
#define USER_H

#include "RecTypes.h"
#include <util/ustring/UString.h>

#include <string>
#include <map>

#include <boost/serialization/access.hpp>

namespace sf1r
{

struct User
{
    /** id supplied by SF1 user */
    std::string idStr_;

    /** mapping from property name to UString value */
    typedef std::map<std::string, izenelib::util::UString> PropValueMap;
    PropValueMap propValueMap_;

    template<class Archive>
    void serialize(Archive & ar, const unsigned int version)
    {
        ar & idStr_;
        ar & propValueMap_;
    }

    bool operator==(User& other) const
    {
        if (propValueMap_.size() != other.propValueMap_.size()) {
            return false;
        }

        for (PropValueMap::const_iterator iter = propValueMap_.begin();
                iter != propValueMap_.end(); iter ++)
        {
            if (other.propValueMap_[(iter->first)] != iter->second) {
                return false;
            }
        }

        return true;
    }
};

} // namespace sf1r

#endif // USER_H<commit_msg>remove useless code in User.h<commit_after>/**
 * @file User.h
 * @author <NAME>
 * @date 2011-04-18
 */

#ifndef USER_H
#define USER_H

#include "RecTypes.h"
#include <util/ustring/UString.h>

#include <string>
#include <map>

#include <boost/serialization/access.hpp>

namespace sf1r
{

struct User
{
    /** id supplied by SF1 user */
    std::string idStr_;

    /** mapping from property name to UString value */
    typedef std::map<std::string, izenelib::util::UString> PropValueMap;
    PropValueMap propValueMap_;

    template<class Archive>
    void serialize(Archive & ar, const unsigned int version)
    {
        ar & idStr_;
        ar & propValueMap_;
    }
};

} // namespace sf1r

#endif // USER_H
{'fraction_non_alphanumeric': 0.12965964343598055, 'fraction_numerical': 0.011885467314964884, 'mean_word_length': 2.6101364522417154, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, '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': '1868016', 'n_tokens_mistral': 629, 'n_tokens_neox': 603, 'n_words': 150}