Questions tagged [text-generation]

There are many text generators for website text, e.g. Lorem Ipsum.

There can be text generators for name and other data required for programming, there can be OMR Sheet Generators which generate the sheet with variable data such as roll number, exam id and mcq questions with pre-filled data.

You can learn more by reading this.

79 questions
7
votes
1 answer

Minimal working example or tutorial showing how to use Pytorch's nn.TransformerDecoder for batch text generation in training and inference modes?

I want to solve a sequence-to-sequence text generation task (e.g. question answering, language translation, etc.). For the purposes of this question, you may assume that I already have the input part already handled. (I already have a tensor of…
4
votes
1 answer

NLP - Paraphrase extraction in Python

I am trying to develop a NLP model, which takes something like you have high levels of cholesterol(this will be a tag) as input and has to output something like you have high levels of cholesterol, you need to have a low-salt diet that emphasizes…
4
votes
1 answer

Can someone please explain what this sample function is upto?

So there is a function in Dino_Name_Generator at Deeplearning.ai notebook def sample(parameters, char_to_ix, seed): # Retrieve parameters and relevant shapes from "parameters" dictionary Waa, Wax, Wya, by, b = parameters['Waa'],…
thanatoz
  • 2,365
  • 4
  • 15
  • 39
4
votes
1 answer

From regression neural network to generative one

I made a neural network with word embedding, RNN and some dense layers to predict the score of computer game reviews based on the title of the game. I used Keras in Python. I was wondering if it would be somehow possible to transform my model into a…
Viktor
  • 850
  • 1
  • 6
  • 17
3
votes
1 answer

Pytorch: understanding the purpose of each argument in the forward function of nn.TransformerDecoder

According to https://pytorch.org/docs/stable/generated/torch.nn.TransformerDecoder.html, the forward function of nn.TransformerDecoder contemplates the following arguments: tgt – the sequence to the decoder (required). memory – the sequence from…
3
votes
2 answers

How to generate a sentence with exactly N words?

Thanks to GPT2 pretrained model now it is possible to generate meaningful sequence of words with or without prefix. However a sentence should end with a proper endings (.,!,?). I am just wondering how to generate a sentence (with proper ending) of…
user185597
  • 31
  • 2
3
votes
1 answer

Choosing the size of Character Embedding for Language Generation models

I am working on a character-based Language Generator, loosely based on this tutorial on the TensorFlow 2.0 website. Following the example, I am using an Embedding() layer to generate character embeddings: I want my model to generate text character…
Leevo
  • 6,005
  • 3
  • 14
  • 51
3
votes
0 answers

Back-Translation model for German and English

Do you know of any pre-trained models for back translation between German and English? I am aware that there are ways to include a monolingual corpus into the training of a machine translation model (often referred to as back translation). I am…
3
votes
2 answers

What NN architecture to predict fantasy character names based on description?

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 …
freediver
  • 141
  • 2
3
votes
1 answer

Choosing a right algorithm for template-based text generation

I am doing a text generation project -- the task is to basically represent the statistical data in a readable way. The way I decided to go about this is template-based: each data type has a template for how sentence should be formed and what…
3
votes
0 answers

Help with the following error: Variable already exists, disallowed. Did you mean to set reuse=True in VarScope?

I am not sure how to handle this error. This is from an RNN tutorial found here. I vaguely understand that the variables need to be able to be reused, but I don't know how to implement this fix. Train.py ran for several hours and finished…
2
votes
2 answers

Generation of medical institution names: training corpora?

My question is quite similar to this one: Generation of institution names. I need to be able to produce 'fake' names of medical institutions, specifically to create data for unit tests. Unfortunately, simple tools like Faker do not work well for…
2
votes
1 answer

Generate text using user-supplied keywords

I've got a use case where I need to generate sentences based on a set of user supplied keywords. Here is an example of what I need: User input: End-User: Data Scientists Region: Middle East Country: UAE Solution: BigPanda Application: machine…
Sameer Zahid
  • 141
  • 1
  • 1
  • 2
2
votes
1 answer

Create an RNN on text sources with different lengths

I want to create an RNN to generate a new text based on many examples of existing texts of a certain format in the training data. The type of texts in the training data consists of 3 segments, like so: Example text 1: [Segment 0, ~20…
2
votes
1 answer

Automatic data summarization with text

I would like to automate periodic report writing based on data. Given one/some data tables, the machine should output texts like Stock A rose by 10% this year and hit 5 year high on 2019-12-01, or we made a large profit in sector B. I can find the…
jf328
  • 121
  • 2
1
2 3 4 5 6