<commit_before>#from .descriptors.rootsift import RootSIFT
from ..convenience import is_cv2
import cv2
from .dense import DENSE
from .gftt import GFTT
from .harris import HARRIS
from .rootsift import RootSIFT

if is_cv2():
    FeatureDetector_create = cv2.FeatureDetector_create
    DescriptorExtractor_create = cv2.DescriptorExtractor_create
    DescriptorMatcher_create = cv2.DescriptorMatcher_create

else:
    try:
        _DETECTOR_FACTORY = {"BRISK": cv2.BRISK_create,
                             "DENSE": DENSE,
                             "FAST": cv2.FastFeatureDetector_create,
                             "GFTT": GFTT,
                             "HARRIS": HARRIS,
                             "MSER": cv2.MSER_create,
                             "ORB": cv2.ORB_create,
                             "SIFT": cv2.xfeatures2d.SIFT_create,
                             "SURF": cv2.xfeatures2d.SURF_create,
                             "STAR": cv2.xfeatures2d.StarDetector_create
                             }
<commit_msg>fix compatibility issue<commit_after>from ..convenience import is_cv2
import cv2
from .dense import DENSE
from .gftt import GFTT
from .harris import HARRIS
from .rootsift import RootSIFT

if is_cv2():
    def FeatureDetector_create(method):
        return cv2.FeatureDetector_create(method)

    def DescriptorExtractor_create(method):
        return cv2.DescriptorExtractor_create(method)

    def DescriptorMatcher_create(method):
        return cv2.DescriptorMatcher_create(method)

else:
    try:
        _DETECTOR_FACTORY = {"BRISK": cv2.BRISK_create,
                             "DENSE": DENSE,
                             "FAST": cv2.FastFeatureDetector_create,
                             "GFTT": GFTT,
                             "HARRIS": HARRIS,
                             "MSER": cv2.MSER_create,
                             "ORB": cv2.ORB_create,
                             "SIFT": cv2.xfeatures2d.SIFT_create,
                             "SURF": cv2.xfeatures2d.SURF_create,
                             "STAR": cv2.xfeatures2d.StarDetector_create
                             }

{'fraction_non_alphanumeric': 0.07443820224719101, 'fraction_numerical': 0.0149812734082397, 'mean_word_length': 1.5934466019417475, 'pattern_counts': {'":': 20, '<': 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': '5367949', 'n_tokens_mistral': 646, 'n_tokens_neox': 621, 'n_words': 118}