Step 1. 發起HTTP Request

POST https://developer.udndigital.com.tw/nlp/text:smartSuggestion/

Step 2. 建立要求主體(Request body)

The request body contains data with the following structure:
{
    "text": "領導者的挑戰在於如何避免因過度投入而耗損精力。",
    "min_level": 2,
    "standardize": false,
    "replace_overuse": true
}

Step 3. API 參數說明

欄位 參數說明
text 要偵測搭配詞使用的文本
min_level 回傳建議的最低等級(1-3)預設為 2
standardize 是否使用統一用字表,預設為 false
replace_overuse 替換段落中的重複用字,預設為 false
overuse_threshold

視為重複用字的最少重複次數,預設為 0 不計算重複;

replace_overuse 為 true 時預設為 2

範例

以下透過 Request 以及 Response 說明各參數搭配之回傳結果。

Request 1

{ "text": "領導者的挑戰在於如何避免因過度投入而耗損精力。", "min_level": 2, "standardize": false, "replace_overuse": true }

Response 1

{ "text": [ [ 18, 20, "用字推薦", "耗損", "消耗" ] ] }