Issue
I am using google machine learning APIs for generating the dynamic questions and answers from plain text.
For example, The plain text contains following information :
Abraham Lincoln was born on February 12, 1809, in Hardin County, Kentucky, to Thomas and Nancy Lincoln in their one roomlog cabin on their farm known as Sinking Spring (near modern-day Hodgenville, Kentucky). Although Thomas lacked formal education, he was an excellent farmer and carpenter, and often times served as a member of the jury. Lincoln grew up on the western frontier in Kentucky and Indiana. Largely self-educated, he became a lawyer in Illinois, a Whig Party leader, and was elected to the Illinois House of Representatives, in which he served for eight years.
Expected output in tuple format: Questions & Answers
("When was Lincoln born?" , "February 12, 1809", "1809", "February 12")
("Where Abraham Lincoln was born?", "Hardin County", "Kentucky", "Hardin County, Kentucky")
("Who is good in farming and carpentering?", "Lincoln", "Abraham Lincoln", "Abraham")
("In which country he grew up?", "western frontier in Kentucky and Indiana")
("How many years he served in Illinois House of Representatives?","eight", "eight years")
("what is IHR?", "Illinois House of Representatives")
("What is full form of IHR?","Illinois House of Representatives")
I tried:
I have generated triples, syntaxList and entities using google ML APIs
.
Could some one please help me to generate above said output?
Solution
You should take a look at Stanford Question Answer dataset. It is exactly for the purpose that you are looking for. It was also given as an assignment in CS224N in 2017. You can find the assignment and the starter code here. The assignment will walk you through on coding it on your own in TensorFlow and is pretty thorough. You might also find the solutions to these assignments on a student's GitHub if you merely want to lift the code and use it.
Answered By - Rudresh Panchal
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.