Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Starting");
            util.clearLog();
            util.log("starting .............");
            Lexicon mylexicon = new Lexicon();

            //List<LexiconPredicate> predicates = mylexicon.getPredicates("child", 30, 30);
            //foreach (LexiconPredicate predicate in predicates)
            //{
            //    util.log(predicate.ToSimpleString());
            //}

            //List<LexiconLiteral> literals = mylexicon.getLiterals("Inception", 25, 35);

            //foreach (LexiconLiteral l in literals)
            //{
            //    util.log(l.ToSimpleString());
            //}

            answerGenerator answerGenerator = new answerGenerator();

            List<QueryBucket> queries = answerGenerator.generateQueries("child of hosni mubarak");

            List<questionAnswer> answers = answerGenerator.executeQueries(queries);
            Console.WriteLine("Done");
        }
Exemplo n.º 2
0
        // todo : object of kind Queries holder
        public QueryGenerator(string question)
        {
            lexicon = new Lexicon();

            this.question = question.ToLower();
            parsedQuestion = this.question;

            // preprocessing of parsedQuestion
            QuestionPreprocessing();

            // compute the sparql query
            buildQueries();
        }
Exemplo n.º 3
0
 /// <summary>
 /// class constructor
 /// </summary>
 public answerGenerator()
 {
     lexicon = new Lexicon();
 }