Question

I m developing question answering system in java,in tht I have created templates manually which will be match to user asked question. Problem is after pre processing i have list of Keywords and these keywords I want to match with keywords in stored template to filter search.is there any algorithm? Ex.ques. wht is features of java? Keywords-features java Extract Templates containing keywords features and java.

Was it helpful?

Solution

the thing which i have understood from your question you have some keywords and some other patterns containing those keywords in your lexicon and some others which come to your system from users question. then you need an algorithm to find these patterns in your system input. as i know in java if you define a pattern from Pattern class then you can do like below to achieve the thing which you want:(A simple example)

Pattern pat = Pattern.compile("[A-Z]+");
Matcher matcher = pat.matcher("ABCD");
if(matcher.matches()) {
    System.out.println("it matchs.");
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top