Created
July 31, 2020 05:12
-
-
Save wezleysherman/eeade3c3e103607703ba69ce0d5e9b9d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def score_bar(input_bar, artists_bars, artists_avg_readability, artists_avg_rhyme_idx): | |
gen_readability = textstat.automated_readability_index(input_bar) | |
gen_rhyme_idx = calc_rhyme_density(input_bar) | |
comp_bars = compare_bars(input_bar, artists_bars) | |
# Scores based off readability, rhyme index, and originality. The lower the score the better. | |
bar_score = (artists_avg_readability - gen_readability) + (artists_avg_rhyme_idx - gen_rhyme_idx) + comp_bars | |
return bar_score |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment