public DefaultMenuController()
 {
     //m_serviceLayer = new ServiceLayerImpl();
     m_imageService = new ImageServices();
     defMenuUtility = new DefaultMenuUtility();
     classifyServices = new ClassifierServices();
 }
Example #2
0
        public void ClassifyByGoogleSearchResultTest_ShouldMakeGoogleSearchForRestDescriptionIfNoGoogClassifyResult_AndTryClassifyAfterSearch()
        {
            var restaurantsSearchUtilty = new RestaurantsSearchUtilities();
            List<RestaurantBasicData> restsList = restaurantsSearchUtilty.GetAllRestaurantsWithEmptyMenu();
            //List<RestaurantBasicData> restsList = restaurantsSearchUtilty.GetAllRestaurantsWithSearchResult();

            var classifierServises = new ClassifierServices();
            classifierServises.ClassifyRestaurants("CuisinesSupervised1", restsList, 50);
        }
Example #3
0
        public void ClassifySetTets_ShouldGetClassifyEmptyRestaurantsSet_AndReturnsThisSetWithResults()
        {
            var classifierServises = new ClassifierServices();
            List<RestaurantQueryPattern> classifyEmptyRestsSet = classifierServises.GetClassifySet();
            //var first80Items = classifyEmptyRestsSet.GetRange(0, 80);
            //var response = Classifier.uClassify.ClassifyUtility.ClassifySet(first80Items, "CuisinesTest");

            var response = Classifier.uClassify.ClassifyUtility.ClassifySet(classifyEmptyRestsSet, "CuisinesTest");

            //Assert
            //Assert.IsNotNull(first80Items);
            Assert.IsNotNull(classifyEmptyRestsSet);
            Assert.IsNotNull(response);
            Assert.IsFalse(response.Exists(r => r.Result == null));
        }
Example #4
0
 public void UntrainUClassifyTest_ShouldUntrainSpecficWord()
 {
     var classufyServices = new ClassifierServices();
     var trainSet = new List<string>() { "מסעדה", "מסעדת", "כשר", "כשר למהדרין", "בר" };
     var untrainSet = classufyServices.GetUntrainSet(trainSet);
     //Act
     //classDBServices.TrainUClassifyWithSet(trainSet);
     Classifier.uClassify.UntrainUtility.UntrainWithSet(untrainSet, "CuisinesTest");
 }
Example #5
0
        public void TrainUClassifyTest_ShouldGetrainTest_ConvertItTouClassifyXml_WrighLogs()
        {
            var classufyServices = new ClassifierServices();
            //var trainSet = classufyServices.GetTrainSetCuisineType();
            var trainSet = classufyServices.GetTrainSetCuisineTypeBackOfficeSource();

            //Act
            //classDBServices.TrainUClassifyWithSet(trainSet);
            Classifier.uClassify.TrainUtility.TrainWithSet(trainSet, "CuisinesByDescription");
        }
Example #6
0
        public void UntrainUClassifyTest_ShouldGetrainTest_AndForeachUnitMakeUntrain()
        {
            var classufyServices = new ClassifierServices();
            var untrainSet = classufyServices.GetTrainSetCuisineTypeBackOfficeSource();

            //Act
            //classDBServices.TrainUClassifyWithSet(trainSet);
            Classifier.uClassify.UntrainUtility.UntrainWithSet(untrainSet, "CuisinesTest");
        }
Example #7
0
 public void TrainByGoogleSearchResultTest()
 {
     var classifierServises = new ClassifierServices();
     classifierServises.TrainByGoogleSearchResult("CuisinesByDescription");
 }
Example #8
0
 public void TrainByFilteredGoogleSearch()
 {
     var classifierServises = new ClassifierServices();
     classifierServises.TrainByFilteredGoogleSearch("CuisinesByDescription");
 }
Example #9
0
        public void MarkGoogleSearchResultsForTrain()
        {
            var restaurantsSearchUtilty = new RestaurantsSearchUtilities();
            List<RestaurantBasicData> restsList = restaurantsSearchUtilty.GetAllRestaurantsWithBackOfficeSource();

            var classifierServises = new ClassifierServices();
            classifierServises.MarkSearchResultsForTrain(restsList);
        }
Example #10
0
        public void GetTrainSetTest_ShouldReturnNotEmptyListOfRestaurantsPatterns()
        {
            ClassifierServices classServices = new ClassifierServices();

            //Act
            var trainSet = classServices.GetTrainSetCuisineType();

            //Assert
            Assert.IsNotNull(trainSet);
            Assert.IsTrue(trainSet.Count > 0);
        }
Example #11
0
        public void ExecuteGoogleSearchAndSaveResultsTest()
        {
            var restaurantsSearchUtilty = new RestaurantsSearchUtilities();
            List<RestaurantBasicData> restsList = restaurantsSearchUtilty.GetAllRestaurantsWithBackOfficeSource();

            var classifierServises = new ClassifierServices();
            classifierServises.ExecuteGoogleSearchAndSaveResults(restsList);
        }