// load configuration file
include_once "config.php";
// load the database class
include_once "includes/db_mysql.php";
$db = new DB($config);
$class_lookup = array(1 => "no_news", 2 => "news", 3 => "news_op");
$class_mapping = array(1 => 1, 2 => 2, 3 => 2);
$class_name_mapping = array("no_news" => "no_news", "news" => "news", "news_op" => "news");
include_once "page_base.php";
include_once "classify.php";
include_once "stemmer.php";
include_once "cluster.php";
$cluster_main = new cluster();
$db->query("SELECT * FROM `init_tweets` WHERE `test`=1 ORDER BY RAND() LIMIT 10");
while ($tweet = $db->fetch_row()) {
    $cluster_main->tf_idf($tweet['tweet'], $tweet['id']);
    echo "<br /><br />";
}
/*
$main_class = new classify(array(1=>"no_news", 2=>"news"), $class_mapping, false);
$main_class->add_tweets(array(), 591);

$class_totals = array(1=>0, 2=>0);
$news_items = array();
$missdirect = array();
$db->query("SELECT * FROM `init_tweets` WHERE `test`=1");
while($tweet = $db->fetch_row())
{
	$result = $main_class->classify_tweet($tweet['tweet']);
	if($class_lookup[$result] == $class_name_mapping[$tweet['class']])
	{