<commit_before>from flask import request
import requests
from ..utils.status import get_status
from ..utils.reminders import create_reminder
import twilio.twiml
import json
from datetime import datetime

def call():
    resp = twilio.twiml.Response()
    resp.record(timeout=10, transcribe=True,
            transcribeCallback='http://queri.me/rec', )
    return str(resp)

def text():
    b = request.form.get('Body','')
    phone = request.form.get('From','')
    wit = requests.get('https://api.wit.ai/message?v=20140905&q=%s' % b, headers={'Authorization':'Bearer L<KEY>'}).text
    intent = json.loads(wit)['outcomes'][0]['intent']
    if intent == 'get_status':
        m = get_status(wit, phone)
    elif intent == 'remind':
        entities = json.loads(wit)['outcomes'][0]['entities']
        date = datetime.strptime(entities['time'][0]['value']['from'],"%Y-%m-%dT%H:%M:%S.Z")
        text = entities['message']<commit_msg>Add print debug to text function<commit_after>from flask import request
import requests
from ..utils.status import get_status
from ..utils.reminders import create_reminder
import twilio.twiml
import json
from datetime import datetime

def call():
    resp = twilio.twiml.Response()
    resp.record(timeout=10, transcribe=True,
            transcribeCallback='http://queri.me/rec', )
    return str(resp)

def text():
    b = request.form.get('Body','')
    phone = request.form.get('From','')
    wit = requests.get('https://api.wit.ai/message?v=20140905&q=%s' % b, headers={'Authorization':'Bearer <KEY>'}).text
    intent = json.loads(wit)['outcomes'][0]['intent']
    print json.loads(wit)
    if intent == 'get_status':
        m = get_status(wit, phone)
    elif intent == 'remind':
        entities = json.loads(wit)['outcomes'][0]['entities']
        date = datetime.strptime(entities['time'][0]['value']['from'],"%Y-%m-%dT%H:%M:%S.Z")
        text = entities['message']
{'fraction_non_alphanumeric': 0.1774869109947644, 'fraction_numerical': 0.013612565445026177, 'mean_word_length': 4.015748031496063, 'pattern_counts': {'":': 0, '<': 5, '<?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': '491687', 'n_tokens_mistral': 635, 'n_tokens_neox': 641, 'n_words': 124}