Please note: You are viewing the unstyled version of this web site. Either your browser does not support CSS (cascading style sheets) or it has been disabled.

Department of Computing

Computing >> CLT >> COMP348 home >> Practicals >> Practical Week 12
 
 

COMP348 Document Processing and the Semantic Web

Practical, Week 12

Question Classification

The following file contains the rules used in the question classifier of an early version of AnswerFinder, a question answering system that we are developing at Macquarie University.

Do the following tasks:

  1. Examine the rules used in the classifier. Make sure that you understand the patterns.
  2. Write a python function classify(question) that returns the expected answer type of the question by using the above rules. The program could follow the following steps:
    1. Try each pattern of regexps starting from the first until there is a match.
    2. If there is a match:
      1. Record the question type (the second item of each element of regexps)
      2. If the question type is a key of the dictionary answ_types, return the value associated with the key
      3. Else return a list with the question type
    3. Else return a list with the element unknown.
  3. Come up with at least 8 questions that would trigger a different pattern of the list regexps. For each question, check if the classification returned is correct. For example, include a test function in your program that compares the classifications given by your classifier with your sample solution.
  4. Come up with at least 5 questions that would be wrongly classified by the system. For each question, can you come up with a way to extend the classifier to handle them?

 


Comments to: Mark Dras or Diego Molla

Computing | Division ICS | Macquarie University

Last Modified:
Copyright Macquarie University
CRICOS provider no. 00002J