by Mizza · 7y ago · 0 comments
A Markov chain generator wouldn't:
* Capitalize the first word of each line
* Make lines of approximately the right length
* Mark text with who is to speak it
While this is just a toy example, it's powerful enough to start showing the ways RNNs can produce text that looks superficially correct.
(Generating Shakespeare is actually one of the examples given in the classic http://karpathy.github.io/2015/05/21/rnn-effectiveness/)
1. Yes it would. It would see capitalized words as high probability for first word on a line or after a point.
2. Obviously it could, depending on stop condition. Especially if you include line length.
3. If trained on corpus of plays, for sure it would.
The strength on the RNN is supposed to be in context and memory... Perhaps handling of grammar.
There are advanced hierarchical grammars that are related to Markov random field models that are about on par with RNN based on many text and music analysis loads. (In fact probabilistic math is often used to describe results and workings of a deep NN anyway.)
1. To use a small dataset that can be fed from the relatively small Colab VM (so people can play with it themselves)
2. To use a well known model (so people can focus on the implementation parts of it)
There's a resnet example in the previous example in the series (though the dataset is too large to feed from Colab).Also, this is very early stage software, so things are a bit more verbose than they should be :).
By analogy, and contrast, no one says Python runs on GPUs, just because TensorFlow allows describing models in Python that then get run on the GPU, or Numba rewrites Python loops to CUDA PTX.
It looks like marketing tbh despite know that Julia is a very solid language technically and shouldn’t need these kinds of rhetorical tricks.
This doesn't generate novel, meaningful text content without a template, but I'm unaware of any machine learning model that does this well (OpenAI's included). This model does absorb the 'rules' of the text, both grammar and structure (character names and dialogue, scene introductions, etc)
In my own project, I made use of this to find spelling and grammatical errors on Esperanto Wikipedia: https://medium.com/@mapmeld/esperanto-nlp-part-3-correcting-...