npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

id-auto-formalizer

v0.1.0

Published

Konversi teks Bahasa Indonesia dari kasual ke formal untuk surat, email, dan laporan resmi

Readme

🇮🇩 Bahasa Indonesia Auto Formalizer

npm version License: MIT PRs Welcome

Konversi teks Bahasa Indonesia dari gaya kasual/informal menjadi formal. Cocok untuk surat resmi, email profesional, dan laporan formal.


✨ Fitur

  • 🔄 200+ mapping kata informal → formal
  • 🖥️ CLI support
  • 🔤 Auto kapitalisasi
  • ✏️ Auto tanda baca
  • 📊 Analisis tingkat formalitas
  • 💡 Saran peningkatan formalitas
  • 🚀 Batch processing file
  • 🎯 Ringan tanpa dependency berat

📦 Instalasi

Sebagai CLI Tool (Global)

npm install -g id-auto-formalizer

Sebagai Library (Dalam Project)

npm install id-auto-formalizer

🚀 Penggunaan

CLI

formalize text "gue mau nanya dong, lo udah selesai belom?"
# → Saya ingin bertanya, Anda sudah selesai belum?

formalize text "makasih ya udh bantuin" --analyze
# → Terima kasih sudah membantu.
# Skor Formalitas: 85% (Formal)

formalize text "gw cape bgt" --suggest

Mode Interaktif

formalize interactive
# atau
formalize i

File & Batch

formalize file input.txt -o output.txt
formalize batch -d ./documents -o ./formal_documents
formalize batch -d ./emails -e .eml -o ./formal_emails

Tambah Mapping Baru

formalize add-mapping "ngoding" "memprogram"
formalize stats

📚 Programmatic API

const { formalize } = require('id-auto-formalizer');

console.log(formalize("gue mau meeting sama lo besok pagi"));
// → Saya ingin meeting dengan Anda besok pagi.

Fitur Lanjutan

const IndonesianFormalizer = require('id-auto-formalizer');
const formalizer = new IndonesianFormalizer();

const result = formalizer.formalize("thanks ya udh bantu gue", {
  autoCapitalize: true,
  autoPunctuation: true
});

const analysis = formalizer.analyzeFormalityLevel("lo tau gak?");
console.log(analysis);
// { score: 25, level: 'Sangat Informal', informalWords: 2, totalWords: 3 }

const suggestions = formalizer.suggestImprovements("gw capek");

Tambah / Ekspor Mapping

formalizer.addMapping("ngoding", "memprogram");

formalizer.addMappings({
  "ngegame": "bermain game",
  "ngetweet": "menulis tweet",
  "kepo": "ingin tahu"
});

const allMappings = formalizer.exportMappings();

📝 Contoh Transformasi

| Informal | Formal | |--------------------------------|------------------------------------| | gue mau nanya dong | Saya ingin bertanya | | thanks ya udh bantuin | Terima kasih sudah membantu | | sorry gue telat, jalanan macet | Maaf saya terlambat, jalanan macet| | btw lo udah makan belom? | Omong-omong, Anda sudah makan? | | meeting nya kapan? gue lupa | Meeting tersebut kapan? Saya lupa. | | tolong kirim filenya asap ya | Mohon kirim file tersebut segera. |


🗺️ Roadmap

✅ Fase 1: Fitur Dasar

  • [x] Mapping 200+ kata
  • [x] CLI interface
  • [x] Auto kapitalisasi & tanda baca
  • [x] Analisis formalitas
  • [x] Batch processing

🚧 Fase 2: NLP Lanjutan

  • [ ] Transformasi kontekstual
  • [ ] Perbaikan struktur kalimat
  • [ ] Deteksi akronim & singkatan

📋 Fase 3: Integrasi & UI

  • [ ] REST API
  • [ ] Web UI
  • [ ] Ekstensi VS Code & Chrome

🌐 Fase 4: Komunitas & Dataset

  • [ ] Dataset publik
  • [ ] Crowdsourcing mapping
  • [ ] Dukungan bahasa daerah

🤝 Kontribusi

Menambah Mapping

  1. Fork repo ini
  2. Edit src/formalizer.js
  3. Tambah ke informalToFormal:
this.informalToFormal = {
  // ...
  'kata_gaul': 'kata_baku',
};
  1. Kirim pull request

Kontribusi lainnya:

  • Laporkan bug
  • Usulkan fitur baru
  • Bantu dokumentasi

🔧 Development

git clone https://github.com/codenamekii/id-auto-formalizer.git
cd id-auto-formalizer

npm install
npm test
npm run lint
npm run dev

📄 API Reference

Class: IndonesianFormalizer

formalize(text, options)

  • text: string
  • options: { autoCapitalize, autoPunctuation }

analyzeFormalityLevel(text)

{ score, level, informalWords, totalWords }

suggestImprovements(text)

→ array of suggestions

addMapping(informal, formal)

addMappings({ informal: formal })

exportMappings()


📊 Dataset Sumber

  • Kamus Besar Bahasa Indonesia (KBBI)
  • Dataset publik Twitter Indonesia
  • Forum & platform chat lokal
  • Kontribusi komunitas

📜 Lisensi

MIT — lihat LICENSE


🔗 Link


Membantu kamu menulis Bahasa Indonesia yang baik dan benar 🇮🇩