| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- 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)
- }
- }
|