<commit_before>from SUASImageParser import ImageParser
from SUASImageParser.utils.color import bcolors

from options import parseOptions
from options import getOption

import cv2


# ------------------------ Creating option parser -------------------------
parseOptions()


# ------------------------ Ensuring image provided ------------------------
if getOption("image") == None:
    print(bcolors.FAIL + "[Error]" + bcolors.ENDC + " Please provide an image to parse")
    exit(0)


# ------------------------ Loading image & parsing ------------------------
my_parser = ImageParser(mode="ADLC", debug=True)

img = my_parser.parse(getOption("image"))


# ------------------------ Displaying loaded image ------------------------
cv2.imshow("Parsed", img)
cv2.waitKey( 0 )
cv2.destroyAllWindows()
<commit_msg>Remove useless import of OpenCV<commit_after>from SUASImageParser import ImageParser
from SUASImageParser.utils.color import bcolors

from options import parseOptions
from options import getOption


# ------------------------ Creating option parser -------------------------
parseOptions()


# ------------------------ Ensuring image provided ------------------------
if getOption("image") == None:
    print(bcolors.FAIL + "[Error]" + bcolors.ENDC + " Please provide an image to parse")
    exit(0)


# ------------------------ Loading image & parsing ------------------------
my_parser = ImageParser(mode="ADLC", debug=True)

img = my_parser.parse(getOption("image"))


# ------------------------ Displaying loaded image ------------------------
cv2.imshow("Parsed", img)
cv2.waitKey( 0 )
cv2.destroyAllWindows()

{'fraction_non_alphanumeric': 0.31403940886699505, 'fraction_numerical': 0.0067733990147783255, 'mean_word_length': 1.7449324324324325, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3349148', 'n_tokens_mistral': 403, 'n_tokens_neox': 382, 'n_words': 110}