308
edits
| Line 107: | Line 107: | ||
=step 9: replace arguments with nountype suggestions= | =step 9: replace arguments with nountype suggestions= | ||
Each nountype suggestion in nounCache includes a suggestion for what the argument input may be. For example, "dan" could refer to the contact "Dan Benjamin" or the text "dan". Each combination of different suggestions for different arguments is constructed for each parse. Only nountypes in the nounCache which match the target nountype for that argument (based on that verb) are used. | |||
For example, a certain parse has an <code>object</code> argument ("truck") and a <code>goal</code> argument ("tok"). "truck" has just one suggestion in the nounCache ("truck" as arbitrary text) but "tok" has two: "tok" as arbitrary text and "Tokyo" as a physical location. We then yield 2 ( = 1 * 2) parses with complete arguments for that base parse: | |||
object: truck, goal: tok | |||
object: truck, goal: Tokyo | |||
If the verb in this parse, however, only accepts one nountype in the <code>goal</code>—arbitrary text or location—only one of those parses will be allowed. | |||
If a certain argument has no nountype suggestions at all, or none of the nountype suggestions match the nountype required by the verb, that base parse will not yield any completed parses. | |||
=step 10: ranking= | =step 10: ranking= | ||
edits