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 🙏

© 2026 – Pkg Stats / Ryan Hefner

javanese-analyzer-core

v1.0.2

Published

Javanese Krama syntax analyzer with Unggah-Ungguh (politeness level) validation

Readme

javanese-analyzer-core

npm version License: MIT

Javanese Krama syntax analyzer with Unggah-Ungguh (politeness level) validation

A TypeScript library for analyzing Javanese language sentences, validating syntax structure (S-P-O-K), and checking politeness levels (Unggah-Ungguh) compliance.

🚀 Installation

npm install javanese-analyzer-core

📖 Quick Start

import { analyze } from "javanese-analyzer-core";

const result = analyze("Kula nedha sekul");

console.log(result);
// {
//   tokens: [
//     { token: "kula", label: "SUBJEK", keterangan: "pronomina diri sendiri" },
//     { token: "nedha", label: "PREDIKAT", keterangan: "verba krama lugu" },
//     { token: "sekul", label: "OBJEK_NOUN", keterangan: "nomina" }
//   ],
//   analisis: {
//     jenis_kalimat: "kalimat tunggal",
//     validitas_sintaksis: "VALID",
//     validitas_unggah_ungguh: "SESUAI"
//   },
//   structure: { /* Parse Tree */ },
//   derivations: [ /* Derivation Steps */ ]
// }

✨ Features

✅ Syntax Analysis (S-P-O-K)

  • Tokenization of Javanese Krama/Ngoko words
  • Context-Free Grammar (CFG) based parsing
  • Support for simple and compound sentences
  • Implicit subject detection

✅ Unggah-Ungguh Validation

  • Politeness level validation
  • Detection of Krama Inggil/Lugu usage errors
  • Automatic correction suggestions

✅ Visualizations

  • Parse Tree: Hierarchical syntax structure
  • Derivation Trace: Step-by-step leftmost derivation
  • Token Analysis: Word-by-word breakdown with annotations

✅ Fuzzy Matching

  • Automatic typo correction using Levenshtein Distance
  • Adaptive threshold based on word length

📚 API Reference

analyze(sentence: string): AnalysisResult

Analyzes a Javanese sentence and returns comprehensive results.

Parameters:

  • sentence (string): Javanese sentence to analyze

Returns: AnalysisResult object containing:

  • tokens: Array of tokenized words with labels
  • analisis: Syntax and Unggah-Ungguh validation results
  • structure: Parse tree structure
  • derivations: Leftmost derivation steps

Type Definitions

interface AnalysisResult {
  tokens: Token[];
  analisis: {
    jenis_kalimat: string;
    validitas_sintaksis: "VALID" | "TIDAK VALID";
    validitas_unggah_ungguh: "SESUAI" | "TIDAK SESUAI";
    jenis_kesalahan?: string[];
    kalimat_terkoreksi?: string;
    penjelasan?: string;
  };
  structure: ParseNode;
  derivations: string[];
}

interface Token {
  token: string;
  label: string;
  keterangan: string;
}

🌐 Full Application

For a complete web application with interactive UI, check out:

npx create-javanese-analyzer my-app
cd my-app
npm run dev

Or visit the live demo: https://javanese-ai.vercel.app

📦 Dictionary

The package includes a comprehensive dictionary of 1000+ Javanese words with:

  • Word classifications (nouns, verbs, pronouns, etc.)
  • Politeness levels (Krama Inggil, Krama Lugu, Ngoko)
  • Subject classifications (SELF, HONORED, NEUTRAL)

🤝 Contributing

Contributions are welcome! Please visit the main repository for contribution guidelines.

📄 License

MIT © Surya

🔗 Links


Made with ❤️ for preserving Javanese language and culture