A rule-based question classification system for Node.js that categorizes questions by type and answer format.
qTypes is a Node.js library for classifying questions by type and expected answer format using a rule-based system. It helps developers analyze natural language questions to determine categories like location, person, or number, and identify question structures such as WH or yes/no questions. The library is inspired by academic research and benchmarks against the TREC dataset.
Developers building question-answering systems, chatbots, or NLP applications that require automatic question categorization without heavy machine learning dependencies.
qTypes offers a lightweight, transparent, and easy-to-extend rule-based alternative to complex ML models, with proven accuracy on standard datasets and a simple API for quick integration.
Rule based Answer Type classification system in Node.js
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
As a Node.js library with minimal dependencies, qTypes is easy to install and integrate, avoiding the complexity of machine learning frameworks.
Uses predefined patterns for classification, making it interpretable, debuggable, and extensible without relying on black-box models.
Achieves ~80% accuracy on coarse categories and ~75% on fine-grained ones using the standard TREC dataset, providing reliable performance metrics.
Offers simple methods like classify() and questionType(), as shown in the README, enabling quick implementation with minimal code.
With ~80% accuracy on coarse types, qTypes may misclassify questions in demanding applications, and rule-based systems can struggle with ambiguous or novel queries.
Designed for English based on the TREC dataset, with no mention of multilingual capabilities, restricting its use in global applications.
The README is brief and unclear, with examples like assert('file', callback) poorly explained, which could hinder adoption and troubleshooting.