Ejemplo n.º 1
0
 @RequestMapping(
     value = "/testClassify",
     method = RequestMethod.POST,
     produces = "application/json; charset=UTF-8")
 @ResponseBody
 public SuccessResponseJson testClassify(@RequestParam("sText") String sText) {
   String result = "";
   result = this.classifier.classifyWithInlineXML(sText);
   return ResponseHelper.buildSuccessJsonReponse(result);
 }
Ejemplo n.º 2
0
 @RequestMapping(
     value = "/testToken",
     method = RequestMethod.POST,
     produces = "application/json; charset=UTF-8")
 @ResponseBody
 public SuccessResponseJson testToken(@RequestParam("sText") String sInput) {
   String result = "";
   result = this.vietTokenizer.tokenize(sInput)[0];
   System.out.println("Success Token");
   return ResponseHelper.buildSuccessJsonReponse(result);
 }
Ejemplo n.º 3
0
 @RequestMapping(
     value = "/testRanker",
     method = RequestMethod.POST,
     produces = "application/json; charset=UTF-8")
 @ResponseBody
 public SuccessResponseJson testRanker(@RequestBody RankerRequest rankerRequest) {
   String result = "This is result of a test Array function";
   // return request.status;
   RankerHelper rankerHelper = new RankerHelper(keywordSelectorFile, keywordExpanderFile);
   Query query = rankerHelper.buildQuery(rankerRequest.searchContent);
   result = rankerHelper.getBestDoc(rankerRequest.answers, query);
   return ResponseHelper.buildSuccessJsonReponse(result);
 }