基于chinese-poetry/chinese-poetry项目的古诗词生成器,验证如何读取json文件及进行随机抽取。并结合overtrue/pinyin项目验证了如何对诗句进行注音。
Demo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
There are 1000 lines in ci.song.1000.json random_num 648 author 苏轼 string(21) "自净方能净彼。" string(32) "zì jìng fāng néng jìng bǐ." string(21) "我自汗流呀气。" string(25) "wǒ zì hàn liú ya qì." string(39) "寄语澡浴人,且共肉身游戏。" string(54) "jì yǔ zǎo yù rén, qiě gòng ròu shēn yóu xì." string(9) "但洗。" string(9) "dàn xǐ." string(9) "但洗。" string(9) "dàn xǐ." string(21) "俯为人间一切。" string(29) "fǔ wéi rén jiān yī qiè." rhythmic 如梦令 |
测试:https://givemerandom.com/ci
483 comments