 |
Story 2: I am 27
Story: I am 27 Question: How old am I? Answer: 27
Transformation 1
| I am {#}. -> speaker.age = $1 |
|
We introduce a special notation for referring to numbers: {#}
We also introduce the use of a period in the input specification to imply that it represents a whole statement. This prevents it from being used to parse the following: "I am one step away from grounding you for the whole week!".
Transformation 2
| How old am I -> speaker.age |
|
For the time being we are using a very simplistic parsing strategy for a statement like this. But this highlights how we can progress in a very iterative manner, starting with simplistic transformations and revisiting them later as needed.
Alternative transformations
The following represents another, more generic, possibility:
|
|
 |