forked from kying18/graph-composer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
128 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,14 @@ | ||
# graph-composer | ||
Using graphs to represent relationships between words in song lyrics and then generating new lyrics.. *ahem* interpretive poetry... from the graph | ||
# Markov Chain Composer | ||
Using Markov Chain to represent relationships between words in song lyrics and then generating new lyrics.. *ahem* interpretive poetry... from the graph | ||
|
||
To run: `python3 compose.py` | ||
|
||
You'll have to slightly change some of the code in order to adjust length of composition/which file is the vocabulary for the composition. | ||
|
||
YouTube Kylie Ying: https://www.youtube.com/ycubed | ||
Twitch KylieYing: https://www.twitch.tv/kylieying | ||
Twitter @kylieyying: https://twitter.com/kylieyying | ||
Instagram @kylieyying: https://www.instagram.com/kylieyying/ | ||
Website: https://www.kylieying.com | ||
Github: https://www.github.com/kying18 | ||
Programmer Beast Mode Spotify playlist: https://open.spotify.com/playlist/4Akns5EUb3gzmlXIdsJkPs?si=qGc4ubKRRYmPHAJAIrCxVQ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
""" | ||
Empty Compose Template to implement :D | ||
YouTube Kylie Ying: https://www.youtube.com/ycubed | ||
Twitch KylieYing: https://www.twitch.tv/kylieying | ||
Twitter @kylieyying: https://twitter.com/kylieyying | ||
Instagram @kylieyying: https://www.instagram.com/kylieyying/ | ||
Website: https://www.kylieying.com | ||
Github: https://www.github.com/kying18 | ||
Programmer Beast Mode Spotify playlist: https://open.spotify.com/playlist/4Akns5EUb3gzmlXIdsJkPs?si=qGc4ubKRRYmPHAJAIrCxVQ | ||
""" | ||
|
||
import os | ||
import re | ||
import string | ||
import random | ||
|
||
from graph import Graph, Vertex | ||
|
||
def get_words_from_text(text_path): | ||
pass | ||
|
||
def make_graph(words): | ||
pass | ||
|
||
def compose(g, words, length=50): | ||
pass | ||
|
||
def main(): | ||
pass | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
|
||
""" | ||
Empty Graph Template to implement :D | ||
YouTube Kylie Ying: https://www.youtube.com/ycubed | ||
Twitch KylieYing: https://www.twitch.tv/kylieying | ||
Twitter @kylieyying: https://twitter.com/kylieyying | ||
Instagram @kylieyying: https://www.instagram.com/kylieyying/ | ||
Website: https://www.kylieying.com | ||
Github: https://www.github.com/kying18 | ||
Programmer Beast Mode Spotify playlist: https://open.spotify.com/playlist/4Akns5EUb3gzmlXIdsJkPs?si=qGc4ubKRRYmPHAJAIrCxVQ | ||
""" | ||
|
||
import random | ||
|
||
class Vertex(object): | ||
def __init__(self, value): | ||
pass | ||
|
||
def add_edge_to(self, vertex, weight=0): | ||
pass | ||
|
||
def increment_edge(self, vertex): | ||
pass | ||
|
||
def get_adjacent_nodes(self): | ||
pass | ||
|
||
# initializes probability map | ||
def get_probability_map(self): | ||
pass | ||
|
||
def next_word(self): | ||
pass | ||
|
||
|
||
|
||
class Graph(object): | ||
def __init__(self): | ||
pass | ||
|
||
def get_vertex_values(self): | ||
pass | ||
|
||
def add_vertex(self, value): | ||
pass | ||
|
||
def get_vertex(self, value): | ||
pass | ||
|
||
def get_next_word(self, current_vertex): | ||
pass | ||
|
||
def generate_probability_mappings(self): | ||
pass |