How to test NPC Parser: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>MartinFuchs No edit summary |
imported>MartinFuchs describe matching types |
||
| Line 19: | Line 19: | ||
Currently the most important output for developers may be the "trigger" field in the right bottom of the upper "Sentence" section of the window. Looking at this you can see which trigger expression is evaluated from user input, word list and grammar rules. This is used for matching in the finite state machine. |
Currently the most important output for developers may be the "trigger" field in the right bottom of the upper "Sentence" section of the window. Looking at this you can see which trigger expression is evaluated from user input, word list and grammar rules. This is used for matching in the finite state machine. |
||
---- |
|||
| ⚫ | |||
| ⚫ | In the "Matching" section located at the bottom of the window you can select an expression type and enter a matching expression. After activating the button "test match" you see if the user input in the upper section matches the expression in the lower section or not. Matching depends on the selected matching type. |
||
It says that buy 3,000 cookie matches buy 3 cookies |
It says that buy 3,000 cookie matches buy 3 cookies |
||
yes this matches when using the standard |
yes this matches when using the standard mathcing method the expressions match, the number is just an attribute. |
||
if you use exact |
if you use exact matching, it does not match: |
||
* Standard matching compares the normalized expressions (not looking at concrete item numbers for example). |
|||
| ⚫ | |||
* Joker matching allows to use "*" wildcards as placeholder for arbitrary expressions. |
|||
* Exact matching only matches sentences if all of the expressions in the sentence exactly match them in the match string. |
|||
* Case insensitive matching behaves like exact matching, but does not look on upper/lower case. |
|||
* Similarity matching allows the user some spelling errors. It matches if there are not too many character differences in each of the constituting words of the user input string. |
|||
* Type expression matching only compares expression types. (TODO: find a good example) |
|||
If you use any of this extended matching types in your code, it may be helpful to use the matching string, e.g. "|JOKER|buy * bananas" in the display field. |
|||
---- |
|||
| ⚫ | |||
[[Category:Stendhal]] |
[[Category:Stendhal]] |
||