Part-of-Speech Tag, Filter to Nouns using Go

Nice and simple: separate & tag nouns from an input text string with this Part-of-speech tagging iteration of our NLP API. Easily run the below code in your Golang project to connect, or head to the Cloudmersive API Console page to find the right programming language for you (there is code there available in 13 programming languages).

You’ll need a Cloudmersive Account for this, however — so first head to our website (www.cloudmersive.com) and create an account to receive your API key. You can make a free account with a limit of 800 API calls per month.

package mainimport (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {url := "https://api.cloudmersive.com/nlp-v2/pos/tag/nouns"
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))
}

--

--

--

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

How to trap on UIViewAlertForUnsatisfiableConstraints?

Accident Lawyer Sandy Utah

accident lawyer sandy utah

JOIN THE EXCITING MOMENT only here Wall Street Games

Do we have a connection?

The Solution of Result Code 6003

The first, blind steps

Sic mundus creatus est

How AWS helped Domino’s Pizza to get solution of the challenges they were facing?

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

How to Part-of-Speech Tag a String of Text in Go

Go-Lang Hands-On| Part-3

Banking App With FastApi and Tkinter

How to Part-of-Speech Tag a String & Filter to Verbs in Go