문제

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.

도움이 되었습니까?

해결책

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.");
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top