# Path: insults/classifier.py
# class InsultsSGDRegressor(linear_model.SGDRegressor):
#     def __init__(self,n_iter_per_step=50,max_iter=500,alpha=0.001,penalty='l2',**kwargs):
#     def reset_args(self):
#     def fit(self,X,y):
#     def auc(self,X,y):
#     def staged_predict(self,X):
#     def staged_auc(self,X,y):
#     def predict(self,X,coef=None,intercept=None):
# def scale_predictions(ypred):
# 
# Path: insults/word_lists/google_bad_words.py

# 
# Path: insults/word_lists/racist_words.py

# 
# Path: insults/train.py
# def run_prediction(parser=None, args_in=None, production=False):
#     """
#     Either pick up the arguments from the command line or use the
#     ones pre-packaged for the script.
#     """
#     global train
#     global test_examples
# 
#     if production:
#         logging.info('Running prepackaged arguments (%r)' % args_in)
#         arguments = parser.parse_args(args_in)
#     else:
#         logging.info('Using arguments from command line %r' % args_in)
#         arguments = args_in
# 
#     train,test_examples = initialize(arguments)
#     if arguments.tune:
#         folds = tuning(arguments)
#         save_folds(folds)
#     else:
#         folds = saved_folds()
#     predict(folds,arguments)
#     if arguments.score:
#         score()
# 
# Path: insults/util.py
# def make_sure_path_exists(path):
# def data_file(category, name=None):
# def data_directory(category):
# def log_file(name):
# def save_folds(folds):
# def saved_folds():
# def save_model( clf, location=SAVEFILE_LOCATION ):
# def load_model( location=SAVEFILE_LOCATION, model_filename=MODEL_FILENAME):
# def get_parser():
# def tied_rank(x):
# def auc(actual, posterior):
# def score():
# SAVEFILE_LOCATION = "models/stored/"
# MODEL_FILENAME = "insult_classifier.joblib.pkl"


from insults import classifier
from insults.word_lists.google_bad_words import bad_words
from insults.word_lists.racist_words import racist_list
from insults.train import run_prediction
from insults.util import argsets, load_model, get_parser, data_file
from nltk.tokenize import word_tokenize
import pandas as pd



# API Notes
# - is 1 comment insulting or not?
# - is a certain user/person insulting people?
#   - num insults
#   - % (percentage)
#   - average score
#   - 0-100 ratings
# - how bad is a community for insults?
# - what are the popular insults or phrases
# - worst comment from a group
# - racist comments
# - sexist comments
# - foul language

class Insults(object):
    """
    The package's API object.
    """

    classifier_threshold = 0.5
    clf = None

    @classmethod
    def load_model(cls):

# Path: insults/classifier.py
# class InsultsSGDRegressor(linear_model.SGDRegressor):
#     def __init__(self,n_iter_per_step=50,max_iter=500,alpha=0.001,penalty='l2',**kwargs):
#     def reset_args(self):
#     def fit(self,X,y):
#     def auc(self,X,y):
#     def staged_predict(self,X):
#     def staged_auc(self,X,y):
#     def predict(self,X,coef=None,intercept=None):
# def scale_predictions(ypred):
# 
# Path: insults/word_lists/google_bad_words.py

# 
# Path: insults/word_lists/racist_words.py

# 
# Path: insults/train.py
# def run_prediction(parser=None, args_in=None, production=False):
#     """
#     Either pick up the arguments from the command line or use the
#     ones pre-packaged for the script.
#     """
#     global train
#     global test_examples
# 
#     if production:
#         logging.info('Running prepackaged arguments (%r)' % args_in)
#         arguments = parser.parse_args(args_in)
#     else:
#         logging.info('Using arguments from command line %r' % args_in)
#         arguments = args_in
# 
#     train,test_examples = initialize(arguments)
#     if arguments.tune:
#         folds = tuning(arguments)
#         save_folds(folds)
#     else:
#         folds = saved_folds()
#     predict(folds,arguments)
#     if arguments.score:
#         score()
# 
# Path: insults/util.py
# def make_sure_path_exists(path):
# def data_file(category, name=None):
# def data_directory(category):
# def log_file(name):
# def save_folds(folds):
# def saved_folds():
# def save_model( clf, location=SAVEFILE_LOCATION ):
# def load_model( location=SAVEFILE_LOCATION, model_filename=MODEL_FILENAME):
# def get_parser():
# def tied_rank(x):
# def auc(actual, posterior):
# def score():
# SAVEFILE_LOCATION = "models/stored/"
# MODEL_FILENAME = "insult_classifier.joblib.pkl"


# Path: insults/core.py
from insults import classifier
from insults.word_lists.google_bad_words import bad_words
from insults.word_lists.racist_words import racist_list
from insults.train import run_prediction
from insults.util import argsets, load_model, get_parser, data_file
from nltk.tokenize import word_tokenize
import pandas as pd




# API Notes
# - is 1 comment insulting or not?
# - is a certain user/person insulting people?
#   - num insults
#   - % (percentage)
#   - average score
#   - 0-100 ratings
# - how bad is a community for insults?
# - what are the popular insults or phrases
# - worst comment from a group
# - racist comments
# - sexist comments
# - foul language

class Insults(object):
    """
    The package's API object.
    """

    classifier_threshold = 0.5
    clf = None

    @classmethod
    def load_model(cls):

        cls.clf = load_model()