package main import ( "strings" "git.wecise.com/wecise/common/modb" "git.wecise.com/wecise/common/nlp" "gitee.com/wecisecode/util/logger" ) /* ??{Author}????? ????{File}??? ????{Tags}?? ??,????{Tags}??? ???{Tags}???" ???????{Time}??,??{Tags}??? ??{Author}???,??{Tags}?? */ func main() { samples := `??{Author}????? ????{File}??? ????{Tags}?? ??,????{Tags}??? ???{Tags}???" ???????{Time}??,??{Tags}??? ??{Author}???,??{Tags}??` if client, err := modb.New("hdim"); err == nil { if robot, err := nlp.NLPNew(client, "kdb", strings.Split(samples, "\n")); err == nil { if data, _, err := robot.Answer("kdb", "next"); err != nil { logger.Error(err) } else { logger.Info("data =>", data) } } else { logger.Error(err) } } else { logger.Error(err) } }