分词接口

接口描述

对输入的内容进行分词

请求方式只接受【GET】请求

http://localhost:port/index/_analyze?analyzer=ik&pretty=true&text=湖南省气象信息中心湖南省省内气象广域网络系统建设项目公开招标  
#### 具体地址单独给出 TEXT内容改变外,其它保持不变

请求参数说明

json数据格式,具体内容如下

参数 类型 说明
text string 要搜索的内容

------------------- 分隔线 ---------------


返回参数说明

参数 类型 说明
token String 分词结果

返回结果

{
    tokens: [
        {
            token: "湖南省",
            start_offset: 0,
            end_offset: 3,
            type: "CN_WORD",
            position: 1
        },
        {
            token: "气象",
            start_offset: 3,
            end_offset: 5,
            type: "CN_WORD",
            position: 2
        },
        {
            token: "信息中心",
            start_offset: 5,
            end_offset: 9,
            type: "CN_WORD",
            position: 3
        },
        {
            token: "湖南省",
            start_offset: 9,
            end_offset: 12,
            type: "CN_WORD",
            position: 4
        },
        {
            token: "省内",
            start_offset: 12,
            end_offset: 14,
            type: "CN_WORD",
            position: 5
        },
        {
            token: "气象",
            start_offset: 14,
            end_offset: 16,
            type: "CN_WORD",
            position: 6
        },
        {
            token: "广域",
            start_offset: 16,
            end_offset: 18,
            type: "CN_WORD",
            position: 7
        },
        {
            token: "网",
            start_offset: 28,
            end_offset: 29,
            type: "CN_CHAR",
            position: 8
        },
        {
            token: "络",
            start_offset: 44,
            end_offset: 45,
            type: "CN_WORD",
            position: 9
        },
        {
            token: "系统",
            start_offset: 66,
            end_offset: 68,
            type: "CN_WORD",
            position: 10
        },
        {
            token: "建设项目",
            start_offset: 68,
            end_offset: 72,
            type: "CN_WORD",
            position: 11
        },
        {
            token: "公开招标",
            start_offset: 72,
            end_offset: 76,
            type: "CN_WORD",
            position: 12
        }
    ]
}
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,908评论 18 139
  • # 一度蜜v3.0协议 --- # 交互协议 [TOC] ## 协议说明 ### 请求参数 下表列出了v3.0版协...
    c5e350bc5b40阅读 670评论 0 0
  • 国家电网公司企业标准(Q/GDW)- 面向对象的用电信息数据交换协议 - 报批稿:20170802 前言: 排版 ...
    庭说阅读 11,141评论 6 13
  • 1. Java基础部分 基础部分的顺序:基本语法,类相关的语法,内部类的语法,继承相关的语法,异常的语法,线程的语...
    子非鱼_t_阅读 31,764评论 18 399
  • 今天,我敞开心灵和心扉的方式,让我可以听到宇宙对我说话,给我方向。我让心灵敞开,从而能够接收他的指引。当他向我说话...
    英杰旺姆阅读 199评论 0 0