Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A simple Markov chains lyric generator written in Python.

NotificationsYou must be signed in to change notification settings

paladini/py-simple-lyric-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A simple Markov chains lyric generator written in Python.

This small project generate new lyrics based on the lyrics of a given artist. For example, you can ask the script to generate Pink Floyd-like lyrics, so it will read all the lyrics from Pink Floyd and generate a new one with the same style.

I've made a small "database" too, so whenever you load all lyrics from a given artist it will be saved on your computer under thedb folder. This way we can avoid a lot of API calls (that are quite expensive).

Dependencies

Usage

The program expects the following arguments:

python3 py-simple-lyric-generator.py"<name of the artist>"<number_of_phrases_to_generate>

For example, if you want to generate 10 sentences based on Pink Floyd lyrics you should run:

python3 py-simple-lyric-generator.py"Pink Floyd" 10

Then you'll get somewhat like that:

I'd be goneCause I'm the man on the outside looking inPlaying to rulesLotuses lean on each other in yearningThe SchoolmasterAnd all that you seeAnd if you don't mindIt's awfully considerate of you to leave, LucyWheeling, soaring, gliding b Instrumental He made his way to the see-saw It's awfully considerate of you to think of me hereDon't accept that what's hap One sound, one single kiss

If you want to reset cached artists from the database, just run the following:

chmod +x clean_db.sh./clean_db.sh

How it works?

This's my first experiment within lyrics generation with Markov chains, but I've read some texts and a lot of examples. In order to understand how can I generate lyrics, please check the following links:

And here you can check some projects on Github that helped me:

About

Thepy-simple-lyric-generator was created by Fernando Paladini on 01-17-2016, but it was heavily based on another open-source projects you can find at the web. If you have any issue, doubt, problem or suggestion, please feel free to create anew Issue or even contact me at fnpaladini at gmail dot com.

About

A simple Markov chains lyric generator written in Python.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp