0

Other than context-free grammar, NLG and Markov chain is there another way to generate text?

My problem is that I would like to generate fragment of descriptions for my RPG. I would like to start with some words like the location, the weather and have a simple description text that is not based on the above algorithms.

I would like to avoid templates because of the amount of time taken to generate them.

--- Edit

Here are two examples of the kind of sentence I would like to generate:

  • The bustling village is full of merchants coming from all over the place. People come and go and while the sun shine on them.

  • The road gradually disappears and is replaced by a twisted, muddy path through the trees. Dark clouds ahead marks the coming of a storm.

Davide
  • 11
  • 2
  • 1
    I don't really understand your argument against templates. They seem a lot simpler and less time-consuming that adapting a full AI-based text-generation algorithm. – Stef Dec 09 '21 at 13:29
  • So you specifically want the output text to be text which is not describable by a context-free grammar? Why? – Sneftel Dec 09 '21 at 13:31
  • And if you don’t want the generator to be a Natural Language Generator, does that mean you specifically want language which sounds unnatural? – Sneftel Dec 09 '21 at 13:32
  • @Stef I have to add multiple template for many locations and weathers, that is going to be a really time consuming process and I was searching for something easier to manage in the future but for now is my only choice. – Davide Dec 09 '21 at 14:04
  • @Sneftel I would like something more context driven to have the ability for more complex text, it's difficult to explain unfortunately. About the NLG I would like to use that but I don't have the knowledge and the libraries I tried to use are VERY slow, and I still want to generate something that is very natural, something that is not always achievable with NLG; sometimes the sentences are correct but the content doesn't make much sense, this is why for now I'm going toward template, I was trying to search for something easier to manage. – Davide Dec 09 '21 at 14:11
  • Give examples ! –  Dec 09 '21 at 14:21
  • You seem to ask an XY question. Your problem is not about generating sentences using a formal grammar, it is about meaningful content ! And I fully agree with what Stef said. –  Dec 09 '21 at 14:25
  • @Davide: many locations and many weathers don't necessarily mean many templates. Here is an example with just one template with 5 locations and 4 weathers: `template = "Hello! We are in the {location} and it is {weather}."`; `locations = ["city", "mountain", "forest", "desert", "submarine"]`; `weathers = ["rainy", "sunny", "so hot I'm sweating profusely", "so cold I feel like my teeth are shattering"]`. Of course you could make it progressively more complex, by adding constraints so it doesn't rain in locations that have a roof,and making more than one template, etc. – Stef Dec 09 '21 at 15:04
  • @Stef yes I was thinking about that at first but I think it's those are too simple. I added some examples to the main post. I already have something like that implemented but to have more variety you have to write each new template and because of the amount of locations is going to be a lot of work for me. – Davide Dec 10 '21 at 07:29

0 Answers0