<p>I do not know of any tools that are specifically designed for producing syntactically valid text, but my own word generator <a href="https://github.com/conlang-software-dev/Logopoeist" rel="nofollow noreferrer">Logopoeist</a> could be made to work for that purpose, and it wouldn't be terribly difficult to update it to produce a program actually <em>intended</em> for that purpose.</p>

<p>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.</p>

CC BY-SA 3.0
2018-03-21T20:41:13.640Z
2018-03-21T20:41:13.640Z
Logan R. Kearsley
<p>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 <em>extremely difficult</em> and without appropriate backing <em>impossible</em> to make one that learns a new language.</p>

<p>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.</p>

<p><em>This doesn't mean it couldn't <strong>seem</strong> like one.</em> You could:</p>

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

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

CC BY-SA 3.0
2018-03-17T10:09:23.370Z
2018-03-19T18:59:48.710Z
2018-03-19T18:59:48.710Z
Duncan
<p>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. </p>

CC BY-SA 3.0
2018-04-06T02:13:24.793Z
Is your program available for download? Otherwise it won't be much use to anyone else...
curiousdannii
CC BY-SA 3.0
2018-04-05T23:11:55.560Z
2018-04-05T23:11:55.560Z
AmI
<p>Another way to put this is, what tools exist to generate sentences in the same way that some conlanging tools generate phonotactically valid words.</p>

<p>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.</p>

<p>Here is an example <a href="http://tokipona.net/tp/LoremIpsum.aspx" rel="noreferrer">I laboriously wrote for Toki Pona</a>.</p>

<p>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.</p>

CC BY-SA 3.0
2018-03-09T01:48:41.383Z
But lorem ipsum doesn’t include syntactically valid sentences?
Jan
CC BY-SA 3.0
2018-03-09T19:22:34.973Z
@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.
MatthewMartin
CC BY-SA 3.0
2018-03-11T09:44:39.383Z
Rosenfelder was working on one, IIRC
Duncan
CC BY-SA 3.0
2018-03-18T15:18:47.360Z
Do you happen to have a formal grammar for the language?
John Dvorak
CC BY-SA 3.0
2018-03-19T15:15:28.280Z
@JohnDvorak I did one for toki pona with agfl -
 http://www.suburbandestiny.com/?p=805 and while looking for that, it turns out there is a node lib for generating texts from agfl grammars https://www.npmjs.com/package/agfl-generate
MatthewMartin
<syntax><tools>
What tools exist for creating syntactically correct generated text in new languages?
# What tools exist for creating syntactically correct generated text in new languages?

(Asked by: username_0 on 2018-03-06)

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](http://tokipona.net/tp/LoremIpsum.aspx).

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.

**Tags:** syntax, tools

> **Comments:**
> **username_1**: But lorem ipsum doesn’t include syntactically valid sentences?  
> **username_0**: @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.  
> **username_2**: Rosenfelder was working on one, IIRC  
> **username_3**: Do you happen to have a formal grammar for the language?  
> **username_0**: @username_3 I did one for toki pona with agfl -  http://www.suburbandestiny.com/?p=805 and while looking for that, it turns out there is a node lib for generating texts from agfl grammars https://www.npmjs.com/package/agfl-generate  

---

## 3 answers

### Answer by username_4 on 2018-03-21. Score: 2

I do not know of any tools that are specifically designed for producing syntactically valid text, but my own word generator [Logopoeist](https://github.com/conlang-software-dev/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.


---

### Answer by username_2 on 2018-03-17. Score: 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!


---

### Answer by username_5 on 2018-04-05. Score: -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.

> **Comments:**
> **username_6**: Is your program available for download? Otherwise it won't be much use to anyone else...  

---

