10

Another way to put this is, what tools exist to generate sentences in the same way that some conlanging tools generate phonotactically valid words.

I've heard people suggest using word generators to generate sentences. I'm open to the idea, but it seems that morphology and syntax aren't close enough and I'm not smart enough to put my finger on why. If there is a word generator that can do sentences, I'd be interested in looking at it.

Here is an example I laboriously wrote for Toki Pona.

Note: I'm well aware there are a bunch of tools for just generating a random sampling of a dictionary, but that doesn't create syntactically valid sentences.

5
  • But lorem ipsum doesn’t include syntactically valid sentences?
    – Jan
    Mar 9, 2018 at 1:48
  • @jan I mean "machine generated syntactically correct random sentences", not unlike Lorem Ipsum, which happens to be real Latin, use to see if a printer's layout works, but in this case, to see if a hypothetical syntax works. Mar 9, 2018 at 19:22
  • Rosenfelder was working on one, IIRC
    – Duncan
    Mar 11, 2018 at 9:44
  • Do you happen to have a formal grammar for the language? Mar 18, 2018 at 15:18
  • @JohnDvorak I did one for toki pona with agfl - suburbandestiny.com/?p=805 and while looking for that, it turns out there is a node lib for generating texts from agfl grammars npmjs.com/package/agfl-generate Mar 19, 2018 at 15:15

3 Answers 3

2

It is difficult for a machine to passively understand a language (it takes tons of time with machine learning, and that's for Google). Actively, that's even more difficult, as many machine responses are pre-programmed and rarely actually generated (and in that case, mostly nonsensical, but the question isn't for sensical utterances). It will be extremely difficult and without appropriate backing impossible to make one that learns a new language.

That said, the one like the Toki Pona in your question could be made. But you'd have to program most of it yourself, and in languages like Toki Pona that's easy. Try generating artlangs which more like natlangs.

This doesn't mean it couldn't seem like one. You could:

  1. Extract text (in English or some language) from books or such. You can find enough text online.
  2. Translate it (i.e. Google translate) between many languages, obscuring the information. (optional)
  3. Translate it from English—or better, i.e. Lojban, Esperanto, Toki Pona or raw predicate logic, as they are less complicated and easier to translate from—to your conlang.
  4. Dispose of invalid sentences using some kind of lightweight parser. (optional)

I couldn't find any (good) generators, but you could have the first!

2

I do not know of any tools that are specifically designed for producing syntactically valid text, but my own word generator Logopoeist could be made to work for that purpose, and it wouldn't be terribly difficult to update it to produce a program actually intended for that purpose.

The reason for this is that Logopoeist already treats morphophonology as an extension of syntax, and generates words according to explicit word-syntax parse trees, rather than, e.g., just filling in slots in a CV-style syllable structure template. So, if you are able to write up a formal grammar of the language's syntax above the word level, and put it into a format that the tool can read, then you just need to replace the phoneme/grapheme lists with word lists instead (repurposing phonetic classes to serve as syntactic classes / parts of speech), and it'll spit out random sentences instead of random words.

-1

I've done stories and rhyming poems with my own JABBER.EXE, but it is 16 bit (windows XP or earlier). Besides filling out a dictionary (which includes verb affordances and hyponym trees), you have to set 'parameters' for the language, and ConLangs do too much with those parameters. There can be no general purpose ConLang generator unless it learns like a human.

1
  • 1
    Is your program available for download? Otherwise it won't be much use to anyone else...
    – curiousdannii
    Apr 6, 2018 at 2:13

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.