<commit_before>/*
 * Modified version of PerceptualHash.h
 * Source location: https://github.com/pippy360/transformationInvariantImageSearch/blob/master/fullEndToEndDemo/src/PerceptualHash.h
 */
#ifndef REVERSE_IMAGE_SEARCH_PERCEPTUALHASH_H
#define REVERSE_IMAGE_SEARCH_PERCEPTUALHASH_H

#include <string>
#include <vector>
#include <memory>
#include <iomanip>
#include <opencv2/opencv.hpp>

#include "KeyPoint.h"
#include "img_hash_opencv_module/phash.hpp

using namespace std;


class PerceptualHash {
  private:
      vector<bool> hash_;
      vector<KeyPoint> shape_;

      /**
       * Converts the hash to a hex string
       * @param hash
       * @return string
       */
      static std::string ConvertHashToString(vector<bool> hash) {
          std::string ret = "";
          int h = 0;
          for (unsigned int i = 0; i < hash.size(); i++) {<commit_msg>Apply missing closing quote<commit_after>/*
 * Modified version of PerceptualHash.h
 * Source location: https://github.com/pippy360/transformationInvariantImageSearch/blob/master/fullEndToEndDemo/src/PerceptualHash.h
 */
#ifndef REVERSE_IMAGE_SEARCH_PERCEPTUALHASH_H
#define REVERSE_IMAGE_SEARCH_PERCEPTUALHASH_H

#include <string>
#include <vector>
#include <memory>
#include <iomanip>
#include <opencv2/opencv.hpp>

#include "KeyPoint.h"
#include "img_hash_opencv_module/phash.hpp"

using namespace std;


class PerceptualHash {
  private:
      vector<bool> hash_;
      vector<KeyPoint> shape_;

      /**
       * Converts the hash to a hex string
       * @param hash
       * @return string
       */
      static std::string ConvertHashToString(vector<bool> hash) {
          std::string ret = "";
          int h = 0;
          for (unsigned int i = 0; i < hash.size(); i++) {
{'fraction_non_alphanumeric': 0.10997150997150996, 'fraction_numerical': 0.006837606837606838, 'mean_word_length': 3.479591836734694, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 19, 'https://': 2, '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': '3677168', 'n_tokens_mistral': 593, 'n_tokens_neox': 568, 'n_words': 131}