This repository has been archived on 2024-07-04. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
h7x4 65e2dde7a1
All checks were successful
Deploy / deploy (pull_request) Successful in 29s
Deploy / deploy (push) Successful in 31s
Remove URL from README.md
2024-06-02 00:10:11 +02:00
.gitea/workflows Deploy gitea page 2024-06-02 00:06:10 +02:00
index.html Add filtering buttons 2020-11-21 04:18:53 +01:00
README.md Remove URL from README.md 2024-06-02 00:10:11 +02:00
script.js Apply mobile scaling 2020-11-21 04:58:13 +01:00
style.css Apply mobile scaling 2020-11-21 04:58:13 +01:00

Google IME Handwriting Request

Example of direct usage of the API behind handwriting in google translate.

Example request data:

{
  "app_version": 0.4,
  "api_level": "537.36",
  "device": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.246",
  "input_type": 0,
  "options": "enable_pre_space",
  "requests": [
    {
      "writing_guide": {
        "writing_area_width": 500,
        "writing_area_height": 500
      },
      "pre_context": "",
      "max_num_results": 10,
      "max_completions": 0,
      "language": "ja",
      "ink": [
        [
          [139,204,288],
          [169,173,173],
          [27,51,75]
        ],
        [
          [213,213,216,219,221],
          [110,124,160,203,229],
          [57,81,105,129,153]
        ]
      ]
    }
  ]
}

where ink is an array of strokes. A stroke is formatted as an array containing three arrays. They contain every points x-values, y-values and the time between point creation and the beginning of the stroke.