# Zawgyi ↔ Unicode Converter & Detector (Myanmar / Burmese) (`zinminkhant/zawgyi-unicode-converter`) Actor

Detect whether Burmese text is Zawgyi or Unicode and convert it, in bulk. Clean CRM records, scraped data and AI training text. Powered by Google's myanmar-tools.

- **URL**: https://apify.com/zinminkhant/zawgyi-unicode-converter.md
- **Developed by:** [Zin Min Khant](https://apify.com/zinminkhant) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 text processed

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Zawgyi ↔ Unicode Converter & Detector (Myanmar / Burmese)

Burmese text online is still a mix of **Zawgyi** and **Unicode**, and the two look the same but are encoded differently. Mixed data breaks search, sorting, deduplication and AI models.
This Actor **detects the encoding of every text and converts Zawgyi to Unicode** (or back), in bulk.

### Use cases

- Clean **CRM, customer and order data** from Myanmar
- Normalize **scraped Facebook, Telegram or web text** before analysis
- Prepare **Burmese datasets for AI / LLM training and RAG**
- Fix search: make Zawgyi and Unicode versions of the same word match

### Input

Plain texts:

```json
{ "texts": ["ျမန္မာ", "မြန်မာ", "hello"] }
```

Records: only the chosen field is converted, everything else is returned unchanged:

```json
{ "records": [{ "id": 7, "name": "Ko Aung", "address": "ရန္ကုန္ၿမိဳ႕" }], "textField": "address" }
```

#### Modes

| Mode | What it does |
|---|---|
| `toUnicode` (default) | Detects each text; converts only Zawgyi, leaves Unicode and English alone |
| `forceToUnicode` | Treats every text as Zawgyi and converts |
| `toZawgyi` | Converts Unicode to Zawgyi (for legacy systems) |
| `detectOnly` | Returns the encoding and probability only |

### Output

Real output from a local run of the inputs above:

```json
[
  {
    "index": 0,
    "input": "ျမန္မာ",
    "output": "မြန်မာ",
    "detectedEncoding": "zawgyi",
    "zawgyiProbability": 0.9999993195406226,
    "converted": true
  },
  {
    "index": 1,
    "input": "မြန်မာ",
    "output": "မြန်မာ",
    "detectedEncoding": "unicode",
    "zawgyiProbability": 0.0001051592135954534,
    "converted": false
  },
  {
    "index": 2,
    "input": "hello",
    "output": "hello",
    "detectedEncoding": "none",
    "zawgyiProbability": null,
    "converted": false
  },
  {
    "index": 3,
    "input": "ရန္ကုန္ၿမိဳ႕",
    "output": "ရန်ကုန်မြို့",
    "detectedEncoding": "zawgyi",
    "zawgyiProbability": 0.9999999999999996,
    "converted": true,
    "record": { "id": 7, "name": "Ko Aung", "address": "ရန်ကုန်မြို့" }
  }
]
```

`detectedEncoding` is `zawgyi`, `unicode`, `uncertain` (left unchanged in auto mode) or `none` (no Burmese letters).
A run summary (counts per encoding) is saved as `SUMMARY` in the key-value store.

### Pricing

Pay per text processed. Set a spending limit and the run stops there. Up to 100,000 texts per run.

### Use with AI agents

Callable from Claude, Cursor and other MCP clients through Apify's MCP server.

### Accuracy

Built on Google's **myanmar-tools** (Apache 2.0), the Zawgyi detector and converter used by Google and Facebook. Tested against its reference corpora: all 63 lines of Myanmar government text convert exactly from Zawgyi to Unicode, all 91 lines of the Universal Declaration of Human Rights convert exactly from Unicode to Zawgyi, and the encoding of every line is detected correctly in both its Zawgyi and Unicode forms. Detection scores match Google's reference table.

### Licenses

Uses myanmar-tools © Google LLC, Apache License 2.0 (included in the image under `node_modules/myanmar-tools/LICENSE.md`).

# Actor input Schema

## `texts` (type: `array`):

Burmese texts to check and convert. Mixed Zawgyi, Unicode and English is fine.

## `records` (type: `array`):

Objects such as CRM or scraped rows. The field named in 'Text field' is converted; other fields are returned unchanged.

## `textField` (type: `string`):

Which field of each record holds the Burmese text.

## `mode` (type: `string`):

Auto converts only text detected as Zawgyi. Force converts everything. Unicode to Zawgyi is for legacy systems. Detect only returns the encoding and probability.

## `threshold` (type: `number`):

Text counts as Zawgyi at or above this probability, as Unicode at or below 1 minus it, and 'uncertain' in between (left unchanged in Auto mode).

## `includeInput` (type: `boolean`):

Return the original text next to the converted output.

## Actor input object example

```json
{
  "texts": [
    "မင်္ဂလာပါ"
  ],
  "records": [],
  "textField": "text",
  "mode": "toUnicode",
  "threshold": 0.95,
  "includeInput": true
}
```

# Actor output Schema

## `results` (type: `string`):

One row per text or record: detected encoding, Zawgyi probability and converted output.

## `summary` (type: `string`):

Counts per detected encoding and number of texts converted.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "texts": [
        "မင်္ဂလာပါ"
    ],
    "records": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("zinminkhant/zawgyi-unicode-converter").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "texts": ["မင်္ဂလာပါ"],
    "records": [],
}

# Run the Actor and wait for it to finish
run = client.actor("zinminkhant/zawgyi-unicode-converter").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "texts": [
    "မင်္ဂလာပါ"
  ],
  "records": []
}' |
apify call zinminkhant/zawgyi-unicode-converter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zinminkhant/zawgyi-unicode-converter"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/CQT9cqKbOuH65xIjQ/builds/C58Q17fr35CJ5YV8k/openapi.json
