{"id":17101404,"url":"https://github.com/hackerb9/findstresses","last_synced_at":"2026-01-05T07:19:11.876Z","repository":{"id":113746283,"uuid":"535557618","full_name":"hackerb9/findstresses","owner":"hackerb9","description":"Look for words with the right pattern of syllabic stresses","archived":false,"fork":false,"pushed_at":"2022-10-13T04:54:18.000Z","size":1694,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-29T01:56:49.694Z","etag":null,"topics":["mnemonics","morse-code","poetry","stresses","syllables"],"latest_commit_sha":null,"homepage":"","language":"Roff","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hackerb9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-12T07:33:49.000Z","updated_at":"2023-06-01T19:08:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"6fb2bc57-7246-4181-8d68-9aa5dcc31fbd","html_url":"https://github.com/hackerb9/findstresses","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackerb9%2Ffindstresses","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackerb9%2Ffindstresses/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackerb9%2Ffindstresses/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackerb9%2Ffindstresses/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hackerb9","download_url":"https://codeload.github.com/hackerb9/findstresses/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245153896,"owners_count":20569408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mnemonics","morse-code","poetry","stresses","syllables"],"created_at":"2024-10-14T15:25:05.023Z","updated_at":"2026-01-05T07:19:11.849Z","avatar_url":"https://github.com/hackerb9.png","language":"Roff","funding_links":[],"categories":[],"sub_categories":[],"readme":"# findstresses\nLook for words with the right pattern of syllabic stresses\n\n## stress2words usage\n\nA dash (`-`) represents a stressed syllable.\nA period (`.`), unstressed. \n\n* Show words that begin with the letter B and have the same stress\n  pattern as the morse code for the letter 'B' (dah-dit-dit-dit).\n\n  ```\n   $ ./stress2words b-...\n   BENEFITING B EH1 N AH0 F IH0 T IH0 NG\n   BENEVENTO B EH1 N AH0 V EY0 N T OW0\n   BROKERAGE'S B R OW1 K ER0 IH0 JH IH0 Z\n   BROKERAGES B R OW1 K ER0 IH0 JH IH0 Z\n   ```\n \n## word2stresses usage\n\n * Show the rhythm of stresses in the word Dracula:\n   ```\n     $ ./word2stresses dracula\n     DRACULA -..\n   ```\n\n## Data sources\nThe fundamental source used is the [CMU Pronouncing\nDictionary](http://www.speech.cs.cmu.edu/cgi-bin/cmudict) which lists\nwhich syllables are normally stressed in a word. However, the cmudict\ncorpus includes tons of what appear to be last names: BETTENHAUSEN,\nBONEBERGER, BUDDENHAGEN, etc. So, I reduced it it by keeping only the\nmost common words, as reported by the\n[SCOWL](http://wordlist.aspell.net/) word lists. To search the full\ncorpus, use the -f flag, as in `stress2words -f b-...`.\n\n## Secondary stresses\nThe CMU dict embeds numbers representing stress for each syllable. \n0 means unstressed; 1, primary stress; 2, secondary stress. For example:\n\n    BEYONCE  B IH0 Y AO2 N S EY1\n\nCurrently words with secondary stress (Aardvark, Beyonce, Zulu) are not returned\nfor normal `stress2words` searches with a dash (`-`). However, the user can request\nthat either primary or secondary stress be allowed by using a tilde (`~`) instead of a dash.\nAlthough I am not sure why you would want to, one can force only secondary stress to match by\nusing an equals sign (`=`). And, again, I don't know why this would be desired, but one\ncould also search for either a secondary stress or unstressed syllable by using underscore (`_`).\n\n## One word can have multiple rhythmic meters\n\n\u003c!-- for word in $(grep '(1)' cmudict-0.7b | awk '{print $1}' | grep -o \"[A-Z']*\"); do ./word2stresses \"$word\"; done | sort | uniq -c | awk '{print $2}' | sort | uniq -c | sort -n | awk '{print $1}' | uniq -c --\u003e\n\nThe word2stresses program will usually output only a single line, but\nit can output multiple lines if there are different ways a word can be\nstressed. For example, \n\n    $ ./word2stresses rocard\n    ROCARD -.\n    ROCARD -~\n    ROCARD ~-\n    ROCARD .-\n\n97% of the 134,429 words in the CMU dictionary have only one stress\npattern.\n\n| Number of unique patterns | Count of words |\n|:-------------------------:|---------------:|\n| 1 pattern                 |        131,546 |\n| 2 patterns                |          2,856 |\n| 3 patterns                |             26 |\n| 4 patterns                |              1 |\n|:-------------------------:|---------------:|\n| Total                     |        134,429 |\n\n## BUGS\n\n### Ought to omit or flag words with multiple stress patterns. \n\nFor example: \"yourself\" is not useful for a Morse mnemonic as it can\nbe stressed in two different ways.\n\n\t$ ./word2stresses yourself\n\tYOURSELF .-\n\tYOURSELF -.\n    \n## Should not output redundant stresses.\n\nOn rare occasions, word2stresses will print out repetitive stress\npatterns. For example, the word \"whitening\":\n\n     $ ./word2stresses whitening\n     WHITENING -..\n     WHITENING -.\n     WHITENING -..\n     WHITENING -.\n \n### Perhaps not suitable for Morse Code mnemonics at all.\n\nHackerb9 wrote this program to create mnemonic words for each letter\nin the Morse Code alphabet. That works fine for small codes, like\ndit-DAH (letter 'A' is \"a-WAY\"). However, a longer code like\nDAH-dit-dit-dit (letter 'B') has a list of words which aren't very\nmemorable. How is one to remember that the key word is \"BENIFITING\",\nand not \"BENEFIT\"? Or, \"BROKERAGES\" and not \"BROKERAGE\"?\n\nWhat we need is a poet. \n\n## See also\n\n* [morsemnemonics.md](morsemnemonics.md) contains a list of possible\n  mnemonics for Morse Code created using the words suggested by these\n  programs.\n\n* `morse` from BSD games package for encoding and decoding morse code.\n  * `morse -s \u003c\u003c\u003c\"Hello World!\"`\n  * `morse -d \u003c\u003c\u003c\".... . .-.. .-.. ---\"`\n\n\n* `cw` command for learning morse code by beeping the speaker. \n  \n  Note that the default speed is a little too low to learn the rhythm\n  of the beeping. Also, the default volume is 100%, so you'll want the\n  `-v` option. I suggest learners use 18wpm speed of each letter, but\n  with a Farnsworth gap so that each letter is distinct.\n\n  * `cw -v 20% --wpm=18 --gap 5 \u003c\u003c\u003c\"Hello World!\"`\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackerb9%2Ffindstresses","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhackerb9%2Ffindstresses","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackerb9%2Ffindstresses/lists"}