There is a system which contain conversation text which is between two or more people, I just need to extract question’s answer from it, if it is discussed in conversation, through python nlp process. let say conversation text is as follows:
A: What are you going to eat with your sandwich?
B: I think I'm going to eat a piece of fruit.
A: What kind do you like?
B: I really like apples and grapes.
A: What kind of apples do you like to eat?
B: I love green apples.
A: I don't like green apples.
B: Really? Why not?
A: Green apples are too sour for me.
B: So, you like red apples better?
A: Yes, I love red apples.
B: I think green apples are a lot better.
And I asked question from that:
Which fruits discussed?
So it reply as
apple and grapes
or in other scenario it will show all conversation in which fruit is discussed.
I have checked many libraries but not able to figure out which library is appropriate or give desired result? I have to know, what step should be followed to achieve this functionality in python.
I have checked spaCy, and I found that it has vector and closest word functionality, but not able to figure out, how I can accomplish it based on the question. or any other library or packages which will help me on that.