Skip to content

Simple rules based Question and answer type classification.

Notifications You must be signed in to change notification settings

OlaSearch/qaclassifer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Question and Answer type classification

Simple rules based Question and answer type classification.

Usage

pip install -e git+ssh://[email protected]/OlaSearch/[email protected]#egg=qaclassifier

Todo

  1. Document all Question Types
  2. Document all Answer Types
  3. Document how to add new Q/A types
  4. Publish to pypi

Requirements

  1. 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

About

Simple rules based Question and answer type classification.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages