<commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 25 10:18:40 2016

Morphology detector provided by <NAME>.
Reprogrammed to python by <NAME>..

If you use this detector please cite!



@author: jan_cimbalnik
"""
import pickle,os

from scipy.signal import butter, filtfilt, hilbert
import numpy as np

from ..signal_transform import *
from ..feature_extraction import *
from ..thresholds import *
from ..io.data_operations import *

# TODO - finish function help

# %% Presets - Sergey's custom filter
mod_dir = os.path.split(__file__)[0]
filter_coefs = pickle.load(open(mod_dir+'Morphology_detector.pkl','rb'))

# %% Morphology detector

def morphology_detect(data, fs, low_fc, high_fc, mark,<commit_msg>Minor fix, so that the custom filter is included.<commit_after>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 25 10:18:40 2016

Morphology detector provided by <NAME>.
Reprogrammed to python by <NAME>..

If you use this detector please cite!



@author: jan_cimbalnik
"""
import pickle,os

from scipy.signal import butter, filtfilt, hilbert
import numpy as np

from ..signal_transform import *
from ..feature_extraction import *
from ..thresholds import *
from ..io.data_operations import *

# TODO - finish function help

# %% Presets - Sergey's custom filter
mod_dir = os.path.split(__file__)[0]
filter_coefs = pickle.load(open(mod_dir+'/Morphology_detector.pkl','rb'))

# %% Morphology detector

def morphology_detect(data, fs, low_fc, high_fc, mark,
{'fraction_non_alphanumeric': 0.11815181518151815, 'fraction_numerical': 0.019801980198019802, 'mean_word_length': 4.635687732342007, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6332089', 'n_tokens_mistral': 542, 'n_tokens_neox': 498, 'n_words': 155}