<commit_before>from flask import Flask, request

from formatter import Formatter
from bayeser import Bayeser
from fetcher import Fetcher

app = Flask(__name__)

@app.route("/", methods=['POST'])
def hello():
    fetcher = Fetcher()
    ham_phrases  = Formatter(request.form['ham'], "\n").run_all()
    spam_phrases = Formatter(request.form['spam'], "\n").run_all()
    test_phrase = request.form['test']
    classifier = Bayeser(ham_phrases, spam_phrases, test_phrase)
    return classifier.classify()

if __name__ == "__main__":
    app.debug = True
    app.run()<commit_msg>hamster don't need to know about no stinking urls. it just wants the data<commit_after>from flask import Flask, request
from formatter import Formatter
from bayeser import Bayeser

app = Flask(__name__)

@app.route("/", methods=['POST'])
def hello():
    ham_phrases  = Formatter(request.form['ham'], "\n").run_all()
    spam_phrases = Formatter(request.form['spam'], "\n").run_all()
    test_phrase = request.form['test']
    classifier = Bayeser(ham_phrases, spam_phrases, test_phrase)
    return classifier.classify()

if __name__ == "__main__":
    app.debug = True
    app.run()
{'fraction_non_alphanumeric': 0.1371872303710095, 'fraction_numerical': 0.0, 'mean_word_length': 4.658536585365853, 'pattern_counts': {'":': 2, '<': 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': '4059635', 'n_tokens_mistral': 400, 'n_tokens_neox': 392, 'n_words': 96}