From 620e55560dbb1bf6bd30190a2d8d88fb2f9a6003 Mon Sep 17 00:00:00 2001 From: Eric Ihli Date: Wed, 21 Jul 2021 21:03:09 -0500 Subject: [PATCH] Misc updates WGU --- load-balancer/haproxy.cfg | 1 + load-balancer/run.sh | 3 ++- web/README_WGU.org | 21 +++++++++++++-------- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/load-balancer/haproxy.cfg b/load-balancer/haproxy.cfg index eb3ed8d..b057d0c 100644 --- a/load-balancer/haproxy.cfg +++ b/load-balancer/haproxy.cfg @@ -1,5 +1,6 @@ defaults timeout connect 30s + timeout client 60s timeout server 120s mode http diff --git a/load-balancer/run.sh b/load-balancer/run.sh index 3717c11..5e80c91 100755 --- a/load-balancer/run.sh +++ b/load-balancer/run.sh @@ -9,4 +9,5 @@ docker run \ --sysctl net.ipv4.ip_unprivileged_port_start=0 \ --mount type=bind,source=$FULLCHAIN_PEM,target=/etc/ssl/cert.pem \ --mount type=bind,source=$(pwd)/haproxy.cfg,target=/usr/local/etc/haproxy/haproxy.cfg \ - --rm -it haproxy + --name haproxy \ + -d --rm -it haproxy diff --git a/web/README_WGU.org b/web/README_WGU.org index 0409538..750d900 100644 --- a/web/README_WGU.org +++ b/web/README_WGU.org @@ -845,30 +845,35 @@ Provide rhyming lyric suggestions optionally constrained by syllable count. *** Requirements -- [ ] Given a word or phrase, suggest rhymes (ranked by quality) (Trie) -- [ ] Given a word or phrase, suggest lyric completion (Hidden Markov Model) +- [X] Given a word or phrase, suggest rhymes (ranked by quality) (Trie) +- [-] Given a word or phrase, suggest lyric completion (Hidden Markov Model) + [ ] (Future iteration) Restrict suggestion by syllable count - + [ ] Restrict suggestion by rhyme quality + + [X] Sort suggestions by frequency of occurrence in training corpus + + [X] Sort suggestions by rhyme quality + [ ] (Future iteration) Show graph of suggestions with perplexity on one axis and rhyme quality on the other ** Data Sets -The dataset was obtained from http://darklyrics.com. +I obtained the dataset from http://darklyrics.com. + +The code that I used to download all of the lyrics is at [[https://github.com/eihli/prhyme/blob/master/src/com/owoga/corpus/darklyrics.clj]]. + +In the interest of being nice to the owners of http://darklyrics.com, I'm keeping private the files containing the lyrics. + +The trained data model is available. See ~resources/darklyrics-markov.tpt~ ** Data Analysis -See ~src/com/owoga/darklyrics/core.clj~ +I wrote code to perform certain types of data analysis, but I didn't find it useful to meet the business requirements of this project. -See https://github.com/eihli/prhyme +For example, there is natural language processing code at [[https://github.com/eihli/prhyme/blob/master/src/com/owoga/prhyme/nlp/core.clj]] that parses a line into a grammar tree. I wrote several functions to manipulate and aggregate information about the grammar trees that compose the corpus. But I didn't use any of that information in creation of the n-gram Hidden Markov Model nor in the user display. For tasks related to brainstorming rhyming lyrics, that extra information lacked significant value. ** Assessment See visualization of rhyme suggestion in action. -See perplexity? - ** Visualizations See visualization of smoothing technique.