Bruce,
I would like to strip out certain phrases such as prepositional phrases and simplify the users input and then send it back to have chatscript try to parse the sentence again.
Here is a simplified example pattern:
u: ( ~preposition ) refine() ^keep ^repeat
a: ( < _* _~preposition _~determiner _~noun _* > )
^input( ^join( AUTOSPACE ‘_0 ‘_4)) ^fail(SENTENCE)
a: ( < _* _~preposition _~noun _* > )
^input( ^join( AUTOSPACE ‘_0 ‘_3 )) ^fail(SENTENCE)
#1) I have an issue with possessive words that include an apostrophe. In the sample:
The people’s desire for justice was rising.
Chatscript separates people from the ‘s with a space: The people ‘s desire for justice was rising.
That is fine, but when it is captured and resubmitted as input then Chatscript converts the ‘s to the word “is”. I cannot find a substitution or where to resolve this. I would prefer it kept the ‘s the same.
The prepare command shows this in the output indicating it happens in the tokenizing step:
Original User Input: The people ‘s desire for justice was rising
Tokenized into: The people is desire for justice was rising
merged: the people is desire for justice was rising
Actual used input: the people is desire for justice was rising
#2) I had to use the < > in the patterns so that the first and last variables captured all of the text from the beginning of the sentence to the position of the preposition and from the end of the prepositional phrase to the end of the sentence. Otherwise, only a few words before the match were captured in the ‘_0 variable and sent back to ^input for reprocessing. Is this correct?
Thanks.
(PS. The POS tagger is great. Do not give up on it. My wish list includes: exposed tags linking phrases to mainsubject, mainverb, and maindirect and mainindirect, etc.)