接口描述
對(duì)輸入的內(nèi)容進(jìn)行分詞
請(qǐng)求方式只接受【GET】請(qǐng)求
http://localhost:port/index/_analyze?analyzer=ik&pretty=true&text=湖南省氣象信息中心湖南省省內(nèi)氣象廣域網(wǎng)絡(luò)系統(tǒng)建設(shè)項(xiàng)目公開(kāi)招標(biāo)
#### 具體地址單獨(dú)給出 TEXT內(nèi)容改變外狠持,其它保持不變
請(qǐng)求參數(shù)說(shuō)明
json數(shù)據(jù)格式歼培,具體內(nèi)容如下
參數(shù) | 類型 | 說(shuō)明 |
---|---|---|
text | string | 要搜索的內(nèi)容 |
------------------- 分隔線 ---------------
返回參數(shù)說(shuō)明
參數(shù) | 類型 | 說(shuō)明 |
---|---|---|
token | String | 分詞結(jié)果 |
返回結(jié)果
{
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: "省內(nèi)",
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: "網(wǎng)",
start_offset: 28,
end_offset: 29,
type: "CN_CHAR",
position: 8
},
{
token: "絡(luò)",
start_offset: 44,
end_offset: 45,
type: "CN_WORD",
position: 9
},
{
token: "系統(tǒng)",
start_offset: 66,
end_offset: 68,
type: "CN_WORD",
position: 10
},
{
token: "建設(shè)項(xiàng)目",
start_offset: 68,
end_offset: 72,
type: "CN_WORD",
position: 11
},
{
token: "公開(kāi)招標(biāo)",
start_offset: 72,
end_offset: 76,
type: "CN_WORD",
position: 12
}
]
}