public TwitterFeedSearcher(string directoryPath)
        {
            dir = FSDirectory.GetDirectory(directoryPath);
            searcher = new IndexSearcher(dir);
            var positiveReviews = new Evidence("Positive", "Repository\\Positive.Evidence.csv");
            var negativeReviews = new Evidence("Negative", "Repository\\Negative.Evidence.csv");

            classifier = new Classifier(positiveReviews, negativeReviews);
        }
Ejemplo n.º 2
0
        static void Main()
        {
            const string url = "http://www.engadget.com/2014/02/19/nokia-lumia-icon-review/";

            //These evidences are used as training data for the Dragon Classigfier
            var positiveReviews = new Evidence("Positive", "Repository\\Positive.Evidence.csv");
            var negativeReviews = new Evidence("Negative", "Repository\\Negative.Evidence.csv");

            var testData = GetWebpageContents(url);
            var classifier = new Classifier(positiveReviews, negativeReviews);
            var scores = classifier.Classify(testData, DragonHelper.DragonHelper.ExcludeList);
            Console.WriteLine("Positive Score for " + url + " - " + scores["Positive"]);
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            var connectionString = "mongodb://10.0.0.17/test";
            //var connectionString = "mongodb://localhost/test";

            MongoClient mongoClient = new MongoClient(connectionString);
            MongoServer mongoServer = mongoClient.GetServer();
            MongoDatabase db = mongoServer.GetDatabase("test");
            var collection = db.GetCollection<TweetItem>("TweetItems");
            var positiveReviews = new Evidence("Positive", "Repository\\Positive.Evidence.csv");
            var negativeReviews = new Evidence("Negative", "Repository\\Negative.Evidence.csv");

            classifier = new Classifier(positiveReviews, negativeReviews);
            CreateIndex(collection);
        }