muhalfian/LFF-POS-Tagging

LFF POS Tagging is a PyTorch implementation of a BiLSTM-CRF sequence labeler that fuses morphological, orthographic, and character-level features—designed to boost tagging accuracy for rare and out-of-vocabulary words in Indonesian corpora.

0

stars

2

commits

Python

primary language

Jun 28, 2025

updated

README

LFF-POS-Tagging

LFF POS Tagging is a PyTorch implementation of a BiLSTM-CRF sequence labeler that fuses morphological, orthographic, and character-level features—designed to boost tagging accuracy for rare and out-of-vocabulary words in Indonesian corpora.

🚀 Overview

LFF POS Tagging is a PyTorch-based implementation of a BiLSTM-CRF model with Linguistic Feature Fusion. It fuses multiple linguistic feature sets—morphological, orthographic, and character-level—to improve tagging accuracy, especially for rare and out-of-vocabulary words.

✨ Features

  • Linguistic Feature Fusion: Dynamically weights and combines morphology, orthography, and character features.
  • BiLSTM-CRF Architecture: State-of-the-art sequence labeling framework.
  • Evaluation Suite: Computes accuracy and macro F1-score on Indonesian POS corpora.
  • Configurable Pipeline: Easy to plug in new feature extractors or datasets.

🛠 Requirements

  • Python 3.8+
  • PyTorch 1.10+
  • NumPy, pandas, scikit-learn
  • (Optional) GPU with CUDA support

💾 Installation

  1. Clone the repository
git clone https://github.com/your-username/LFF-POS-Tagging.git
cd LFF-POS-Tagging
  1. Clone the repository
python -m venv venv
source venv/bin/activate   # Linux/macOS
venv\Scripts\activate 
  1. Install dependencies
pip install -r requirements.txt 

⚙️ Usage

  1. Preprocess your data:
python scripts/preprocess.py --input raw_corpus.txt --output data/
  1. Train the model:
python train.py \
  --train data/train.json \
  --dev data/dev.json \
  --config configs/lff_config.yaml
  1. Evaluate and infer:
python evaluate.py --model checkpoints/best.pt --test data/test.json
python predict.py --model checkpoints/best.pt --input "Saya suka NLP."

📊 Evaluation

After training, evaluation metrics will be logged to logs/ and a summary printed:

  • Accuracy
  • Macro F1-Score

🤝 Contributing

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/YourFeature)
  3. Commit your changes (git commit -m "Add YourFeature")
  4. Push to the branch (git push origin feature/YourFeature)
  5. Open a Pull Request Please follow the existing code style and add tests for new functionality.

📄 License

This project is released under the MIT License. See LICENSE for details.

Contributors

muhalfian

2 commits

muhalfian/LFF-POS-Tagging

LFF POS Tagging is a PyTorch implementation of a BiLSTM-CRF sequence labeler that fuses morphological, orthographic, and character-level features—designed to boost tagging accuracy for rare and out-of-vocabulary words in Indonesian corpora.

0

stars

2

commits

Python

primary language

Jun 28, 2025

updated

README

LFF-POS-Tagging

LFF POS Tagging is a PyTorch implementation of a BiLSTM-CRF sequence labeler that fuses morphological, orthographic, and character-level features—designed to boost tagging accuracy for rare and out-of-vocabulary words in Indonesian corpora.

🚀 Overview

LFF POS Tagging is a PyTorch-based implementation of a BiLSTM-CRF model with Linguistic Feature Fusion. It fuses multiple linguistic feature sets—morphological, orthographic, and character-level—to improve tagging accuracy, especially for rare and out-of-vocabulary words.

✨ Features

  • Linguistic Feature Fusion: Dynamically weights and combines morphology, orthography, and character features.
  • BiLSTM-CRF Architecture: State-of-the-art sequence labeling framework.
  • Evaluation Suite: Computes accuracy and macro F1-score on Indonesian POS corpora.
  • Configurable Pipeline: Easy to plug in new feature extractors or datasets.

🛠 Requirements

  • Python 3.8+
  • PyTorch 1.10+
  • NumPy, pandas, scikit-learn
  • (Optional) GPU with CUDA support

💾 Installation

  1. Clone the repository
git clone https://github.com/your-username/LFF-POS-Tagging.git
cd LFF-POS-Tagging
  1. Clone the repository
python -m venv venv
source venv/bin/activate   # Linux/macOS
venv\Scripts\activate 
  1. Install dependencies
pip install -r requirements.txt 

⚙️ Usage

  1. Preprocess your data:
python scripts/preprocess.py --input raw_corpus.txt --output data/
  1. Train the model:
python train.py \
  --train data/train.json \
  --dev data/dev.json \
  --config configs/lff_config.yaml
  1. Evaluate and infer:
python evaluate.py --model checkpoints/best.pt --test data/test.json
python predict.py --model checkpoints/best.pt --input "Saya suka NLP."

📊 Evaluation

After training, evaluation metrics will be logged to logs/ and a summary printed:

  • Accuracy
  • Macro F1-Score

🤝 Contributing

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/YourFeature)
  3. Commit your changes (git commit -m "Add YourFeature")
  4. Push to the branch (git push origin feature/YourFeature)
  5. Open a Pull Request Please follow the existing code style and add tests for new functionality.

📄 License

This project is released under the MIT License. See LICENSE for details.

Contributors

muhalfian

2 commits

Languages

Python

59.8%

Perl

29.4%

Java

5.9%

C

4.5%