> ## Documentation Index
> Fetch the complete documentation index at: https://developers.remeinium.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# /sentence_similarity

> Compute the similarity between two Sinhala sentences.

<Tabs>
  <Tab title="Python">
    **Python example:**

    ```python theme={null}
    from gradio_client import Client

    client = Client("Remeinium/Embedding_Siyabasa")
    result = client.predict(
        sentence1="මම පාසලට යමි",
        sentence2="ඔහු පාසලට යයි",
        api_name="/sentence_similarity"
    )
    print(json.dumps(result, indent=4))
    ```
  </Tab>

  <Tab title="Javascript">
    ```javascript theme={null}
    from gradio_client import Client

    client = Client("Remeinium/Embedding_Siyabasa")
    result = client.predict(
    	sentence1="මම පාසලට යමි",
    	sentence2="ඔහු පාසලට යයි",
    	api_name="/sentence_similarity"
    )
    print(result)
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST https://remeinium-embedding-siyabasa.hf.space/gradio_api/call/sentence_similarity -s -H "Content-Type: application/json" -d '{
    	"data": ["මම පාසලට යමි",
    			"ඔහු පාසලට යයි"
    			]}' \
    	| awk -F'"' '{ print $4}'  \
    	| read EVENT_ID; curl -N https://remeinium-embedding-siyabasa.hf.space/gradio_api/call/sentence_similarity/$EVENT_ID
    ```
  </Tab>
</Tabs>

**Response format:**

```json theme={null}
{
    "sentence1": "මම පාසලට යමි",
    "sentence2": "ඔහු පාසලට යයි", 
    "similarity": 0.734567,
    "model": "UgannA_SiyabasaV2"
}
```

#### \*\*\\

Accepts 2 parameters:\*\*

1. `sentence1` : `str` \**<u>Required</u>*

   > The input value that is provided in the "Sentence A" Textbox component.
2. `sentence2` : `str` \**<u>Required</u>*

   > The input value that is provided in the "Sentence B" Textbox component.

#### **Returns 1 element**

`str | float | bool | list | dict`

> The output value that appears in the "Sentence Similarity" Json component.
