Skip to content
/ TimeNLP Public

Time-NLP的golang版本 中文时间表达词转换

License

Notifications You must be signed in to change notification settings

bububa/TimeNLP

Repository files navigation

TimeNLP 中文语句中的时间语义识别的golang版本

Go Reference Go goreleaser GitHub go.mod Go version of a Go module GoReportCard GitHub license GitHub release

使用

go get -u github.com/bububa/TimeNLP

功能说明

用于句子中时间词的抽取和转换

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

About

Time-NLP的golang版本 中文时间表达词转换

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages