Simple rules based Question and answer type classification.
pip install -e git+ssh://[email protected]/OlaSearch/[email protected]#egg=qaclassifier
- Document all Question Types
- Document all Answer Types
- Document how to add new Q/A types
- Publish to pypi
- Pattern (development branch for python3 support)
from qaclassifier import QuestionClassifier
clf = QuestionClassifier()
# Check if a sentence is a question
clf.isQuestion('Hello how are you')
# Check question type
# YN => Yes/No questions
# WH => What/When/How
# TG => This'll work, won't it?
# CH => Would you prefer Coke or iced te1.a?
clf.questionType('Would you prefer Coke or iced tea?')
# Detect answer type to output
clf.classify('How much was the minimum wage in 1991 ?')
=> NUM:money