2

I'm Wondering how to extract the username using IBM Watson Api with the conversation service. Example:

  • Watson ask: What is your name?
  • User respond: my name is John

How to get the name value? thank you.

PS: see what i wrote in the comments

Ahmed Commando
  • 723
  • 2
  • 7
  • 23
  • Possible duplicate of [How to give personalised greeting in Watson Conversation?](http://stackoverflow.com/questions/39232950/how-to-give-personalised-greeting-in-watson-conversation) – Simon O'Doherty Nov 17 '16 at 13:20
  • @SimonO'Doherty i hope it was, then i will find a solution. What i found for now is that using another Watson service like Alchemy can be a possible answer. What do you think? – Ahmed Commando Nov 17 '16 at 23:21

1 Answers1

2

Finally, i think i found a possible answer, using this service AlchemyAPI. In this link you will find an entity extractor demo, which can help extracting the name and understand the sentence. I think combining this two services "AlchemyAPI entity extractor tool" with the "conversation tool" can provide a good solution.

Ahmed Commando
  • 723
  • 2
  • 7
  • 23
  • could you please send a link to the JSON file along with the alchemy API. Thanks! – Athif Shaffy Dec 09 '16 at 11:33
  • 1
    @AthifShaffy use this [link](https://alchemy-language-demo.mybluemix.net/) to access the demo, then try typing "my name is john" and analyze. you will find a json type result. – Ahmed Commando Dec 10 '16 at 20:33
  • I am Novice in Bluemix,could you please explain how to combine the two services "AlchemyAPI entity extractor tool" with the "conversation tool".I made a new connection in my conversation app and connected the Alchemi API,but I have no clue how to intregate it with conversation service to detect the username. – Athif Shaffy Dec 11 '16 at 08:27
  • https://drive.google.com/open?id=0B1Tk_bFJHtEIampMQjJLWnJnOGs has the JSON file,It would be great if you could help me with setting the username. – Athif Shaffy Dec 13 '16 at 08:49
  • When you send "my name is john" to alchemy service, it will return as a result [type : person, text : john] and many other things. So what you can do is using this service to analyze your text and get the entities that you need, then send the extracted name in the context to the conversation service. and set it with $username. – Ahmed Commando Dec 13 '16 at 09:05