分词接口

接口描述

对输入的内容进行分词

请求方式只接受【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
        }
    ]
}

你可能感兴趣的:(分词接口)