{"id":16970315,"url":"https://github.com/xxjwxc/gohanlp","last_synced_at":"2025-07-21T17:31:34.153Z","repository":{"id":57573605,"uuid":"349280418","full_name":"xxjwxc/gohanlp","owner":"xxjwxc","description":"Golang RESTful Client for HanLP.中文分词 词性标注 命名实体识别 依存句法分析 语义依存分析 新词发现 关键词短语提取 自动摘要 文本分类聚类 拼音简繁转换 自然语言处理","archived":false,"fork":false,"pushed_at":"2023-08-01T11:27:11.000Z","size":33,"stargazers_count":36,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T07:41:26.915Z","etag":null,"topics":["ai","dependency-parser","hanlp","named-entity-recognition","natural-language-processing","nlp","pos-tagging","semantic-parsing","text-classification"],"latest_commit_sha":null,"homepage":"https://xxjwxc.github.io/post/gohanlp/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xxjwxc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-03-19T02:45:03.000Z","updated_at":"2024-12-23T08:08:40.000Z","dependencies_parsed_at":"2022-09-18T04:21:23.691Z","dependency_job_id":"93d52afa-3df1-4bfe-b669-f9f6d8e3a322","html_url":"https://github.com/xxjwxc/gohanlp","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"a5dc21ba7bfad67d94c15d550a520105a320fe13"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xxjwxc/gohanlp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxjwxc%2Fgohanlp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxjwxc%2Fgohanlp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxjwxc%2Fgohanlp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxjwxc%2Fgohanlp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xxjwxc","download_url":"https://codeload.github.com/xxjwxc/gohanlp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxjwxc%2Fgohanlp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266342809,"owners_count":23914262,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","dependency-parser","hanlp","named-entity-recognition","natural-language-processing","nlp","pos-tagging","semantic-parsing","text-classification"],"created_at":"2024-10-14T00:27:56.197Z","updated_at":"2025-07-21T17:31:34.104Z","avatar_url":"https://github.com/xxjwxc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/xxjwxc/gohanlp.svg?branch=main)](https://travis-ci.org/xxjwxc/gohanlp)\n[![Go Report Card](https://goreportcard.com/badge/github.com/xxjwxc/gohanlp)](https://goreportcard.com/report/github.com/xxjwxc/gohanlp)\n[![GoDoc](https://godoc.org/github.com/xxjwxc/gohanlp?status.svg)](https://godoc.org/github.com/xxjwxc/gohanlp)\n\n# gohanlp\n中文分词 词性标注 命名实体识别 依存句法分析 语义依存分析 新词发现 关键词短语提取 自动摘要 文本分类聚类 拼音简繁转换 自然语言处理\n\n\n## [HanLP](https://github.com/hankcs/HanLP) 的golang 接口\n- 在线轻量级RESTful API\n- 仅数KB，适合敏捷开发、移动APP等场景。服务器算力有限，匿名用户配额较少\n- 支持基于等宽字体的[可视化](https://hanlp.hankcs.com/docs/tutorial.html#visualization)，能够直接将语言学结构在控制台内可视化出来\n  \n\n## 使用方式\n\n### 安装\n```\ngo get -u github.com/xxjwxc/gohanlp@master\n\n```\n#### 使用\n\n#### 申请auth认证\n\nhttps://bbs.hanlp.com/t/hanlp2-1-restful-api/53\n#### 文本形式\n\n```\nclient := hanlp.HanLPClient(hanlp.WithAuth(\"你申请到的auth\")) // auth不填则匿名\ns, _ := client.Parse(\"2021年HanLPv2.1为生产环境带来次世代最先进的多语种NLP技术。阿婆主来到北京立方庭参观自然语义科技公司。\",hanlp.WithLanguage(\"zh\"))\nfmt.Println(s)\n```\n\n#### 对象形式\n\n```\nclient := hanlp.HanLPClient(hanlp.WithAuth(\"你申请到的auth\")) // auth不填则匿名\nresp, _ := client.ParseObj(\"2021年HanLPv2.1为生产环境带来次世代最先进的多语种NLP技术。阿婆主来到北京立方庭参观自然语义科技公司。\",hanlp.WithLanguage(\"zh\"))\nfmt.Println(resp)\n```\n\n\n#### 更多调用API 请查看\n[options](https://github.com/xxjwxc/gohanlp/blob/main/hanlp/option.go)\n\n#### 更多信息\n\n\n关于标注集含义，请参考[《语言学标注规范》](https://hanlp.hankcs.com/docs/annotations/index.html)及[《格式规范》](https://hanlp.hankcs.com/docs/data_format.html)。我们购买、标注或采用了世界上量级最大、种类最多的语料库用于联合多语种多任务学习，所以HanLP的标注集也是覆盖面最广的。\n\n## 训练你自己的领域模型\n\n写深度学习模型一点都不难，难的是复现较高的准确率。下列[代码](https://github.com/hankcs/HanLP/blob/master/plugins/hanlp_demo/hanlp_demo/zh/train_sota_bert_pku.py)展示了如何在sighan2005 PKU语料库上花6分钟训练一个超越学术界state-of-the-art的中文分词模型。\n\n[English](https://github.com/hankcs/HanLP/tree/master) | [文档](https://hanlp.hankcs.com/docs/) |  [1.x版](https://github.com/hankcs/HanLP/tree/1.x) | [论坛](https://bbs.hankcs.com/) | [docker](https://github.com/wangedison/hanlp-jupyterlab-docker) | [▶️在线运行](https://play.hanlp.ml/)\n\n面向生产环境的多语种自然语言处理工具包，基于PyTorch和TensorFlow 2.x双引擎，目标是普及落地最前沿的NLP技术。HanLP具备功能完善、性能高效、架构清晰、语料时新、可自定义的特点。\n\n借助世界上最大的多语种语料库，HanLP2.1支持包括简繁中英日俄法德在内的104种语言上的10种联合任务：**分词**（粗分、细分2个标准，强制、合并、校正3种[词典模式](https://github.com/hankcs/HanLP/blob/master/plugins/hanlp_demo/hanlp_demo/zh/demo_custom_dict.py)）、**词性标注**（PKU、863、CTB、UD四套词性规范）、**命名实体识别**（PKU、MSRA、OntoNotes三套规范）、**依存句法分析**（SD、UD规范）、**成分句法分析**、**语义依存分析**（SemEval16、DM、PAS、PSD四套规范）、**语义角色标注**、**词干提取**、**词法语法特征提取**、**抽象意义表示**（AMR）。\n\n量体裁衣，HanLP提供**RESTful**和**native**两种API，分别面向轻量级和海量级两种场景。无论何种API何种语言，HanLP接口在语义上保持一致，在代码上坚持开源。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxxjwxc%2Fgohanlp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxxjwxc%2Fgohanlp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxxjwxc%2Fgohanlp/lists"}