Text Parser Prototype
A downloadable tool for Windows
This is a parser made for future possible adventure games or MUDs.
It uses a free dictionary with word forms and parts of speech. With the code you can recognize which word tense is used or change it.
A word matcher is connected to the dictionary, you can supply a pattern and it determines whether a sentence fits it. The word matching is like using very primitive regular expressions.
It would be easy to implement recognizing custom commands, items, keywords etc. instead of matching parts of speech.
We have a character for every part of speech(case matters):
V - verb
N - noun
A - adjective
a - adverb
P - pronoun
p - preposition
D - determiner
C - conjunction
O - other recognized For example the sentence 'Fly you fools' would be written as 'VPN' 'The', 'a', 'an' are ignored for now. You can use | between characters to make alternatives: 'A|N|V' means Adjective or Noun or Verb After normal character:
* - 0 or more of this Part of speech
+ - 1 or more of this Part of speech
? - 0 or 1 of this Part of speech Example:
Verb, Zero or more Adj or Det, Noun, Zero or one Adverb matches with: 'Kill the ugly green goblin relentlessly.' 'Attack dragon' 'Hide the body fast'