Golang RESTful Client for HanLP.中文分词 词性标注 命名实体识别 依存句法分析 语义依存分析 新词发现 关键词短语提取 自动摘要 文本分类聚类 拼音简繁转换 自然语言处理

Build Status Go Report Card GoDoc

gohanlp

中文分词 词性标注 命名实体识别 依存句法分析 语义依存分析 新词发现 关键词短语提取 自动摘要 文本分类聚类 拼音简繁转换 自然语言处理

HanLP 的golang 接口

  • 在线轻量级RESTful API
  • 仅数KB,适合敏捷开发、移动APP等场景。服务器算力有限,匿名用户配额较少
  • 支持基于等宽字体的可视化,能够直接将语言学结构在控制台内可视化出来

使用方式

安装

go get -u github.com/xxjwxc/gohanlp@master

使用

申请auth认证

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

文本形式

client := hanlp.HanLPClient(hanlp.WithAuth("你申请到的auth")) // auth不填则匿名
s, _ := client.Parse("2021年HanLPv2.1为生产环境带来次世代最先进的多语种NLP技术。阿婆主来到北京立方庭参观自然语义科技公司。",hanlp.WithLanguage("zh"))
fmt.Println(s)

对象形式

client := hanlp.HanLPClient(hanlp.WithAuth("你申请到的auth")) // auth不填则匿名
resp, _ := client.ParseObj("2021年HanLPv2.1为生产环境带来次世代最先进的多语种NLP技术。阿婆主来到北京立方庭参观自然语义科技公司。",hanlp.WithLanguage("zh"))
fmt.Println(resp)

更多调用API 请查看

options

更多信息

关于标注集含义,请参考《语言学标注规范》《格式规范》。我们购买、标注或采用了世界上量级最大、种类最多的语料库用于联合多语种多任务学习,所以HanLP的标注集也是覆盖面最广的。

训练你自己的领域模型

写深度学习模型一点都不难,难的是复现较高的准确率。下列代码展示了如何在sighan2005 PKU语料库上花6分钟训练一个超越学术界state-of-the-art的中文分词模型。

English | 文档 | 1.x版 | 论坛 | docker | ▶️ 在线运行

面向生产环境的多语种自然语言处理工具包,基于PyTorch和TensorFlow 2.x双引擎,目标是普及落地最前沿的NLP技术。HanLP具备功能完善、性能高效、架构清晰、语料时新、可自定义的特点。

借助世界上最大的多语种语料库,HanLP2.1支持包括简繁中英日俄法德在内的104种语言上的10种联合任务:分词(粗分、细分2个标准,强制、合并、校正3种词典模式)、词性标注(PKU、863、CTB、UD四套词性规范)、命名实体识别(PKU、MSRA、OntoNotes三套规范)、依存句法分析(SD、UD规范)、成分句法分析语义依存分析(SemEval16、DM、PAS、PSD四套规范)、语义角色标注词干提取词法语法特征提取抽象意义表示(AMR)。

量体裁衣,HanLP提供RESTfulnative两种API,分别面向轻量级和海量级两种场景。无论何种API何种语言,HanLP接口在语义上保持一致,在代码上坚持开源。

Similar Resources

RESTful-JSON-API - RESTful-JSON-API using Go

RESTful-JSON-API using Go This basic REST-API principle establishes a one-to-one

Feb 15, 2022

Microservice Boilerplate for Golang with gRPC and RESTful API. Multiple database and client supported

Microservice Boilerplate for Golang with gRPC and RESTful API. Multiple database and client supported

Go Microservice Starter A boilerplate for flexible Go microservice. Table of contents Features Installation Todo List Folder Structures Features: Mult

Jul 28, 2022

Restgo - Restful http client pkg in Go

Restgo - Restful http client pkg in Go

Dec 1, 2022

An extremely fast Go (golang) HTTP router that supports regular expression route matching. Comes with full support for building RESTful APIs.

ozzo-routing You may consider using go-rest-api to jumpstart your new RESTful applications with ozzo-routing. Description ozzo-routing is a Go package

Dec 31, 2022

golang crud restful api with gorm , gin and mysql DB

crud restful api with golang , gorm , gin and mysql this api does a simple CRUD operations on a single table mysql Database . this is build on top off

Feb 26, 2022

A simple RESTful server with golang

A simple RESTful server Setup local development environment cp develop.env .env docker-compose up -d docker-compose exec mysql mysql -u root --passwor

Oct 28, 2021

Create a demo RESTful application using Golang

Instructions The goal of this exercise is to create a demo RESTful application using Golang. The Task In this task, we are building backend of an appl

Oct 30, 2021

Build a TodoList with Go Design and implement a backend RESTful service in golang with CRUD

May we ask Igor to do a little project in leu of sample code? If there is a hire, the hours spent should be invoiced, so please keep track of that. Th

May 5, 2022

Restful Api Endpoints With Golang

