How to test NPC Parser: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>Kymara
explain that there are some other things you can check first for npc conversation problems
imported>Pinch
m Changed words.xml location
 
(6 intermediate revisions by 2 users not shown)
Line 17: Line 17:
You can launch the dialog with the script "runpte.sh" on Unix/MacOS and with "runbte.bat" on windows. This will compile the server and tools part, then launch the Java dialog. It may be even easier or you to run it directly from Eclipse by launching the class games.stendhal.tools.npcparsertestenv.TestEnvDlg .
You can launch the dialog with the script "runpte.sh" on Unix/MacOS and with "runbte.bat" on windows. This will compile the server and tools part, then launch the Java dialog. It may be even easier or you to run it directly from Eclipse by launching the class games.stendhal.tools.npcparsertestenv.TestEnvDlg .


The dialog displays how the conversation parser interprets user input and gives a hint about not yet known words. You can choose one of the predefined example sentences or write your own text into the input field. This way you can design the NPC conversations and test how the parser reacts on user input. You can see how the parser interprets the text, recognizes the words and merges them to longer expressions. Each expression is assigned an expression type like OBJect, SUBject, VERb or ADJective. If the parser discovers any unknown words, the surrounding expression is displayed in red color. You should add these new words to the word list "words.txt", located in the package "games.stendhal.server.entity.npc.parser" .
The dialog displays how the conversation parser interprets user input and gives a hint about not yet known words. You can choose one of the predefined example sentences or write your own text into the input field. This way you can design the NPC conversations and test how the parser reacts on user input. You can see how the parser interprets the text, recognizes the words and merges them to longer expressions. Each expression is assigned an expression type like OBJect, SUBject, VERb or ADJective. If the parser discovers any unknown words, the surrounding expression is displayed in red color. You should add these new words to the word list "words.txt", located in the package "games.stendhal.common.parser" .


In the right window section there are visible the fields Subject, Object, Verb, ... . If the expression type is unique in the sentence, you can immediately see the respective expressions. Otherwise you see the number of expression types.
In the right window section there are visible the fields Subject, Object, Verb, ... . If the expression type is unique in the sentence, you can immediately see the respective expressions. Otherwise you see the number of expression types.