Neural-Space / typens

NPM library to enable phonetic suggestions while typing on input/textarea elements

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logo

Typens

Typens ( pronounced "Type NS" ) is a Javascript library that enables Phonetic typing on any input/textarea element by using Neural Space Transliteration API.

Pre-requisites

You need a NeuralSpace platform auth code to be able to initialize the library.

Sign up is free and you get free credits too.

Sign in to the NeuralSpace platform

You can copy the auth code on the top right corner of the platform

Features

  • Enable Phonetic typing on Input/Textarea elements
  • Configurable maximum number of suggestions while typing
  • Cross browser compatibility

Installation

Install typens

With npm

  npm install typens --save

Usage

import PhoneticType from "speakns";

let phoneticType = new PhoneticType({
    authToken: "<YOUR_NEURALSPACE_AUTH_TOKEN>",
    language: "hi", //Specify the language code of the target language
    elementId: "mytext", // Id of the input/textarea element on which you want to initialize phonetic typing
    maxSuggest: 5 // Maximum number of suggestions to display while typing
});

Use the phoneticType object apis to enable/disable phonetic suggestions while typing

To enable suggestions

phoneticType.enablePhoneticTyping()

To disable suggestions

phoneticType.disablePhoneticTyping()

About

NPM library to enable phonetic suggestions while typing on input/textarea elements


Languages

Language:JavaScript 100.0%