Text similarity

This task calculates the similarity between two texts.

Input

Embedding model

Description

The task offers a powerful solution for calculating the similarity between two texts. Whether you're working on clustering, sentinel analysis, or classification tasks, this tool provides valuable insights into the likeness of two given texts.

Applications

• Clustering: Group similar texts together for better organization and analysis.

• Sentiment Analysis: Understand sentiments by comparing text similarities.

• Text Classification: Aid in categorizing and organizing texts efficiently.

How to use the task

  1. Input the two texts that you wish to compare.

  2. Click the "Run Task" button.

  3. Instantly, you'll receive a similarity score that quantifies how closely related the two texts are.

Privacy

Please do not use any sensitive input.

[1.0.0]:
First version
VersionAI ModelCreatedLink
1.0.0openai30.07.2023

API

The REST API allows you to call the tool with the same costs as when running the tool. Please generate an Personal access token before using the REST API.

Parameters

  • input_0 (Input 0): The first input that is used to compare the two inputs.
  • model (Embedding model): Defines the embedding model
  • input_1 (Input 1): The second input that is used to compare the two inputs.
  • Call the REST API by cURL
    curl -v -H "Authorization: Bearer PERSONAL_ACCESS_TOKEN" https://api.anysolve.ai/rest/v1/intern-embeddings-text-similarity/1.0.0?input_0=I%20like%20to%20go%20sailing.&model=text-embedding-ada-002&input_1=I%20like%20going%20to%20the%20cinema.
  • Install the package with pip
    python3 -m pip install anysolve
  • Run in python3
    import os
    from anysolve import AnySolve
    anysolve_token = os.environ.get('ANYSOLVE_PERSONAL_ACCESS_TOKEN') # Resolve your personal access token here
    client = AnySolve(anysolve_token)
    res = client.run('intern-embeddings-text-similarity','1.0.0', {'input_0': 'I like to go sailing.', 'model': 'text-embedding-ada-002', 'input_1': 'I like going to the cinema.'})
    print(res)
  • Coming soon: Within AnySolve ChatComplete prompts you can use the following command to execute the task:
    /run('intern-embeddings-text-similarity','1.0.0', input_0='I like to go sailing.', model='text-embedding-ada-002', input_1='I like going to the cinema.')