You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.
There is something that goes wrong when I use that example:
package main
import (
"fmt""time""github.com/shixzie/nlp"
)
typeNeedstruct {
NamestringSince time.Time
}
funcmain() {
nl:=nlp.New()
needSample:= []string{
"I need {Name} since {Since}",
}
err:=nl.RegisterModel(Need{}, needSample, nlp.WithTimeFormat("2006"))
iferr!=nil {
panic(err)
}
err=nl.Learn()
iferr!=nil {
panic(err)
}
p:=nl.P("Hi, I am Patrice, I need water since 2001")
fmt.Println(p)
It only get "since" for a "Need" but doesn't match "water". If I remove "I am", or "I" from "I am", so I get "water" and "2001".
I don't have the time to check what goes wrong, if you can...
The text was updated successfully, but these errors were encountered:
There is something that goes wrong when I use that example:
It only get "since" for a "Need" but doesn't match "water". If I remove "I am", or "I" from "I am", so I get "water" and "2001".
I don't have the time to check what goes wrong, if you can...
The text was updated successfully, but these errors were encountered: