Part-of-Speech Tag a String, Filter to Adverbs in Go

Using our POS tagging APIs will make it easy to break down input sentences into grammatically tagged portions. Run a sentence through our Adverb POS tagging API and you’ll receive a returned list of adverbs in that sentence. Implement this API easily into your Golang project using the code provided below, or feel free to check out the Cloudmersive API Console page to find code in a language relevant to your project (13 options are available including Java, C#, Python, Node.js, and more).

package mainimport (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {url := "https://api.cloudmersive.com/nlp-v2/pos/tag/adverbs"
method := "POST"
payload := strings.NewReader("InputText=%3Cstring%3E")client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
req.Header.Add("Apikey", "YOUR-API-KEY-HERE")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}

Missing an API key? Head to our website (www.cloudmersive.com) and create an account to get your API key. Don’t worry about financial commitments — you can make a free-tier account with a limit of 800 API calls per month.

--

--

--

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What Happened During the Seed Sale Process, What Are We Doing Now?

List and Tuple in Python

Deploying a Diabetes Prediction ML model using Flask and Docker

Create a Free SSL Certificate Manager on AWS

The Perfect Dumpling Quest

Shields Power up in Unity

{UPDATE} Driving Academy Joyride 2019 Hack Free Resources Generator

File Uploading with a Progress Bar in ASP.NET Core

File Uploading with a Progress Bar in ASP.NET Core

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Cloudmersive

Cloudmersive

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

More from Medium

Detect Fine Text in a Photo of a Document using Go

Part 2: Grpc Proto Code Generation Using Protoc for Message and Services

Golang developer — Part 2 — Intermediate of Golang

Binary protection using go embed and plugins