<commit_before># coding=utf-8
import os, sys
sys.path.append(os.path.join(os.path.dirname(__file__), 'lib'))
sys.path.append(os.path.join(os.path.dirname(__file__), 'lib/ext'))

from bottle import route, run, request, response
from socket import socket
from re import sub

import maia

import inspect, unicodedata
import json
import re
import logging
import pyunitex_emb

this_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))    
response.content_type = 'application/json'


#ChatScript variables
cs_buffer_size = 1024
cs_tcp_ip = '127.0.0.1'
cs_tcp_port = 1024
facts_dir="facts/"
cs_facts_dir = this_dir+"/../ChatScript/"+facts_dir

#Logging system
log_name='gsibot'
logger = logging.getLogger(log_name)
hdlr = logging.FileHandler(this_dir+'/'+log_name+'.log')
formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
hdlr.setFormatter(formatter)
logger.addHandler(hdlr) 
logger.setLevel(logging.INFO)
logging.basicConfig(level=logging.DEBUG, format='%(message)s')


#Maia server variables
maia_uri = 'localhost'
maia_port = '1337'

maia = maia.Maia('ws://'+maia_uri+':'+maia_port, logger) 
maia.connect()


@route('/')
def rootURL():
    return TalkToBot()  
    <commit_msg>Added Syslog code, commented<commit_after># coding=utf-8
import os, sys
sys.path.append(os.path.join(os.path.dirname(__file__), 'lib'))
sys.path.append(os.path.join(os.path.dirname(__file__), 'lib/ext'))

from bottle import route, run, request, response
from socket import socket
from re import sub

import maia

import inspect, unicodedata
import json
import re
import logging
import pyunitex_emb

this_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))    
response.content_type = 'application/json'


#ChatScript variables
cs_buffer_size = 1024
cs_tcp_ip = '127.0.0.1'
cs_tcp_port = 1024
facts_dir="facts/"
cs_facts_dir = this_dir+"/../ChatScript/"+facts_dir

#Logging system
log_name='gsibot'
logger = logging.getLogger(log_name)

# Log to file
hdlr = logging.FileHandler(this_dir+'/'+log_name+'.log')
formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')

# Log to Syslog
#hdlr = logging.SysLogHandler()
#formatter = logging.Formatter('calistabot: %(asctime)s %(levelname)s %(message)s')

hdlr.setFormatter(formatter)
logger.addHandler(hdlr) 
logger.setLevel(logging.INFO)
logging.basicConfig(level=logging.DEBUG, format='%(message)s')


#Maia server variables
maia_uri = 'localhost'
maia_port = '1337'

maia = maia.Maia('ws://'+maia_uri+':'+maia_port, logger) 
maia.connect()


@route('/')
def rootURL():
    return TalkToBot()  
    
{'fraction_non_alphanumeric': 0.14762269938650308, 'fraction_numerical': 0.014570552147239263, 'mean_word_length': 6.0896739130434785, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '7426308', 'n_tokens_mistral': 990, 'n_tokens_neox': 947, 'n_words': 184}