Skip to content

murchinroom/emotextcligo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

emotextcligo

Emotext Golang SDK: a client to emotext.

🔑 This is a muli component. You can find the main repository here.

Usage

Install:

go get github.com/murchinroom/emotextcligo

Example:

package main

import (
	"fmt"
	"github.com/murchinroom/emotextcligo"
)

func main() {
    // emotextcligo.EmotextServer = "http://localhost:51061" or set env EMOTEXT_SERVER
    text := "抱歉,今天很开心!"

    res, err := emotextcligo.Query(text)
    if err != nil {
        panic(err)
    }

    // res.Emotions = emotextcligo.Emotions21To7(res.Emotions)

    fmt.Println("Emotions:", res.Emotions)
    fmt.Println("Polarity:", res.Polarity)
}

License

MIT

About

Emotext Golang Client

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages