Break paragraph
- Print
- PDF
Break paragraph
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Available in Classic and VPC
Identify paragraphs in a post by topic by identifying similarities between sentences.
Request
The following describes the request format for the endpoint. The request format is as follows:
Method | URI |
---|---|
POST | /testapp/v1/api-tools/segmentation/{appId} |
Request headers
The following describes the request headers.
Field | Required | Description |
---|---|---|
X-NCP-CLOVASTUDIO-API-KEY | Required | API key issued when creating the test app or service app |
X-NCP-APIGW-API-KEY | Required | API Gateway key issued when creating the test app or service app |
X-NCP-CLOVASTUDIO-REQUEST-ID | Optional | Request ID |
Content-Type | Required | Request data format
|
Request path parameters
The following describes the request path parameters.
Field | Type | Required | Description |
---|---|---|---|
appId | String | Required | ID of the test app or service app |
Request body
The following describes the request body.
Field | Type | Required | Description |
---|---|---|---|
text | Array | Required | Document you want to paragraph break
|
alpha | Float | Optional | Thresholds value for paragraph breaks
|
segCnt | Integer | Optional | Number of paragraph breaks
|
postProcess | Boolean | Optional | Whether to perform post-processing after paragraph breaks to merge or split paragraphs to the desired length
|
postProcessMaxSize | Integer | Optional | Maximum number of characters in a paragraph after postProcess post-processing
|
postProcessMinSize | Integer | Optional | Minimum number of characters in a paragraph after postProcess post-processing
|
Request example
The following is a sample request.
curl --location --request POST 'https://clovastudio.apigw.ntruss.com/testapp/v1/api-tools/segmentation/{appId}' \
--header 'X-NCP-CLOVASTUDIO-API-KEY: {CLOVA Studio API Key}' \
--header 'X-NCP-APIGW-API-KEY: {API Gateway API Key}' \
--header 'X-NCP-CLOVASTUDIO-REQUEST-ID: {Request ID}' \
--header 'Content-Type: application/json' \
--data '{
"text": "How can we create a note?\nThere are two ways to do it.\nTap the Add button in the CLOVA Note app to start recording, or import a recording file you have saved on your smartphone to create a note.\nThe notes you create can be viewed not only on the app but also integrated with the CLOVA Note website on your PC.\nOn the CLOVA Note website, you can create a note by importing a saved recording file.\nHow do we use bookmarks?\nIf you tap the Bookmark button in the middle of the recording on the CLOVA Note app page, it will be displayed as shown below, so you can easily find the section you need even after finishing the recording.\nIf you finish a recording, there must be a section of the recording that you want to find again.\nWe provide bookmarks for such moments.\nSo, how do we listen to our recordings?\nSelect the recorded conversation from the created notes and you can listen to the recording again.\nIf there's a mistake in the recording, you can easily correct it by listening to it again and tapping the Edit button.",
"alpha": -100,
"segCnt": -1,
"postProcess": false,
"postProcessMaxSize": 2000,
"postProcessMinSize": 500
}'
Response
The following describes the response format.
Response body
The following describes the response body.
Field | Type | Required | Description |
---|---|---|---|
topicSeg | Array | - | Paragraph break results |
span | Array | - | Indexes in paragraphed text
|
inputTokens | Integer | - | Token for the paragraph break target document |
Response example
The following is a sample example.
Succeeded
The following is a sample response upon a successful call.
{
"status": {
"code": "20000",
"message": "OK"
},
"result": {
"topicSeg": [
[
"How can we create a note?",
"There are two ways to do it."
],
[
"Tap the Add button in the CLOVA Note app to start recording, or import a recording file you have saved on your smartphone to create a note.",
"The notes you create can be viewed not only on the app but also integrated with the CLOVA Note website on your PC.",
"On the CLOVA Note website, you can create a note by importing a saved recording file."
],
[
"How do we use bookmarks?",
"If you tap the Bookmark button in the middle of the recording on the CLOVA Note app page, it will be displayed as shown below, so you can easily find the section you need even after finishing the recording.",
"If you finish a recording, there must be a section of the recording that you want to find again.",
"We provide bookmarks for such moments."
],
[
"So, how do we listen to our recordings?",
"Select the recorded conversation from the created notes and you can listen to the recording again.",
"If there's a mistake in the recording, you can easily correct it by listening to it again and tapping the Edit button."
]
],
"span": [
[
0,
1
],
[
2,
3,
4
],
[
5,
6,
7,
8
],
[
9,
10,
11
]
],
"inputTokens": 330
}
}
Failure
The following is a sample response upon a failed call.
Was this article helpful?