<commit_before><?php
/**
 * Created by PhpStorm.
 * User: omolara
 * Date: 12/9/16
 * Time: 4:57 PM
 */
include("vendor/autoload.php");
$command = $_GET["command"];
$text = $_GET["text"];
$response_url = $_GET["response_url"];
if ($command == "/randomword") {

    if ($text == "(configure)") {

        //TODO configure

    } else if (\Larikraun\Util::startsWith($text, "word")) {

        $word = explode(" ", $text);
        Larikraun\SlackBot::getDefinition($response_url, $word[1]);

    } else if ($text == "") {

        \Larikraun\SlackBot::getRandom($response_url);

    } else if ($text == "(help)") {

        echo "List of commands:\n(help)\n(configure)\nany other thing";

    } else {

        Larikraun\SlackBot::getDefinition($response_url, $text);

    }

}<commit_msg>feat: change command for word definitions<commit_after><?php
/**
 * Created by PhpStorm.
 * User: omolara
 * Date: 12/9/16
 * Time: 4:57 PM
 */
include("vendor/autoload.php");
$command = $_GET["command"];
$text = $_GET["text"];
$response_url = $_GET["response_url"];
if ($command == "/randomword") {

    if ($text == "(configure)") {

        //TODO configure

    }  else if ($text == "") {

        \Larikraun\SlackBot::getRandom($response_url);

    } else if ($text == "(help)") {

        echo "List of commands:\n(help)\n(configure)\nany other thing";

    } else {

        Larikraun\SlackBot::getDefinition($response_url, $text);

    }

}
{'fraction_non_alphanumeric': 0.1986062717770035, 'fraction_numerical': 0.011846689895470384, 'mean_word_length': 3.186588921282799, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4835433', 'n_tokens_mistral': 517, 'n_tokens_neox': 485, 'n_words': 100}