YKY has highlighted the modules essential to the Genifer prototype.
SeH has included many more features. Feel free to suggest more!
Showing posts with label use cases. Show all posts
Showing posts with label use cases. Show all posts
Monday, July 12, 2010
Friday, June 25, 2010
Use cases
It's kind of hard to give detailed use cases, so I'll try to explain the main principles.
How can Genifer be taught? A user can ask a query and force an answer. Then Genifer will generate a number of hypotheses in the KB that enable to infer that answer next time. Since some of these hypotheses can be wrong, the user should provide multiple examples to reduce the chance of wrong but accidentally correct hypotheses.
For example:
[ Sorry that this example is not related to programming... it's easier to think of a daily-life example. But I'll try to use programming examples as much as possible. ]
User: "Given: John eats spaghetti with Ben. Conclude: Ben eats spaghetti"
User: "Given: John eats spaghetti with Paul. Conclude: Paul eats spaghetti"
User: "Given: John dances with Mary. Conclude: Mary dances."
User: "Given: John eats spaghetti with meatball. Query: Does meatball eat spaghetti?"
Genifer: "Yes."
User: "That's incorrect."
etc etc ....
After the above session, an example rule that Genifer will have learnt is:
A VerbPhrase with B /\ B is a person -> B VerbPhrase
Notice that this rule may still have exceptions, but it is a useful rule.
Some more examples with the word 'with':
What needs to be taught?
Two areas:
1. semantics of basic / restricted English (with a vocabulary restricted to programming)
2. knowledge about programming
Possible first application areas:
How can Genifer be taught? A user can ask a query and force an answer. Then Genifer will generate a number of hypotheses in the KB that enable to infer that answer next time. Since some of these hypotheses can be wrong, the user should provide multiple examples to reduce the chance of wrong but accidentally correct hypotheses.
For example:
[ Sorry that this example is not related to programming... it's easier to think of a daily-life example. But I'll try to use programming examples as much as possible. ]
User: "Given: John eats spaghetti with Ben. Conclude: Ben eats spaghetti"
User: "Given: John eats spaghetti with Paul. Conclude: Paul eats spaghetti"
User: "Given: John dances with Mary. Conclude: Mary dances."
User: "Given: John eats spaghetti with meatball. Query: Does meatball eat spaghetti?"
Genifer: "Yes."
User: "That's incorrect."
etc etc ....
After the above session, an example rule that Genifer will have learnt is:
A VerbPhrase with B /\ B is a person -> B VerbPhrase
Notice that this rule may still have exceptions, but it is a useful rule.
Thus, inductive learning allows even lay people to teach Genifer. This is very important in our strategy to let online users contribute to the KB.
Some more examples with the word 'with':
- "factorial n" matches with "factorial 6" (pattern matching in Haskell)
- The function is evaluated with n = 6
- We can surround the function name with back-quotes
- [x,y,z] is a list with 3 elements
- Lists can be built with the : operator.
What needs to be taught?
Two areas:
1. semantics of basic / restricted English (with a vocabulary restricted to programming)
2. knowledge about programming
Possible first application areas:
- Find-and-replace, eg: "Find names of variables"
- Style checking (a good candidate because it only requires inference and pattern matching, no acting)
- String manipulation, eg: "Convert to camel case"
Sorry that this is still very vague... I have not figured out everything myself and need more time to think on it...
Subscribe to:
Posts (Atom)