Teencode Normaliser API

Normalise Vietnamese teencode and chat abbreviations (ko, dc, j, z, ntn, iu…), repeated letters and leftover Telex, keeping case. Changes listed.

GETPOSThttps://apibox.io.vn/v1/vn-teencode

Send informal Vietnamese text ("ko dc j ạ, shop ơiiii, sp nàyyy bn z") and get standard Vietnamese ("không được gì ạ, shop ơi, sản phẩm này bao nhiêu vậy") with the list of changes and their positions. A curated dictionary of about 270 abbreviations covers chat and shopping language (ko / k / hok → không, dc / đc → được, j → gì, z / dz → vậy, ntn → như thế nào, iu → yêu, sp → sản phẩm, sđt → số điện thoại, ck → chuyển khoản…). Ambiguous short forms are only replaced in a clear context: "k" after a number stays (50 k), "bn" becomes "bao nhiêu" before tiền / tuổi or at the end of a question and "bạn" otherwise, "ck" is "chuyển khoản" next to rồi / trước / stk and "chồng" next to vk.

Letters repeated three times or more are squeezed (ơiiii → ơi), a doubled final letter only when the result is a real syllable, and the Telex leftover "dd" becomes "đ" (ddi → đi). Case is kept (KO → KHÔNG, Ko → Không). Emojis can be kept, removed or turned into labels ([cười], [đồng ý]). Add your own abbreviations with dictionary; batch up to 200 texts with texts.

Useful before search, classification, profanity filtering or order extraction. The text gets no new accents: run /v1/vn-diacritics on text typed without accents.

Parameters

NameInTypeRequiredDefault
textquery|bodystringyesThe text (max 20,000 characters). Or texts: array of up to 200.
emojiquery|bodystringnokeepkeep, label ([cười], [đồng ý]…) or remove.
dictionarybodyobjectnoYour own abbreviations {"abbr": "replacement"} (max 500), applied first.
squeezequery|bodybooleannotrueSqueeze repeated letters (ơiiii → ơi).
telexquery|bodybooleannotrueFix the Telex leftover dd → đ at the start of a word.

Example

curl "https://apibox.io.vn/v1/vn-teencode?text=ko%20dc%20j%20%E1%BA%A1%2C%20shop%20%C6%A1iiii%2C%20sp%20n%C3%A0yyy%20bn%20z" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "input": "ko dc j ạ, shop ơiiii, sp nàyyy bn z",
  "text": "không được gì ạ, shop ơi, sản phẩm này bao nhiêu vậy",
  "changes": [
    {
      "from": "ko",
      "to": "không",
      "start": 0,
      "end": 2,
      "rule": "abbreviation"
    },
    {
      "from": "dc",
      "to": "được",
      "start": 3,
      "end": 5,
      "rule": "abbreviation"
    },
    {
      "from": "j",
      "to": "gì",
      "start": 6,
      "end": 7,
      "rule": "abbreviation"
    },
    {
      "from": "ơiiii",
      "to": "ơi",
      "start": 16,
      "end": 21,
      "rule": "repeated letters"
    },
    {
      "from": "sp",
      "to": "sản phẩm",
      "start": 23,
      "end": 25,
      "rule": "abbreviation (context)"
    },
    {
      "from": "nàyyy",
      "to": "này",
      "start": 26,
      "end": 31,
      "rule": "repeated letters"
    },
    {
      "from": "bn",
      "to": "bao nhiêu",
      "start": 32,
      "end": 34,
      "rule": "abbreviation (context)"
    },
    {
      "from": "z",
      "to": "vậy",
      "start": 35,
      "end": 36,
      "rule": "abbreviation"
    }
  ],
  "count": 8,
  "emojis": 0,
  "dictionary_size": 273,
  "note": "Rule-based: ambiguous short forms (k, v, bn, ck, s, h…) are replaced only in clear contexts. Add diacritics with /v1/vn-diacritics if the text has none."
}

Use cases

  • Pre-process comments for sentiment analysis or moderation
  • Normalise chatbot input before intent matching
  • Clean livestream comments before order extraction
  • Improve search on informal product reviews

FAQ

Can it get ambiguous words wrong?

Short forms such as k, v, bn, ck, s or h are only replaced when the neighbouring words make the meaning clear; otherwise they are left unchanged, so the output stays safe.

Can I add my own abbreviations?

Yes: pass "dictionary": {"abbr": "replacement"} (up to 500 entries). They take priority over the built-in list.

Does it add missing accents?

No, it only expands abbreviations and fixes repeated letters. Use /v1/vn-diacritics to restore accents.

Related APIs

Start with 1,000 free requests every month. Get free API key →