private static Instances createDataset(List<Tweet> tweets) throws Exception{
    	FastVector attributes = createTweetAttributes();
    
        // Create an empty training set
        Instances trainingSet = new Instances("Bag Of Words", attributes, tweets.size());      
         
        // Set class index
        trainingSet.setClassIndex(0); //set to zero because classification is assumed to be first (from createTweetAttributes())
         
        // Create the instance
  
        for(Tweet tweet: tweets){
        	if(tweet != null && tweet.getCategory() != null){
	        	Instance iExample = new Instance(2);
	        	//System.out.println(tweet.getCategory()+" -=- \""+tweet.getCleanText()+"\"");
	        	iExample.setValue(trainingSet.attribute(0) , tweet.getCategory().toString());
	        	iExample.setValue(trainingSet.attribute(1) , tweet.getCleanText());
	
	        	trainingSet.add(iExample);
        	}
        }
        
        return trainingSet;
    }