Search code examples
pythontensorflowkerasdeep-learningartificial-intelligence

NLP AI logic - dialogue sequences with multiple parameters per sequence architecture


I have a dataset of dialogues with various parameters (like if it is a question, an action, what emotion it conveys etc ). I have 4 different "informations" per sentence. let s say A replys to B A has an additive parameter in a different list for its possible emotions (1.0.0.0) (angry.happy.sad.bored) - an another list for it s possible actions (1.0.0.0) (question.answer.inpulse.ending)

I know how to build a regular RNN model (from the tutorials and papers I have seen here and there), but I can t seem to find a "parameters" architecture. Should I train multiple models ? (like sentence A --> emotions, then sentence B -->actions) then train the main RNN separately and predicting the result through all models ?

or is there a way to build one single model with all the information stored right at the beginning ? I apologize for my approximate English, witch makes my search for answers even more difficult.


Solution

  • From the way I understand your question, you want to find emotions/actions based on a particular sentence. Sentence A has emotions as labels and Sentence B has actions as labels. Each of the labels has 4 different values with a total of 8 values. And you are confused about how to implement labels as input.

    Now, you can give all these labels their separate classes. Like emotions will have labels (1.2.3.4) and actions will have labels (5.6.7.8). Then concat both the datasets and run Classification through RNN.

    If you need to pass emotions/actions as input, then add them to vectorized matrix. Suppose you have Sentence A stating "Today's environment is very good" with happy emotion. Add the emotion with it's matrix row, like this:

    Today | Environment | very | good | health

    1 | 1 | 1 | 1 | 0

    Now add emotion such that:

    Today | Environment | very | good | health | emotion

    1 | 1 | 1 | 1 | 0 | 2(for happy)

    I hope this answers your question.