{"id":21963034,"url":"https://github.com/kampersanda/goodname","last_synced_at":"2025-08-14T12:36:18.071Z","repository":{"id":44405255,"uuid":"511244082","full_name":"kampersanda/goodname","owner":"kampersanda","description":"Tool to assist you with cool naming of your methods and software","archived":false,"fork":false,"pushed_at":"2022-08-14T22:19:23.000Z","size":13670,"stargazers_count":124,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T22:04:25.229Z","etag":null,"topics":["acronym","generator","trie"],"latest_commit_sha":null,"homepage":"https://kampersanda.github.io/goodname/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kampersanda.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}},"created_at":"2022-07-06T18:07:00.000Z","updated_at":"2025-03-24T04:10:59.000Z","dependencies_parsed_at":"2022-07-14T17:47:51.442Z","dependency_job_id":null,"html_url":"https://github.com/kampersanda/goodname","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kampersanda%2Fgoodname","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kampersanda%2Fgoodname/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kampersanda%2Fgoodname/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kampersanda%2Fgoodname/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kampersanda","download_url":"https://codeload.github.com/kampersanda/goodname/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250536385,"owners_count":21446725,"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":["acronym","generator","trie"],"created_at":"2024-11-29T10:59:24.016Z","updated_at":"2025-04-24T00:23:21.472Z","avatar_url":"https://github.com/kampersanda.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Goodname\n\n![](https://github.com/kampersanda/goodname/actions/workflows/rust.yml/badge.svg)\n[![Documentation](https://docs.rs/goodname/badge.svg)](https://docs.rs/goodname)\n[![Crates.io](https://img.shields.io/crates/v/goodname.svg)](https://crates.io/crates/goodname)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/kampersanda/goodname/blob/master/LICENSE)\n\nGoodname is a tool to assist you with cool naming of your methods and software.\nGiven a brief description of your method or software,\nthis tool enumerates name candidates forming subsequences of the description (i.e., *acronym*).\n\nFor example, given description \"Character-wise Double-array Dictionary\" of your software,\nthis tool will suggest some name candidates such as \"crawdad\" and \"cheddar\".\n\n## Web App\n\nThe [Web App](https://kampersanda.github.io/goodname/) is the easiest way to try this tool.\n(This demo movie is at v0.1.1.)\n\n![](./movies/demo.gif)\n\n## CLI tool\n\n`goodname-cli` provides a CLI tool of Goodname.\nThe arguments are\n- `-w`: Input word list (must be sorted, be unique, and include no upper-case letters).\n- `-k`: Top-k to print (default=`30`).\n- `-l`: The maximum number of arbitrary prefix letters to allow for generating recursive acronyms (default=`0`, must be in `0..=3`).\n\nEnter your description using only lowercase letters or a space basically.\nSet UPPERCASE only for letters that you want to be always included in a name candidate.\n\n```\n$ cargo run --release -p goodname-cli -- -w wordlist/words.txt -k 5\nEnter your text:\nCharacter wise Double array Dictionary\nMatched 10 candidates\n   1 crawdad: ChaRActer Wise Double Array Dictionary (score=2656)\n   2 chided: CHaracter wIse DoublE array Dictionary (score=2064)\n   3 cheddar: CHaracter wisE Double array DictionARy (score=1862)\n   4 carded: ChARacter wise DoublE array Dictionary (score=1744)\n   5 creeded: ChaRactEr wisE DoublE array Dictionary (score=1684)\n```\n\nIn the above example, subsequence ('C', 'D', 'D') is always contained in the candidates.\nIf you obtain too many or too few candidates, adjust the lettercase setting, as follows.\n\n```\n$ cargo run --release -p goodname-cli -- -w wordlist/words.txt -k 5\nEnter your text:\nCharacter wise double array dictionary\nMatched 1047 candidates\n   1 crawdad: ChaRActer Wise Double Array Dictionary (score=2656)\n   2 chresard: CHaRactEr wiSe double ARray Dictionary (score=2244)\n   3 chawdron: CHAracter Wise Double aRray dictiONary (score=2200)\n   4 chadar: CHAracter wise Double ARray dictionary (score=2176)\n   5 chawia: CHAracter WIse double Array dictionary (score=2176)\n```\n\nOr, you can specify the maximum number of arbitrary prefix letters to allow for generating recursive acronyms.\n\n```\n$ cargo run --release -p goodname-cli -- -w wordlist/words.txt -k 5 -l 2\nEnter your text:\nCharacter wise Double array Dictionary\nMatched 25 candidates\n   1 crawdad: ChaRActer Wise Double Array Dictionary (score=2656)\n   2 chided: CHaracter wIse DoublE array Dictionary (score=2064)\n   3 UNchided: CHaracter wIse DoublE array Dictionary (score=2064)\n   4 Scheduled: CHaracter wisE DoUbLE array Dictionary (score=2032)\n   5 cheddar: CHaracter wisE Double array DictionARy (score=1862)\n```\n\n## Scoring\n\nThe candidates are printed in score order.\nThe scores are assigned based on the following ideas:\n\n- The more forward letters of each word in a description, the higher the score.\n- The more letters matched, the higher the score.\n\nMore formally, given a text $T$ and a set of positions $\\{ i_1, i_2, \\dots, i_m \\}$ of $T$ such that $T[i_j]$ is not a space,\nwe define the score of the subsequence $T[i_1] T[i_2] \\dots T[i_m]$ as\n\n$$ \\sum_{j \\in [1,m]} 2^{\\ell_{\\max} - d(i_j)}, $$\n\nwhere $\\ell_{\\max}$ is the maximum length of a word obtained by separating $T$ with a space, and\n$d(i)$ is the distance from $T[i]$ to its preceding space (assuming $T[-1]$ is a space).\n\n## Complexity\n\nEnumerating all possible subsequences takes $O(2^n)$ time for an input text of length $n$.\nTo perform this in practical time, we generate subsequences on a trie and early prune those that are not candidates.\nFurthermore, if the number of candidates exceeds 10k, the process will be forced to terminate.\n\n\n## TODO\n\n - Devise more reasonable scoring.\n - Prepare richer word dictionaries.\n\n## Credits\n\n`wordlist/words.txt` is a list of English words provided by [dwyl/english-words](https://github.com/dwyl/english-words).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkampersanda%2Fgoodname","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkampersanda%2Fgoodname","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkampersanda%2Fgoodname/lists"}