Text Classification
Keras
Javanese

Unggah-Ungguh-Javanese-LSTM-Classifier

Unggah-Ungguh-Javanese-LSTM-Classifier is a CNN-BiLSTM model for Javanese honorific level classification. This model is part of the Unggah-Ungguh project and serves as a strong non-transformer baseline for the task introduced in the paper "Do Language Models Understand Honorific Systems in Javanese?".

Model description

  • Model type: Convolutional + Bidirectional LSTM classifier
  • Language: Javanese
  • License: CC-BY-NC 4.0
  • Framework: Keras (TensorFlow backend)
  • Training: Trained on a curated dataset of Javanese sentences annotated with honorific labels

Model Sources

Using the model

from Baseline_LSTM import Config, build_model
import tensorflow as tf
import json
from tensorflow.keras.preprocessing.sequence import pad_sequences

# Load tokenizer
with open("tokenizer.json", "r") as f:
    tokenizer_data = json.load(f)

# Build reverse word-index if needed
word_index = tokenizer_data.get("word_index", tokenizer_data)
config = Config()

# Tokenize example sentence
text = "Mbak Srini mangan pecel ajange pincuk"
tokens = [word_index.get(word, word_index.get("<unk>", 1)) for word in text.split()]
tokens_padded = pad_sequences([tokens], maxlen=config.MAX_LEN, padding='post')

# Load model
model = build_model(config)
model.load_weights("baseline_lstm_model.h5")

# Predict
prediction = model.predict(tokens_padded)
label = prediction.argmax(axis=1)[0]
print("Predicted class:", label)

License and Use

Unggah-Ungguh is licensed under the CC-BY-NC 4.0

Citation

@inproceedings{farhansyah-etal-2025-language,
    title = "Do Language Models Understand Honorific Systems in {J}avanese?",
    author = "Farhansyah, Mohammad Rifqi  and
      Darmawan, Iwan  and
      Kusumawardhana, Adryan  and
      Winata, Genta Indra  and
      Aji, Alham Fikri  and
      Wijaya, Derry Tanti",
    editor = "Che, Wanxiang  and
      Nabende, Joyce  and
      Shutova, Ekaterina  and
      Pilehvar, Mohammad Taher",
    booktitle = "Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
    month = jul,
    year = "2025",
    address = "Vienna, Austria",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2025.acl-long.1296/",
    doi = "10.18653/v1/2025.acl-long.1296",
    pages = "26732--26754",
    ISBN = "979-8-89176-251-0",
    abstract = "The Javanese language features a complex system of honorifics that vary according to the social status of the speaker, listener, and referent. Despite its cultural and linguistic significance, there has been limited progress in developing a comprehensive corpus to capture these variations for natural language processing (NLP) tasks. In this paper, we present Unggah-Ungguh, a carefully curated dataset designed to encapsulate the nuances of Unggah-Ungguh Basa, the Javanese speech etiquette framework that dictates the choice of words and phrases based on social hierarchy and context. Using Unggah-Ungguh, we assess the ability of language models (LMs) to process various levels of Javanese honorifics through classification and machine translation tasks. To further evaluate cross-lingual LMs, we conduct machine translation experiments between Javanese (at specific honorific levels) and Indonesian. Additionally, we explore whether LMs can generate contextually appropriate Javanese honorifics in conversation tasks, where the honorific usage should align with the social role and contextual cues. Our findings indicate that current LMs struggle with most honorific levels, exhibiting a bias toward certain honorific tiers."
}
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train JavaneseHonorifics/Unggah-Ungguh-Javanese-LSTM-Classifier

Paper for JavaneseHonorifics/Unggah-Ungguh-Javanese-LSTM-Classifier