--- license: mit language: - ba tags: - natural-language-processing - poetry-generation - text-generation - torch - lstm --- This generative model was trained using [Andrej Karpathy's code](https://github.com/karpathy/char-rnn) on texts by arond 100 Bashkir poets. Model was trained with size 1024 and 3 layers, dropout 0.5. There are 2 checkpoints of this model presented in the repository. One after 31 epochs with loss 0.8306, the other after 50 epochs with loss 0.8451. These metrics are in the file name. ## Usage The procedure for installing the required software is described [by Karpathy](https://github.com/karpathy/char-rnn), torch is required, the code is written in lua. Be careful, versions of libraries written many years ago are used! ```bash th sample.lua lm_lstm_epoch50.00_0.8451.t7 ``` ## Train data Train data is non free due to copyright restrictions. Texts from the [Bashkir poetry corpus](http://web-corpora.net/bashcorpus/), digitized for a [study on the history of Bashkir verse](https://books.google.ru/books?id=6rkkzAEACAAJ), are used as a training corpus. ## What for? In an era of winning Transformers, ancient RNN models seem archaic. But I see that they still work better than modern architectures with such important categories from the humanities point of view as poetic style. ## Publication Examples of text generation [have been published in a book](http://nevmenandr.net/personalia/Min_shigriet_yze.pdf) in Bashkir language. This book included as pdf file in this repository. ## Samples ### epoch 50, temperature 0.4 ``` Шат йөрәктән йәшел тулҡында. Бар тип белмәй белмәй белем шаулай, Беҙ беләбеҙ беҙҙең башҡортостан. Тау башында тормош килеп керҙе, Булыр ине төнгө тамсы булып. Тамырын күреп кенә йөрөй ул Алыҫ елдәр салғы ташланы. Кемдәр көткән кеше йөрәгенә Күкрәгемдә йөрөй яланда. ``` ### epoch 50, temperature 0.6 ``` Ята гүзәл йәш кейек. Йәнде тулап китә икән, Ҡапыл ерҙән бер туҡтау. Ул да ҡаты йәйҙең башҡа бер ғаләмде Дуҫтарына ҡарап батырҙы. Бер ҡарашы көндә кис булды ул, Йырлап йөрөй таныш кешегә. Урал аша тотҡан ҡайғыларын Бөгөн тик булды ул тауҙарға. Бер кем белә бөгөн яраларҙан Мандылдарҙан тағы бер сәскә. Сафлыҡтарҙы һаҡлап шатлыҡ килә, Тап булған һайын тауҙар. Көндәр кеүек, йәмле шыршы тауышы Тау-тау булып күккә табынған. Ара тора йәндәр менән белдем, Бер ҡараһаң, һаман бер сабый. ``` ## BibTeX entry and citation info ``` @book{orekhov2020min, title={Мин шиғриәт үҙе... Компьютер шиғырҙар}, author={Орехов, Б.В.}, isbn={9785961306675}, url={http://nevmenandr.net/personalia/Min_shigriet_yze.pdf}, year={2020}, publisher={Mir pechati} } @book{orekhov2019bashkir, title={Башкирский стих ХХ века: корпусное исследование}, author={Орехов, Б.В.}, isbn={9785907189294}, url={http://nevmenandr.net/personalia/bverse_preview.pdf}, year={2019}, publisher={Alete{\u\i}}i︠a︡} } ```