|
I'm trying to implement a web application that will let users define rules and ask questions to see if statements are legal or illegal according to a set of rules. The domains I have in mind would be rules for small communities or clubs. For example, say a possible rule set contains the rules:
And then someone asks The system would attempt to answer by first following a question and answer tree resembling:
The user selects an answer at each node, and the system would ask the next question according to an answer until a leaf node is reached, representing a "final" answer. At each node, the user may ask the system to explain or define terms used in the question. Explanations would be a series of statements containing terms, which themselves could be further explained or defined. After enough experience is gained, the system could automatically skip certain nodes, such as the first "Is a Honda a car?" when it learns that in the context of "parking" a "Honda" will always imply a "car". Although not shown in this tree, some trees may have "Undefined" leaf nodes, representing cases where the rules didn't provide enough coverage to fully create the tree, requiring the question to be redirected to a human expert for clarification or correction of the rules. The goal would be to define the rules in a database, and then dynamically generate these Q&A trees as needed. Although the rules and questions shown here are represented as natural language, the initial system would use symbolic logic instead, as doing NLP in addition to this logical parsing would immensely complicate the initial system. The rules may be initially drafted as natural language, but they'd be manually converted to discrete rules by hand before being entered into the system. The questions would be displayed as simple natural language statements, and the answers would be multiple choice. Does this seem like a practical project? Is there any prior art? I haven't read about anything like this so far, but I'm not sure what search keywords adequately describe this system. What tools should I use? I'm not sure if I should use decision trees or some sort of expert system for matching questions to rules and narrowing down the scope of the question. |
For starters, I would use a more flexible representation than "decision trees", for example Prolog or "business rules engine". (Note that you would use Prolog as an engine, dynamically generating facts and perhaps rules too.) Or a simple homegrown, but probabilistic feature-vectors based system (but then, handling "unknown" and "don't care" positions). Or a relational statistical system like Alchemy (or Factorie for Scala, Infer.NET for C#, etc.)