3
$\begingroup$

I would like to build a neural network to predict a fantasy character name given a description.

Like 'Scar-faced long haired elf warrior' -> 'Glorfindel'

I have a dataset of about 12,000 fantasy names and description from various fantasy works. I want to be able to map the description to names. Names are not vocabulary words and I want to NN to be able to generate new names for new description.

I wanted to use something like Elmo to embed the description and the name which would then easily teach the NN to map one to another, but the problem I faced is how do I go back from an embedding vector to characters representing a word.

$\endgroup$
2
  • $\begingroup$ I learned a good analogy would be an image captioning model, where on the output instead of words you would be predicting characters. towardsdatascience.com/… $\endgroup$
    – freediver
    Jan 16, 2019 at 19:24
  • 1
    $\begingroup$ Would you be able to share your dataset of fantasy names and descriptions? $\endgroup$
    – Tobia
    Mar 5, 2020 at 21:13

2 Answers 2

1
$\begingroup$

First off, I think that since the goal of your model will be to generate new names based on a description, your model should work at a character-level and not word-level.

You can think of the level at which your model is working as the building blocks you are providing for it (it needs to learn them during training). These building blocks are than used for generation of new constructs. So if you want to construct new words (names) than you need to teach the model to understand the connection between the individual characters and the input description. Your model can deal with the input at a word-level but its output needs to be at character-level.

You can read more about it at: Besides Word Embedding, why you need to know Character Embedding?

$\endgroup$
1
  • $\begingroup$ Thanks @Mark.F Do you have an example of an architecture that is taking words/vectors as input and generating characters on the output? $\endgroup$
    – freediver
    Jan 16, 2019 at 18:49
0
$\begingroup$

Use char-rnn. I used it to make a Twitter bot, @peopledex, that generated Pokemon descriptions based on names, but you could easily reverse the fields.

Examples - the bit before the colon is the name (input), after is the description (output).

  • Dribbur: Thought for evolution, it seeks the coming of sprays. The area basisones from behind.
  • Convictur: It rests when it evolves into a hundred special magnetism. As a result, the magma courses through its body glows.
  • Litigant: It slicks virious trees and was reanimated from a fossil. It can compresse minute silk that was reanimated from the light

The descriptions don't make much sense, but with names that would be less of a problem. The nice thing is that working with fictional generation there's no wrong answers.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.