Categorygithub.com/PIMPfiction/govader_backend
modulepackage
0.0.0-20240225210028-d8ede28925bb
Repository: https://github.com/pimpfiction/govader_backend.git
Documentation: pkg.go.dev

# README

Govader Backend NLP Package (sentimental analysis NLP)

Go Reference Go Report Card codecov master Mentioned in Awesome Go

Govader-Backend is a microservice thats returns sentimental analysis of given sentence.

Server wrapper for GoVader Packagehttps://github.com/jonreiter/govader

Usage:

go get github.com/PIMPfiction/govader_backend
package main

import (
	vaderMicro "github.com/PIMPfiction/govader_backend"
	echo "github.com/labstack/echo/v4"
	"fmt"
)

func main() {
	e := echo.New()
	err := vaderMicro.Serve(e, "8080")
	if err != nil {
		panic(err)
	}
	fmt.Scanln()

}

Sample Get Request:

GET: http://localhost:8080?text=I%20am%20looking%20good

Sample Post Request:

POST: http://localhost:8080/

RequestBody: {"text": "I am looking good"}

Sample Response

{
  "Negative": 0,
  "Neutral": 0.5084745762711864,
  "Positive": 0.4915254237288135,
  "Compound": 0.44043357076016854
}

# Functions

Serve function binds handler with given echo pointer Starts the server on the given port Sample usage: e := echo.New() err := Serve(e, "8080") if err != nil { panic(err) } fmt.Scanln().

# Structs

No description provided by the author
Request type is used to bind the request body to the handler.