Introduction

Welcome to the Javanese AI documentation. Our engine provides advanced syntax analysis (S-P-O-K) and Unggah-Ungguh (politeness) validation for the Javanese language, serving as a bridge between traditional linguistics and modern NLP.

💡

Pro Tip

This analyzer is optimized for Krama Inggil formal scripts but handles Ngoko with basic validation.

Installation

Choose the installation method that best fits your needs. You can install the core library, scaffold a complete application, or clone the full repository.

Option 1: Install Package (Library Usage)

Install the core analyzer as a dependency in your project.

$npminstalljavanese-analyzer-core

Option 2: CLI Tool (Recommended - Full App)

Scaffold a complete Next.js application with the analyzer pre-configured.

$npxcreate-javanese-analyzermy-app
$cdmy-app
$npmrun dev

Option 3: Template Repository

Use the template without git history.

$npxdegitLearnWithSuryaa/analyzer-app my-app
$cdmy-app
$npminstall
$npmrun dev

Option 4: Clone Repository (Development)

Clone with full git history for development and contributions.

$git clonehttps://github.com/LearnWithSuryaa/analyzer-app.git
$cdanalyzer-app
$npminstall
$npmrun dev

Quick Start

To analyze your first sentence, you can use our CLI tool or the web interface. Here is how to analyze a simple sentence structure.

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

const result = analyze('Kula nedha sekul');
console.log(result);

Syntax Analysis

Our engine uses a bespoke Context-Free Grammar (CFG) to parse sentences into their constituent parts. The analysis returns a hierarchical tree structure identifying the function of each word.

Subject (Jejer)

The actor or topic performing the action in the clause.

Predicate (Wasesa)

The core action or state being performed by the subject.

Object (Lesan)

The entity acted upon by the verb.

Description (Katrangan)

Additional context like time, place, or manner.

Unggah-Ungguh

Politeness is paramount in Javanese. The engine checks for subject-verb agreement not just in number, but in social status.

Common Violation Example

Using Krama Inggil verbs for oneself.

Kula sare (I sleep)
✅ Kula tilem (I sleep)

Fuzzy Matching

The engine employs a Levenshtein distance algorithm to correct typos up to a specific threshold, ensuring robust analysis even with imperfect input.

InputDetectedDistanceConfidence
kulokula1High
mnganmangan1Medium

Analyze Endpoint

The primary endpoint for analyzing text.

POST/v1/analyze

Parameters

text
string. The Javanese sentence to analyze.
mode
enum('fast', 'detailed'). extraction level.

Response Objects

Success response structure.

{
  "status": "success",
  "data": {
    "sentence": "Kula nedha sekul",
    "structure": {
      "S": "Kula",
      "P": "nedha",
      "O": "sekul"
    },
    "valid": true,
    "confidence": 0.98
  }
}

Error Codes

CodeDescriptionStatus
400Bad Request (Invalid Input)User Error
422Validation Error (Unggah-Ungguh)Logic Error
500Internal Server ErrorServer Error