<commit_before>import pandas as pd
from stat_parser import Parser
import re
import numpy as np
import unicodedata
import math
import os
import sys
import inspect

#Syntactic Sentence Extraction (SySE)

#What is sentence extraction? 
#Wikipedia has a pretty good description:
#https://en.wikipedia.org/wiki/Sentence_extraction
#If you're offline, it is simply an automatic way to summarize text, by \
#extracing what are thought to be the most important sentences.

#How is this program different from others?
#This program attempts to summarize an article by looking at the syntax of \
#its phrases; it doesn't look at all what words are being used, just at what \
#kinds of words, and the word's dependencies on one another.
class SySE:
    def __init__(self):
        self.loadParameters(inspect.getfile(syse) + '/' + 'default')
    ####Supervised Training.
    #trainingSentences: sentences on which to train (Must already be parsed)
    #labels: corresponding binary (1,0) labels.
    #alpha: laplace/additive smoothing parameter (default = 1)
    def train(self, trainingSentences, labels, alpha = 0.1, beta = 0.1, debug = 0):
        if debug > -1:
            print
            print '*********************************************************'
            print '                   SySE V 0.1 '<commit_msg>Fixed the issue with default parameters (try 2)<commit_after>import pandas as pd
from stat_parser import Parser
import re
import numpy as np
import unicodedata
import math
import os
import sys
import inspect

#Syntactic Sentence Extraction (SySE)

#What is sentence extraction? 
#Wikipedia has a pretty good description:
#https://en.wikipedia.org/wiki/Sentence_extraction
#If you're offline, it is simply an automatic way to summarize text, by \
#extracing what are thought to be the most important sentences.

#How is this program different from others?
#This program attempts to summarize an article by looking at the syntax of \
#its phrases; it doesn't look at all what words are being used, just at what \
#kinds of words, and the word's dependencies on one another.
class SySE:
    def __init__(self):
        self.loadParameters(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) + '/' + 'default')
    ####Supervised Training.
    #trainingSentences: sentences on which to train (Must already be parsed)
    #labels: corresponding binary (1,0) labels.
    #alpha: laplace/additive smoothing parameter (default = 1)
    def train(self, trainingSentences, labels, alpha = 0.1, beta = 0.1, debug = 0):
        if debug > -1:
            print
            print '*********************************************************'
            print '                   SySE V 0.1 '
{'fraction_non_alphanumeric': 0.11836283185840708, 'fraction_numerical': 0.008480825958702065, 'mean_word_length': 3.6218057921635434, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7173629', 'n_tokens_mistral': 760, 'n_tokens_neox': 717, 'n_words': 317}