public string SearchModel(string SearchInput)
        {
            string Result = string.Empty;

            KuttyPayanMongodbClass KPdbObj = new KuttyPayanMongodbClass();
            var SearchResult = KPdbObj.KPEmployeeSearchMethod(SearchInput);
            KPEmployeeSchemaEvaluatorClass SchemaEvaluator = new KPEmployeeSchemaEvaluatorClass();
            SchemaEntityClass SchemaResult = SchemaEvaluator.EmployeeSchemaEvaluatorMethod(SearchResult, SearchInput);

            KPEmployeeSchemaImplementerClass objEmployeeImplementor = new KPEmployeeSchemaImplementerClass();
            List <EmployeeSample>            EmployeeList           = new List <EmployeeSample>();

            if (SchemaResult != null)
            {
                Result = objEmployeeImplementor.EmployeeSchemaImplementerMethod(SchemaResult);
                //EmployeeList = objEmployeeImplementor.EmployeeSchemaImplementerMethod(SchemaResult);
            }
            else
            {
                Result = "Schema Not Found";
            }
            return(Result);

            // return SearchResult;
            //return EmployeeList;
        }
Ejemplo n.º 2
0
        public SchemaEntityClass EmployeeSchemaEvaluatorMethod(Dictionary <string, List <Dictionary <string, string> > > SearchResult, string SearchInput)
        {
            SchemaEntityClass SchemaResult = new SchemaEntityClass();

            if (SearchResult != null)
            {
                List <SchemaEntityClass> SchemaEntityList = new List <SchemaEntityClass>();
                SchemaEntityList = EmployeeSchemaEntityParser(SearchResult, SearchInput);

                KuttyPayanMongodbClass KPDBObj = new KuttyPayanMongodbClass();
                bool IsInserted = KPDBObj.KPEmployeeSchemaInsertMethod(SchemaEntityList);
                if (IsInserted)
                {
                    SchemaResult = EmployeeSchemaIdentifier(SchemaEntityList);
                }
            }
            else
            {
                SchemaResult = null;
                // result = "sorry, could't understand your query";
            }
            return(SchemaResult);
        }
Ejemplo n.º 3
0
        public string KPInputParserMethod(string SearchInput)
        {
            StringBuilder            output = new StringBuilder();
            KuttyPayanPosTaggerClass objNLP = new KuttyPayanPosTaggerClass();

            string[] sentences = objNLP.SplitSentences(SearchInput);

            foreach (string sentence in sentences)
            {
                string[] tokens = objNLP.TokenizeSentence(sentence);
                string[] tags   = objNLP.PosTagTokens(tokens);

                output.Append(objNLP.ChunkSentence(tokens, tags)).Append("\r\n");
            }
            InputParserEntities WordsEntitiesList = KPInputDelimiter(output.ToString());

            WordsEntitiesList = KPInputNoiceFilter(WordsEntitiesList);
            KuttyPayan.MongodbLibrary.KuttyPayanMongodbClass objKPDB = new KuttyPayanMongodbClass();
            bool isInserted = objKPDB.KuttyPayanInputParserInsert(WordsEntitiesList);

            //output.Append(WordsEntitiesList.WordGroup.SelectMany(x => x.Words).ToString());
            return(output.ToString());
        }
        public List <Dictionary> SearchModel(string DictionaryKey)
        {
            KuttyPayanMongodbClass KPdbObj = new KuttyPayanMongodbClass();

            return(KPdbObj.KuttyPayanSearchMethod(DictionaryKey));
        }