Text Similarity Detection
This API efficiently and accurately detects the similarity between two text snippets. Supporting multiple languages, it is widely used in content moderation and recommendation systems.
Documentation
Features
The Text Similarity Detection API provides an advanced algorithm to accurately calculate the semantic similarity of input text pairs. It goes beyond simple vocabulary matching by deeply analyzing the context and underlying meaning of the text, thereby providing a more reliable similarity score. It supports the comparison of both long and short texts and can process texts in different languages. Featuring high concurrency and low latency, this API ensures stable and efficient service across various application scenarios.
Use Cases
- Content Moderation and Deduplication: Automatically identifies duplicate or highly similar articles and comments to effectively prevent plagiarism.
- Smart Recommendation Systems: Recommends highly similar news, products, or videos based on content the user has read or shown interest in.
- Semantic Search: Goes beyond keyword matching during user queries to return semantically relevant search results.
- Q&A Systems: Determines the similarity between a user's question and existing questions in the knowledge base to provide more accurate answers.
- Customer Service: Analyzes the similarity between customer inquiries and the FAQ database to enable intelligent routing or automated responses.
Integration Examples
Includes ready-to-use Shell, Python, Go, Java, and PHP examples for direct integration.
Request Example
{}Response Example
{
"code": 200,
"data": {
"like": {
"type": "number",
"example": 0.8164965809277261,
"description": "两个文本相似的程度,为0至1之间的小数。越接近1说明越像。"
},
"orderNo": {
"type": "string",
"example": "f45dj6jdknqfkszc8k"
},
"ret_code": {
"type": "string",
"example": "0",
"description": "0成功其它失败"
}
},
"message": "success"
}Response Fields
The fields below are derived from example JSON for integration reference only.
| Path | Type | Sample |
|---|---|---|
| code | number | 200 |
| data | object | {...} |
| data.like | object | {...} |
| data.like.type | string | number |
| data.like.example | number | 0.8164965809277261 |
| data.like.description | string | 两个文本相似的程度,为0至1之间的小数。越接近1说明越像。 |
| data.orderNo | object | {...} |