Giter VIP home page Giter VIP logo

google-translate-clone's Introduction

Development Practice Challenge : Build a Language Translation App

Stacks

Getting Started

First, run the development server: npm run dev

Web

Open http://localhost:3000 with your browser to see the frontend page.

image

API

Use HTTP Client Extension such as Postman and Thunder Client to test it.

  • URL http://localhost:3000/api/translate
  • Method POST
  • Body
{
  "sl":"id",
  "tl":"en",
  "q":"Hore"
}

sl and tl are language codes, you can find them on here. q is the text you want to be translated.

  • Response
{
  "sentences": [
    {
      "trans": "Hurray",
      "orig": "Hore",
      "backend": 3,
      "model_specification": [{}],
      "translation_engine_debug_info": [
        {
          "model_tracking": {
            "checkpoint_md5": "d906f146e9fec4c46f9b531e2fa31c2a",
            "launch_doc": "id_en_2021q1.md"
          }
        }
      ]
    }
  ],
  "dict": [
    {
      "pos": "interjection",
      "terms": ["Hurray!", "Hurrah!"],
      "entry": [
        {
          "word": "Hurray!",
          "reverse_translation": ["Hore!", "Hura!", "Sabas!"],
          "score": 0.16842748
        },
        {
          "word": "Hurrah!",
          "reverse_translation": ["Hore!", "Hura!", "Sabas!"],
          "score": 0.10539922
        }
      ],
      "base_form": "Hore!",
      "pos_enum": 9
    }
  ],
  "src": "id",
  "confidence": 0.3984375,
  "spell": {},
  "ld_result": {
    "srclangs": ["sk", "so", "ja"],
    "srclangs_confidences": [0.3984375, 0.3984375, 0.16015625],
    "extended_srclangs": ["sk", "so", "ja-Latn"]
  }
}

google-translate-clone's People

Contributors

christiantochen avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rb-tech-byte

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.