Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to use golang Natural language processing tool gohanlp

Shulou Source: shulou.com Published: 2022-06-01 13:29:45 10月02日 Update

This article will explain in detail how to use gohanlp, a natural language processing tool for golang. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Preface of GoHanlp

Hanlp is a multilingual NLP library based on PyTorch and TensorFlow 2.x for researchers and companies to promote state-of-the-art deep learning technologies in academia and industry. HanLP was designed from the beginning to be efficient, user-friendly and extensible. It comes with pre-training models for a variety of human languages, including English, Chinese and many other languages. GoHanlp is the golang implementation version of the api interface of Hanlp

How to install GoHanlpgo get-u github.com/xxjwxc/gohanlp@master use apply for auth certification

Https://bbs.hanlp.com/t/hanlp2-1-restful-api/53

Do not authenticate hanlp.WithAuth ("") Please fill in the blanks

Text form package mainimport ("fmt"github.com/xxjwxc/gohanlp/hanlp") func main () {client: = hanlp.HanLPClient (hanlp.WithAuth (")) / / if you do not fill in the auth,auth, anonymous s, _: = client.Parse (" 2021 HanLPv2.1 brings the next generation of the most advanced multilingual NLP technology to the production environment. My mother-in-law came to Beijing Cube Court to visit the Natural semantic Technology Company. " , hanlp.WithLanguage ("zh") fmt.Println (s)} object form package mainimport ("fmt"github.com/xxjwxc/gohanlp/hanlp") func main () {client: = hanlp.HanLPClient (hanlp.WithAuth (")) / / Anonymous resp if the auth,auth you applied for is not filled in _: = client.ParseObj ("2021 HanLPv2.1 brings the next generation of the most advanced multilingual NLP technology to the production environment. My mother-in-law came to Beijing Cube Court to visit the Natural semantic Technology Company. " , hanlp.WithLanguage ("zh") fmt.Println (resp)} API description

Option in HanLPClient is a variable parameter, which is taken with each call.

Parse... Option is a 00:00 parameter, which is only valid for this call.

This is the end of the article on "how to use gohanlp, a natural language processing tool for golang". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Tags: Nature language company technology first article multilingual tool natural language processing generation parameter multilingual form interface more environment technology semantics grandma Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Shulou Tech Info Redmi Microsoft Shulou Information