transform(data, lang)

Method to transform misspelled text into readable text.

Parameters

Parameters Info
data String (required)
The string you want to process.
lang String (optional, default='en')
Language of given input, 'en' for English, 'ms' for Malay.

Example

NodeJS:

const Dialex = require('@hyperlab-solutions/dialex').Dialex;
const dialex = new Dialex('67890cd-testerkey-yz12345');

dialex.transform('my incorect sentense', 'en')
    .then(result => console.log(result))
    .catch(error => console.log(error));

Browser

<script src="https://cdn.jsdelivr.net/npm/@hyperlab-solutions/dialex/lib/dialex.min.js"></script>
...
<script>
let dial = new dialex.Dialex('67890cd-testerkey-yz12345');
dial.transform('my incorect sentense', 'en')
    .then(result => console.log(result))
    .catch(error => console.log(error));
</script>

Python:

from dialex import dialex

dial = dialex.Dialex('67890cd-testerkey-yz12345')
resp = dial.transform('my incorect sentense', 'en')
print resp

Go:

import "github.com/HyperLab-Solutions-Sdn-Bhd/dialex-sdk-go/dialex"

dial := dialex.New("67890cd-testerkey-yz12345")
resp, err := dial.Transform("my incorect sentense", "en")
fmt.Println(resp)

Curl:

$ curl 'https://api.dialex.xyz/api/v1/process?apikey=67890cd-testerkey-yz12345&lang=en&data=my%20incorect%20sentense'

Response

my incorrect sentence

results matching ""

    No results matching ""