-
Notifications
You must be signed in to change notification settings - Fork 0
User Guide
christophertfoo edited this page Mar 11, 2013
·
8 revisions
- Java JRE 1.5 or higher. Download [here] (http://www.oracle.com/technetwork/java/javase/downloads/index.html).
- Download the executable jar file containing the latest version.
- That's it!
- To facilitate use from the command prompt, the following changes have been made:
- Logical AND = ',' (comma)
- Logical OR = ';' (semi-colon)
- Logical NEGATION = '-' (minus)
- Additional Constraints:
- Variables start with a lowercase letter. For example, bob would be a variable, but Bob would not.
- Non-variables either start with an uppercase letter (ex. Bob), are enclosed in single or double quotes (ex. 'bob' or "bob"), or are numbers.
- Run the MMO-Sentence-Generator by navigating to the directory of the downloaded jar file and running the following command in a command prompt:
java -jar MMO-Sentence-Generator.jar
- The MMO-Sentence-Generator reads the Neo-Davidsonian semantic representation from the standard input stream (your command prompt) where one line is the semantic representation of one or more sentences. When the user presses [Enter], the program will read the input and attempt to parse it into a sentence.
- The resulting sentence(s) will then be printed to the console.
- Currently, the only way to exit the program is to send a SIGINT signal to the program (CTRL + C). This should be improved upon in future versions.
- If the semantic representations are stored in files, the output of a 'type' (Windows) or 'cat' (Mac / Unix) to the MMO-Sentence-Generator program.
- The program will automatically terminate once the contents of the file have been processed.
- An example using Windows may be seen below where LanguageGeneratorTest contains the semantic representations of multiple sentences.
D:\workspace\MMO-Sentence-Generator>type LanguageGeneratorTest | java -jar MMO-Sentence-Generator.jar
Level 85 Restoration Shaman WTB 2 Thunderfuries, 1 sword, and 10 shields for 100.0 gold and 20.0 silver or 1 bow, PST or find me.
WTS 5 Wool Cloths.
Level 80 Shaman or Level 80 Paladin LFG for Normal 25 man DS.
LF3-4M 2 Shamans and 2 Tanks or 3 Paladins for Mogushan Vaults and Terrace of Endless Spring or Heart of Fear.
D:\workspace\MMO-Sentence-Generator>
To show how the MMO-Sentence-Generator parsed the given representation, you may give the program the -t argument. This will print the structure of the parsed representation as a tree where child nodes are further indented. Mostly for debugging purposes.
D:\workspace\MMO-Sentence-Generator\release>type LanguageGeneratorTest.txt | java -jar MMO-Sentence-Generator-1.0.jar -t
Level 85 Restoration Shaman WTB 2 Thunderfuries, 1 sword, and 10 shields for 100.0 gold and 20.0 silver or 1 bow, PST or find me.
WTS 5 Wool Cloths.
Level 80 Shaman or Level 80 Paladin LFG for Normal 25 man DS.
LF3-4M 2 Shamans and 2 Tanks or 3 Paladins for Mogushan Vaults and Terrace of Endless Spring or Heart of Fear.
{ Type: Buy, ID: a, Parent: null, Value: null, Logic Operation: null, Negated: false }
{ Type: ContactMethod, ID: null, Parent: a, Value: PST, Logic Operation: AND, Negated: false }
{ Type: ContactMethod, ID: null, Parent: a, Value: find me, Logic Operation: OR, Negated: false }
{ Type: Subject, ID: sub, Parent: a, Value: null, Logic Operation: AND, Negated: false }
{ Type: Player, ID: play1, Parent: sub, Value: null, Logic Operation: AND, Negated: false }
{ Type: Class, ID: null, Parent: play1, Value: Shaman, Logic Operation: AND, Negated: false }
{ Type: Specialization, ID: null, Parent: play1, Value: Restoration, Logic Operation: AND, Negated: false }
{ Type: Level, ID: null, Parent: play1, Value: 85, Logic Operation: AND, Negated: false }
{ Type: Object, ID: b, Parent: a, Value: null, Logic Operation: AND, Negated: false }
{ Type: Item, ID: c, Parent: b, Value: null, Logic Operation: AND, Negated: false }
{ Type: Name, ID: null, Parent: c, Value: Thunderfury, Logic Operation: AND, Negated: false }
{ Type: Quantity, ID: null, Parent: c, Value: 2, Logic Operation: AND, Negated: false }
{ Type: Item, ID: d, Parent: b, Value: null, Logic Operation: AND, Negated: false }
{ Type: Type, ID: null, Parent: d, Value: Sword, Logic Operation: AND, Negated: false }
{ Type: Quantity, ID: null, Parent: d, Value: 1, Logic Operation: AND, Negated: false }
{ Type: Item, ID: h, Parent: b, Value: null, Logic Operation: AND, Negated: false }
{ Type: Type, ID: null, Parent: h, Value: Shield, Logic Operation: AND, Negated: false }
{ Type: Quantity, ID: null, Parent: h, Value: 10, Logic Operation: AND, Negated: false }
{ Type: Value, ID: i, Parent: h, Value: null, Logic Operation: AND, Negated: false }
{ Type: MoneyAmount, ID: j, Parent: i, Value: null, Logic Operation: AND, Negated: false }
{ Type: Denomination, ID: null, Parent: j, Value: 100, Logic Operation: AND, Negated: false }
{ Type: Currency, ID: null, Parent: j, Value: Gold, Logic Operation: AND, Negated: false }
{ Type: MoneyAmount, ID: k, Parent: i, Value: null, Logic Operation: AND, Negated: false }
{ Type: Denomination, ID: null, Parent: k, Value: 20, Logic Operation: AND, Negated: false }
{ Type: Currency, ID: null, Parent: k, Value: Silver, Logic Operation: AND, Negated: false }
{ Type: Item, ID: item, Parent: b, Value: null, Logic Operation: OR, Negated: true }
{ Type: Type, ID: null, Parent: item, Value: Bow, Logic Operation: AND, Negated: false }
{ Type: Sell, ID: e, Parent: null, Value: null, Logic Operation: AND, Negated: false }
{ Type: Object, ID: f, Parent: e, Value: null, Logic Operation: AND, Negated: false }
{ Type: Item, ID: g, Parent: f, Value: null, Logic Operation: AND, Negated: false }
{ Type: Name, ID: null, Parent: g, Value: Wool Cloth, Logic Operation: AND, Negated: false }
{ Type: Quantity, ID: null, Parent: g, Value: 5, Logic Operation: AND, Negated: false }
{ Type: FindGroup, ID: fg, Parent: null, Value: null, Logic Operation: AND, Negated: false }
{ Type: Subject, ID: subFg, Parent: fg, Value: null, Logic Operation: AND, Negated: false }
{ Type: Player, ID: fgPlay, Parent: subFg, Value: null, Logic Operation: AND, Negated: false }
{ Type: Class, ID: null, Parent: fgPlay, Value: Shaman, Logic Operation: AND, Negated: false }
{ Type: Level, ID: null, Parent: fgPlay, Value: 80, Logic Operation: AND, Negated: false }
{ Type: Player, ID: fgPlay2, Parent: subFg, Value: null, Logic Operation: OR, Negated: false }
{ Type: Class, ID: null, Parent: fgPlay2, Value: Paladin, Logic Operation: AND, Negated: false }
{ Type: Level, ID: null, Parent: fgPlay2, Value: 80, Logic Operation: AND, Negated: false }
{ Type: Object, ID: fgObj, Parent: fg, Value: null, Logic Operation: AND, Negated: false }
{ Type: Instance, ID: fgInst1, Parent: fgObj, Value: null, Logic Operation: AND, Negated: false }
{ Type: Name, ID: null, Parent: fgInst1, Value: DS, Logic Operation: AND, Negated: false }
{ Type: Mode, ID: null, Parent: fgInst1, Value: 25 man, Logic Operation: AND, Negated: false }
{ Type: Difficulty, ID: null, Parent: fgInst1, Value: Normal, Logic Operation: AND, Negated: false }
{ Type: FindMore, ID: fm, Parent: null, Value: null, Logic Operation: AND, Negated: false }
{ Type: Instance, ID: fmInst1, Parent: fm, Value: null, Logic Operation: AND, Negated: false }
{ Type: Name, ID: null, Parent: fmInst1, Value: Mogushan Vaults, Logic Operation: AND, Negated: false }
{ Type: Object, ID: fmOb1, Parent: fm, Value: null, Logic Operation: AND, Negated: false }
{ Type: Player, ID: fmPlay1, Parent: fmOb1, Value: null, Logic Operation: AND, Negated: false }
{ Type: Class, ID: null, Parent: fmPlay1, Value: Shaman, Logic Operation: AND, Negated: false }
{ Type: Quantity, ID: null, Parent: fmPlay1, Value: 2, Logic Operation: AND, Negated: false }
{ Type: Player, ID: fmPlay3, Parent: fmOb1, Value: null, Logic Operation: AND, Negated: false }
{ Type: Role, ID: null, Parent: fmPlay3, Value: Tank, Logic Operation: AND, Negated: false }
{ Type: Quantity, ID: null, Parent: fmPlay3, Value: 2, Logic Operation: AND, Negated: false }
{ Type: Player, ID: fmPlay2, Parent: fmOb1, Value: null, Logic Operation: OR, Negated: false }
{ Type: Class, ID: null, Parent: fmPlay2, Value: Paladin, Logic Operation: AND, Negated: false }
{ Type: Quantity, ID: null, Parent: fmPlay2, Value: 3, Logic Operation: AND, Negated: false }
{ Type: Instance, ID: fmInst2, Parent: fm, Value: null, Logic Operation: AND, Negated: false }
{ Type: Name, ID: null, Parent: fmInst2, Value: Terrace of Endless Spring, Logic Operation: AND, Negated: false }
{ Type: Instance, ID: fmInst3, Parent: fm, Value: null, Logic Operation: OR, Negated: false }
{ Type: Name, ID: null, Parent: fmInst3, Value: Heart of Fear, Logic Operation: AND, Negated: false }
D:\workspace\MMO-Sentence-Generator\release>
More information about this system and more examples may be seen in this paper.
Please see the [Contact Details] (https://github.com/christophertfoo/MMO-Sentence-Generator/wiki/Contact-Details) for information on how to provide feedback.