예제 #1
0
 public DefaultMenuController()
 {
     //m_serviceLayer = new ServiceLayerImpl();
     m_imageService = new ImageServices();
     defMenuUtility = new DefaultMenuUtility();
     classifyServices = new ClassifierServices();
 }
예제 #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);
        }
예제 #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));
        }
예제 #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");
 }
예제 #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");
        }
예제 #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");
        }
예제 #7
0
 public void TrainByGoogleSearchResultTest()
 {
     var classifierServises = new ClassifierServices();
     classifierServises.TrainByGoogleSearchResult("CuisinesByDescription");
 }
예제 #8
0
 public void TrainByFilteredGoogleSearch()
 {
     var classifierServises = new ClassifierServices();
     classifierServises.TrainByFilteredGoogleSearch("CuisinesByDescription");
 }
예제 #9
0
        public void MarkGoogleSearchResultsForTrain()
        {
            var restaurantsSearchUtilty = new RestaurantsSearchUtilities();
            List<RestaurantBasicData> restsList = restaurantsSearchUtilty.GetAllRestaurantsWithBackOfficeSource();

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

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

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

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