<commit_before>#ifndef __OPKELE_DISCOVERY_H
#define __OPKELE_DISCOVERY_H

#include <string>
#include <opkele/types.h>

namespace opkele {
    using std::string;

    struct idiscovery_t;

    void idiscover(idiscovery_t& result,const string& identity);

    struct idiscovery_t {
	bool xri_identity;
	string normalized_id;
	string canonicalized_id;
	xrd::XRD_t xrd;

	idiscovery_t(const string& i) {
	    idiscover(*this,i);
	}
	idiscovery_t(const char *i) {
	    idiscover(*this,i);
	}

	void clear() {
	    normalized_id.clear(); canonicalized_id.clear();
	    xrd.clear();
	}
    };
}

#endif /* __OPKELE_DISCOVERY_H */<commit_msg>idiscovery_t() default constructor and a couple of helpers Signed-off-by: <NAME> <<EMAIL>><commit_after>#ifndef __OPKELE_DISCOVERY_H
#define __OPKELE_DISCOVERY_H

#include <string>
#include <opkele/types.h>

namespace opkele {
    using std::string;

    struct idiscovery_t;

    void idiscover(idiscovery_t& result,const string& identity);

    struct idiscovery_t {
	bool xri_identity;
	string normalized_id;
	string canonicalized_id;
	xrd::XRD_t xrd;

	idiscovery_t() { }
	idiscovery_t(const string& i) {
	    idiscover(*this,i);
	}
	idiscovery_t(const char *i) {
	    idiscover(*this,i);
	}

	void clear() {
	    normalized_id.clear(); canonicalized_id.clear();
	    xrd.clear();
	}

	idiscovery_t& operator=(const string& i) {
	    idiscover(*this,i); return *this; }
	idiscovery_t& operator=(const char *i) {
	    idiscover(*this,i); return *this; }
    };
}

#endif /* __OPKELE_DISCOVERY_H */
{'fraction_non_alphanumeric': 0.1258148631029987, 'fraction_numerical': 0.0, 'mean_word_length': 4.329861111111111, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, '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': '3277699', 'n_tokens_mistral': 611, 'n_tokens_neox': 587, 'n_words': 113}