Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bububa/timenlp
Time-NLP的golang版本 中文时间表达词转换
https://github.com/bububa/timenlp
nlp parser time
Last synced: about 5 hours 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 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-13T06:29:11.000Z (12 months ago)
- Last Synced: 2024-06-20T17:30:43.790Z (5 months 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版本
[![Go Reference](https://pkg.go.dev/badge/github.com/bububa/TimeNLP.svg)](https://pkg.go.dev/github.com/bububa/TimeNLP)
[![Go](https://github.com/bububa/TimeNLP/actions/workflows/go.yml/badge.svg)](https://github.com/bububa/TimeNLP/actions/workflows/go.yml)
[![goreleaser](https://github.com/bububa/TimeNLP/actions/workflows/goreleaser.yml/badge.svg)](https://github.com/bububa/TimeNLP/actions/workflows/goreleaser.yml)
[![GitHub go.mod Go version of a Go module](https://img.shields.io/github/go-mod/go-version/bububa/TimeNLP.svg)](https://github.com/bububa/TimeNLP)
[![GoReportCard](https://goreportcard.com/badge/github.com/bububa/TimeNLP)](https://goreportcard.com/report/github.com/bububa/TimeNLP)
[![GitHub license](https://img.shields.io/github/license/bububa/TimeNLP.svg)](https://github.com/bububa/TimeNLP/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/bububa/TimeNLP.svg)](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_NLPJava 版本https://github.com/shinyke/Time-NLP
PHP 版本https://github.com/crazywhalecc/Time-NLP-PHP
Javascript 版本https://github.com/JohnnieFucker/ChiTimeNLP