Smarter Parser

version 15/120116 by Aaron Reed

  • Home page
  • Complete text



  • Version 15/120116 of Smarter Parser by Aaron Reed begins here.

    "Understands a broader range of input than the standard parser, and can direct new players towards proper syntax."


    [
    CHANGES:
    -- Version 15: changes suggested post-IF Comp 11. Point players to the NOVICE OFF command the first time something is printed. Add an option/notification to turn auto-reparsing off with CORRECT OFF. Added support for a cross-story config file to remember these two settings. Removed "scandalous standardize swears" and "signs of frustration"; retooled "stripping interjections" to be simpler and less likely to conflict with existing code; simplified adverbs to only look for a commonly-used set; fixed bug in "noun alone examines" interpretation to do with typing "examine" without a noun; simplified some scope checks to improve speed; tweaked applicable examples for easier customization; made suggestion for ABOUT command customizable; removed clothing and body parts to a standalone extension, "Commonly Unimplemented"; rewrote punctuation replacement and "starts with" to do direct I6 string manipulation, for speed gain; rewrote displaying results to isolate text for easier replacement; rewrote documentation for clarity; rewrote error message selected to allow for table continuations rather than amendments (which don't work on rules); removed starting command with i as redundant with making assertions rule; rewrote unnecessary possessive's rule to only match if the "'s" word is not in the dictionary, which should cut down on false positives.
    -- Version 14: Added more enthusiastic blank line replacement code that allows for any command to run with time passing as normal. Tweaks to make the unnecessary movement rule more clear and specific; added code so item examples can choose the player's noun even without parsing; removed most references to "compass directions" in deference to down, out etc; clarified text of generic surroundings rule.
    -- Version 13: Added a new final rule to restore the command to its original state, to prevent later rules from looking at modified command text; fixed bug in Stripping Niceties; adjusted stripping interjections.
    -- Version 12: Updated for compatibility with Player Experience Upgrade.
    -- Version 11: Significant update based on statistical analysis of several hundred newbie transcripts. Now supports converting a blank line to look, and understanding a noun alone as examining. Also added sections for "Where can I go?", "Failed communication attempts", "Unnecessary possessives", "Gerunds". Added and refined patterns and message text throughout.
    -- Version 10: Added beta support for two meta-smart parsing activities: converting a blank line to LOOK, and parsing commas more helpfully. (Note: the latter removed in version 11, this proved a lot more problematic than first thought.)
    -- Version 9: Updated for build 6F95
    -- Version 8: Some minor tweaks to vocabulary
    -- Version 7: Added some new punctuation marks to be stripped.
    -- Version 6: Major revision. Altered visual style to be more refined and more flexible; named rulebook outcomes; renamed and clarified several variables; rewrote documentation; added a few new cases from newbie Sand-dancer transcripts; stopped trying to strip single quotes from input (this was a bug that led to problems with recognizing possessives like "grandma's"; Poor Man's Mistype would catch attempts to say "grandmas" anyway.) Marked as glulx only due to issues with z-machine compilation. Cleaned up some formatting issues, including an occasional erroneous first space.
    -- Version 5: Removed deprecated features; added option to ignore all rules; adjusted responses to not have fantasy RPG elements & use more examples taken from the player's current environment.
    -- Version 4: Updated for build 6E59
    -- Version 3: added ? for help, more punctuation removal; corrected a typo; minor bug fixes.
    -- Version 2: bug fixes.
    ]


    [
    Some Notes:

    It might be tempting to just strip all unrecognized words from the player's command and try reparsing, but that has much more of a risk of completely misinterpreting the player's command. Here, at least, we usually know the content of what we're stripping and can react accordingly. Some good examples of the failings of this technique here: http://groups.google.com/group/rec.arts.int-fiction/browse_frm/thread/5c4eca496b34abc6
    ]