Esempio n. 1
0
        public ActionResult ShowRecom(RecoomendSuperclass.Percept percept)
        {
            c2T = new ConvertToText();
            TreeNode treeNode = c2T.RetrieveTree();

            accomodationSuper = new StudentAccomodationSuper();
            DFS dFS = new DFS();

            RecoomendSuperclass.Percept percepts = new RecoomendSuperclass.Percept();
            percepts.Incomegroup = percept.Incomegroup;
            percepts.area        = percept.area;


            List <string> recommendations = dFS.IterativeDeepeningSearch(treeNode, percepts, 3, 1);

            if (recommendations != null)
            {
                GetRecommendations(recommendations);
                //accomodationSuper.overalRecommendations = studentAccomodation;
                TempData["nullOverall"] = false;
            }
            else
            {
                TempData["nullOverall"] = true;
            }


            //List<string> recommendations_safety = dFS.IterativeDeepeningSearch(treeNode, percepts, 3, 2);
            //if (recommendations_safety != null)
            //{
            //    GetURecommendations(recommendations_safety);
            //    //accomodationSuper.basedOnSafety = studentAccomodation;
            //}
            //else
            //{

            //    TempData["nullSafety"] = true;
            //}

            List <string> recommendations_sentiment = dFS.IterativeDeepeningSearch(treeNode, percepts, 3, 3);

            if (recommendations_sentiment != null)
            {
                GetTRecommendations(recommendations_sentiment);
                // accomodationSuper.basedOnsentiment = studentAccomodation;

                TempData["nullSentiment"] = false;
            }
            else
            {
                TempData["nullSentiment"] = true;
            }

            if (accomodationSuper != null)
            {
                Session["RecommendationRating"] = accomodationSuper;
                return(RedirectToAction("ShowRecommendations", "Recommend"));
            }
            return(View());
        }
Esempio n. 2
0
        public ActionResult ShowRecommendations()
        {
            StudentAccomodationSuper studAccomodations = (StudentAccomodationSuper)Session["RecommendationRating"];

            if (studAccomodations != null)
            {
                return(View(studAccomodations));
            }
            return(null);
        }