REST API Endpoints records(POST) fetch data from mongodb in-memory(POST) create key value pair in-memory in-memory/:key (GET) key valeu pair from in-m

Aug 22, 2022

A RESTful API Reservation App using Golang

A RESTful API Reservation App using Golang

Project-2 Project#2 "AirBnb" Reservation App Projek Kedua Pembangunan RESTful API Program Immersive Back End Batch 4 Kunjungi kami » 🛠 Build App & Da

Jan 12, 2022

Example ReSTFul Server in Golang - SBU-Snapp-School

students.go Introduction ReSTful API to create, update, retrieve and delete students from a datastore. Requests needs validation, package needs tests,

Sep 14, 2022

Golang Restful API Messaging using GORM ORM (MySQL) Gorilla Mux

Golang Restful API Messaging using GORM ORM (MySQL) Gorilla Mux Getting Started Folder Structure This is my folder structure under my $GOPATH or $HOME

Dec 14, 2021

Implementing a restful-api with Golang.

Go-REST Create a restful api with Golang. The main idea behind this project was to gain some knowledge about implementing a rest-api in Golang. Setup

Aug 22, 2022

An implementation of a simple RESTful API in Golang on AWS infrastructure.

go-api An implementation of a simple RESTful API in Golang on AWS infrastructure. Tech Stack Serverless framework Go language AWS API Gateway AWS Lamb

Dec 25, 2021

Urlshorter - A restful url shorter for golang

To who that review this code: I try my best to dockerize files and project but I

Dec 31, 2021

Gin-easy-todo - golang 의 RESTful API 프레임워크 gin 을 활용해 아주 간단한 Todo 애플리케이션을 만들어보자.

Gin-easy-todo - golang 의 RESTful API 프레임워크 gin 을 활용해 아주 간단한 Todo 애플리케이션을 만들어보자.

목차 1. 요약 2. 목표 3. API 목록 4. 프로젝트 구조 5. 패키지 별 기능과 관계 6. 사전 작업 6.1. DB, Table 생성 6.2. 모듈 생성 6.3. 패키지 다운로드 7. Gin 작성 7.1. 데이터베이스 설정 7.2. 테이블, 스키마 정의 7.3.

Jan 2, 2022

Fastrest - fast restful framework for golang.

fastrest fast restful framework for golang. Create your app directory, like mkdir myapp; cd myapp; go mod init myapp; Create initial config.toml in a

Nov 8, 2022

⚓️ Golang RESTful APIs

Golang RESTful Golang RESTful API started on January 23rd, 2022. 环境配置相关解决办法

Jan 23, 2022

A RESTful API written in Golang to store and retrieve ticket information.

Tickets-API A RESTful API written in Golang to store and retrieve ticket information. This is a RESTful API built on top of the gin-gonic/gin package

Jan 31, 2022
Selected Machine Learning algorithms for natural language processing and semantic analysis in Golang

Natural Language Processing Implementations of selected machine learning algorithms for natural language processing in golang. The primary focus for t

Dec 25, 2022
Golang implementation of the Paice/Husk Stemming Algorithm

##Golang Implementation of the Paice/Husk stemming algorithm This project was created for the QUT course INB344. Details on the algorithm can be found

Sep 27, 2022
Golang port of Petrovich - an inflector for Russian anthroponyms.
Golang port of Petrovich - an inflector for Russian anthroponyms.

Petrovich is the library which inflects Russian names to given grammatical case. This is the Go port of https://github.com/petrovich. Installation go

Dec 25, 2022
A Golang library for text processing, including tokenization, part-of-speech tagging, and named-entity extraction.

prose is a natural language processing library (English only, at the moment) in pure Go. It supports tokenization, segmentation, part-of-speech tagging, and named-entity extraction.

Jan 4, 2023
A multilingual command line sentence tokenizer in Golang
A multilingual command line sentence tokenizer in Golang

Sentences - A command line sentence tokenizer This command line utility will convert a blob of text into a list of sentences. Demo Docs Install go get

Dec 30, 2022
Cross platform locale detection for Golang

go-locale go-locale is a Golang lib for cross platform locale detection. OS Support Support all OS that Golang supported, except android: aix: IBM AIX

Aug 20, 2022
📖 Tutorial: An easy way to translate your Golang application
📖 Tutorial: An easy way to translate your Golang application

?? Tutorial: An easy way to translate your Golang application ?? The full article is published on April 13, 2021, on Dev.to: https://dev.to/koddr/an-e

Feb 9, 2022
i18n of golang

i18n i18n of golang 使用方法 下载i18n go get https://github.com/itmisx/i18n 定义 code 语言包 var langPack1 = map[string]map[interface{}]interface{}{ "zh-cn": {

Dec 11, 2021
Licence-server - Building a golang Swagger API with Echo

Building a golang Swagger API with Echo Known Issues References [1] https://deve

Jan 9, 2022
Go-i18n - i18n for Golang

I18n for Go Installation go get -u github.com/fitv/go-i18n Usage YAML files ├──

Oct 18, 2022