I'm working on creating a program which holds a basic conversation with the user, but while thinking about how I could make this program process the user's inputs, I ran into a slight problem:
print "(Computer:)then what would you like to talk about?"
print "(Computer:)why do you want to talk about",ci,"?"
Most of the people I had respond to the program's question contained possessive or personal pronouns within their response, but, because the meaning of a pronoun depends upon which person is saying it, the program's response is rendered nonsensical. I have come up with two ways that I personally could correct this:
- I could have the program respond with a demonstrative pronoun (this, these, that, those). Though this would eliminate the issue, it makes the exchange between user and program much duller.
- I could manually have the program check the response for every word or contraction in the English language which contains 'I' or 'you' (or some from thereof)
However, because there just has
to be a better solution to this than making the program boring or spending the rest of my days entering 'if' statements into a script; I would like to ask for help. (I apologize if there's an obvious solution to this problem, I'm still fairly new to coding).