MENU
      Break paragraph
        • PDF

        Break paragraph

        • PDF

        Article summary

        Available in Classic and VPC

        Identify paragraphs in a post by topic by identifying similarities between sentences.

        Request

        This section describes the request format. The method and URI are as follows:

        MethodURI
        POST/v1/api-tools/segmentation

        Request headers

        The following describes the request headers.

        FieldRequiredDescription
        AuthorizationRequiredAPI key for authentication <e.g.,> Bearer nv-************
        X-NCP-CLOVASTUDIO-REQUEST-IDOptionalRequest ID
        Content-TypeRequiredRequest data format
        • application/json

        Request body

        You can include the following data in the body of your request:

        FieldTypeRequiredDescription
        textArrayRequiredDocument you want to paragraph break
        • 1-120,000 characters (based on Korean, including spaces)
        alphaFloatOptionalThresholds value for paragraph breaks
        • Larger values increase the number of paragraph splits
        • -100 | -1.5 - 1.5 (default: 0.0)
          • -100: The model automatically breaks paragraphs with the optimal values
        segCntIntegerOptionalNumber of paragraph breaks
        • -1 (default) | 1 or higher
          • -1: The model automatically performs with optimal values
        postProcessBooleanOptionalWhether to perform post-processing after paragraph breaks to merge or split paragraphs to the desired length
        • true | false (default)
          • true: Perform post-processing and apply relevant parameters
          • false: No post-processing performed
        postProcessMaxSizeIntegerOptionalMaximum number of characters in a paragraph after postProcess post-processing
        • 1 or higher (default: 1000)
        postProcessMinSizeIntegerOptionalMinimum number of characters in a paragraph after postProcess post-processing
        • -1 | 0 - postProcessMaxSize value (default: 300)
          • -1: Automatically set to minimum unit

        Request example

        The request example is as follows:

        curl --location --request POST 'https://clovastudio.stream.ntruss.com/testapp/v1/api-tools/segmentation' \
        --header 'Authorization: Bearer {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
        }'
        Shell

        Response

        This section describes the response format.

        Response body

        The response body includes the following data:

        FieldTypeRequiredDescription
        topicSegArray-Paragraph break results
        spanArray-Indexes in paragraphed text
        • See where paragraphs are broken
        • [] (default)
        inputTokensInteger-Token for the paragraph break target document

        Response example

        The response example is as follows:

        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
            }
        }
        JSON

        Failure

        The following is a sample response upon a failed call.


        Was this article helpful?

        What's Next
        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.