java - Determining the state of a process -


i creating chatbot-like application , need know when application has reached state.

currently using strings find out topic of conversation is.

such as

string usersaid = text.tostring(); if (usersaid.contains("topic-relevant word") {     execstaterelevantmethod(); } 

however i'd know if there's more reliable way this. such as:

if (usersaid.contains("what time it") {     state.set(timequery); } if (state == timequery) {     execstaterelevantmethod(); } 

i have made state commands show i'm meaning ask.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -