Translates a Text

This task translate a text to a language you provide.

Input

Description

This task allows to translate the input text from a source_language to a target_language. As output translated is returned that contains the translated text.

The language code is represented by the ISO-639 code. The following languages are available: af, sq, am, ar, hy, as, ay, az, bm, eu, be, bn, bho, bs, bg, ca, ceb, zh, co, hr, cs, da, dv, doi, nl, en, eo, et, ee, fil, fi, fr, fy, gl, ka, de, el, gn, gu, ht, ha, haw, he oder iw, hi, hmn, hu, is, ig, ilo, id, ga, it, ja, jv oder jw, kn, kk, km, rw, gom, ko, kri, ku, ckb, ky, lo, la, lv, ln, lt, lg, lb, mk, mai, mg, ms, ml, mt, mi, mr, mni-Mtei, lus, mn, my, ne, no, ny, or, om, ps, fa, pl, pt, pa, qu, ro, ru, sm, sa, gd, nso, sr, st, sn, sd, si, sk, sl, so, es, su, sw, sv, tl, tg, ta, tt, te, th, ti, ts, tr, tk, ak, uk, ur, ug, uz, vi, cy, xh, yi, yo, zu.

The model is completely free and can be used as fair use.

Applications

This task is ideal for translating text from one language to another, making it useful for individuals, businesses, and organizations that require multilingual communication.

How to use the task

Provide Input Text: Input the text you want to translate into the specified source_language. Ensure the text is accurately represented to obtain precise translations.

Select Target Language: Specify the target_language into which you want the input text to be translated. This could be any language supported by the translation system.

Execute the Task: Run the task with the input text and chosen source_language and target_language. The task will process the information and generate the translated output.

[1.0.0]:
First version
VersionAI ModelCreatedLink
1.0.023.05.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

  • text (Text to translate): The text input
  • source_language (Source language): The language the text is translated from
  • target_language (Target language): The language the text is translated to
  • Call the REST API by cURL
    curl -v -H "Authorization: Bearer PERSONAL_ACCESS_TOKEN" https://api.anysolve.ai/rest/v1/u-ba835df8268fc301-translates-a-text/1.0.0?text=Ein%20Haus%20auf%20einem%20Feld&source_language=auto&target_language=en
  • 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('u-ba835df8268fc301-translates-a-text','1.0.0', {'text': 'Ein Haus auf einem Feld', 'source_language': 'auto', 'target_language': 'en'})
    print(res)
  • Coming soon: Within AnySolve ChatComplete prompts you can use the following command to execute the task:
    /run('u-ba835df8268fc301-translates-a-text','1.0.0', text='Ein Haus auf einem Feld', source_language='auto', target_language='en')