https://github.com/bububa/timenlp
Time-NLP的golang版本 中文时间表达词转换
https://github.com/bububa/timenlp
nlp parser time
Last synced: 10 months ago
JSON representation
Time-NLP的golang版本 中文时间表达词转换
- Host: GitHub
- URL: https://github.com/bububa/timenlp
- Owner: bububa
- License: apache-2.0
- Created: 2021-05-18T07:03:14.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-11-13T06:29:11.000Z (about 2 years ago)
- Last Synced: 2024-06-20T17:30:43.790Z (over 1 year ago)
- Topics: nlp, parser, time
- Language: Go
- Homepage:
- Size: 56.6 KB
- Stars: 10
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TimeNLP 中文语句中的时间语义识别的golang版本
[](https://pkg.go.dev/github.com/bububa/TimeNLP)
[](https://github.com/bububa/TimeNLP/actions/workflows/go.yml)
[](https://github.com/bububa/TimeNLP/actions/workflows/goreleaser.yml)
[](https://github.com/bububa/TimeNLP)
[](https://goreportcard.com/report/github.com/bububa/TimeNLP)
[](https://github.com/bububa/TimeNLP/blob/master/LICENSE)
[](https://gitHub.com/bububa/TimeNLP/releases/)
## 使用
go get -u github.com/bububa/TimeNLP
## 功能说明
用于句子中时间词的抽取和转换
```golang
import (
"log"
"github.com/bububa/TimeNLP"
)
func main() {
target := "Hi,all.下周一下午三点开会"
preferFuture := true
tn := timenlp.TimeNormalizer(preferFuture)
ret, err := tn.Parse(target)
if err != nil {
log.Fatalln(err)
}
log.Printf("%+v\n", ret)
}
```
## Reference
python3 版本 https://github.com/zhanzecheng/Time_NLP
Java 版本https://github.com/shinyke/Time-NLP
PHP 版本https://github.com/crazywhalecc/Time-NLP-PHP
Javascript 版本https://github.com/JohnnieFucker/ChiTimeNLP