Golang RESTful API

Golang RESTful API


go get -u github.com/hankcs/gohanlp@main

Quick Start

Obtain an auth from any compatible service provider like our free service, then initiate a HanLPClient and call its Parse interface.

package main

import (

func main() {
    client := hanlp.HanLPClient(hanlp.WithAuth("The auth you applied for")) // anonymous users can skip auth
    s, _ := client.Parse("In 2021, HanLPv2.1 delivers state-of-the-art multilingual NLP techniques to production environments.",hanlp.WithLanguage("mul"))

Refer to our testcases and data format for more details.