1
$\begingroup$

I wonder how can I build a neural network which will generate text description from given tag/tags. Let's assume I have created such data structure:

{
 'tag1': ['some description1', 'some description2', 'some description3'],
 'tag2': ['some description4', 'some description5', 'some description6'],
 'tag3': ['some description7', 'some description8', 'some description9']
}

Then I would like to create a neural network which will generate randomly generated description based on given tags. For example:

INPUT: ['TAG1', 'TAG2', 'TAG3'] => OUTPUT: 'some description1. some description5 some description9'

Then I thought that it can be a good idea to implement a LSTM and doing text generation, but here I have a problem I know how I can do it for one tag. I can create one corpus of text contains different sentences for tag, then do the training and generate a sentence for given tag, but what If I have multiple tags should I create a corpus for each tag or maybe there is a better way to do that? If you know any articles which covers this problem, I would appreciate if you share them with me. If you have a neural network proposition which will solve this problem, I am also open for proposals.

PS. I know, I can solve this problem with easy Map, for example: ['tag1', 'tag2', 'tag3'].map(tag => tagSentenceMap.get(tag).randomChoice()).join('. ') but this is not the case for me.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.