Python code to generate text using a pretrained character-based RNN
github.com
github.com
Can someone point me to some of the best examples of coherent and long (as in many words/sentences) automatic text generation? Or an explanation as to why we're so far from being able to tackle this problem? Because I haven't seen anything noteworthy in text generation to write home about.
Unfortunately, a lot of the examples people give for text generation in general are cherrypicked, which leads to a selection bias toward the robustness of text generation (see my previous rant: https://news.ycombinator.com/item?id=14949220)
In terms of size vs. performance (including retraining), the 128-cell LSTM was the best balance for a repo like this. (The 3-layer 512-cell networks used in the original Karpathy examples are hundreds of MB)
I recommend looking at the examples in the /output folder for more robust examples than the ones in the README.
Why don't you have a priming ability? That is, generating starting from some context text. Might be useful for a lot of applications.
The generate() function does have priming with a `prefix` parameter; see the demo.
Also things like subtedditsimulator seem to excel at generating grammatically and thematically correct nonsense.
What we really need is a way to take a bunch of facts, a key message, a tone, and produce text that represents those inputs.
The text generation / grammar of language is basically solved imo. The problem is taking one thought and expanding on that based on other relevant thoughts.
But we're essentially talking general AI at that point.