samurais/hanlp-api

By samurais

Updated over 8 years ago

支持中文分词,关键词提取,自动摘要,短语提取,拼音转换,简繁转换,文本推荐,依存句法分析

Image
14

5.2K

samurais/hanlp-api repository overview

Docker Pulls Docker Stars Docker Layers

HanLP Docker Image: 自然语言处理

docker pull samurais/hanlp-api:latest
  • start container
docker run -it --rm -p 3002:3000 samurais/hanlp-api:latest
open http://localhost:3002 # Get docs for API
  • access service
POST /tokenizer HTTP/1.1
Host: localhost:3002
Content-Type: application/json

{
	"type": "nlp",
	"content": "刘德华和张学友创作了很多流行歌曲"
}

RESPONSE
{
  "status": "success",
  "data": [
    {
      "word": "刘德华",
      "nature": "nr",
      "offset": 0
    },
    {
      "word": "和",
      "nature": "cc",
      "offset": 0
    },
    {
      "word": "张学友",
      "nature": "nr",
      "offset": 0
    },
    {
      "word": "创作",
      "nature": "v",
      "offset": 0
    },
    {
      "word": "了",
      "nature": "ule",
      "offset": 0
    },
    {
      "word": "很多",
      "nature": "m",
      "offset": 0
    },
    {
      "word": "流行歌曲",
      "nature": "n",
      "offset": 0
    }
  ]
}
  • Other APIs

Read docs with http://localhost:3002

- tokenizer 分词
- keyword 关键词
- summary 摘要
- phrase 短语提取
- query 关键词、摘要
- conversion 简、繁、拼音转换

Issue

Open Tickets for help or suggests with https://github.com/Samurais/hanlp-api/issues

Tag summary

Content type

Image

Digest

Size

1010.5 MB

Last updated

over 8 years ago

docker pull samurais/hanlp-api