{"id":34135780,"url":"https://github.com/vinaygaykar/cool-lexicon","last_synced_at":"2026-05-06T04:05:05.676Z","repository":{"id":198915434,"uuid":"700909544","full_name":"vinaygaykar/cool-lexicon","owner":"vinaygaykar","description":"A lexicon for golang \u0026 mysql","archived":false,"fork":false,"pushed_at":"2023-11-30T15:07:18.000Z","size":121,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-17T13:28:47.320Z","etag":null,"topics":["database","golang","lexicon","mysql","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vinaygaykar.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-10-05T14:29:21.000Z","updated_at":"2023-11-28T13:32:39.000Z","dependencies_parsed_at":"2023-11-28T14:48:02.169Z","dependency_job_id":null,"html_url":"https://github.com/vinaygaykar/cool-lexicon","commit_stats":null,"previous_names":["vinaygaykar/cool-lexicon-lookup","vinaygaykar/cool-lexicon"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/vinaygaykar/cool-lexicon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinaygaykar%2Fcool-lexicon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinaygaykar%2Fcool-lexicon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinaygaykar%2Fcool-lexicon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinaygaykar%2Fcool-lexicon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinaygaykar","download_url":"https://codeload.github.com/vinaygaykar/cool-lexicon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinaygaykar%2Fcool-lexicon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32677935,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T02:33:58.958Z","status":"ssl_error","status_checked_at":"2026-05-06T02:33:39.611Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["database","golang","lexicon","mysql","sqlite3"],"created_at":"2025-12-15T01:57:00.946Z","updated_at":"2026-05-06T04:05:05.652Z","avatar_url":"https://github.com/vinaygaykar.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cool-lexicon\n\nThe Lexicon project is a Golang application designed to create and manage a lexicon of Devnagri words.\nCurrent version of the project relies upon MySQL or LibSQL to store all the words because -- simplicity.\n\n\n\n## Table of Contents\n- [Context](https://github.com/vinaygaykar/cool-lexicon/edit/tech/docs/README.md#context)\n- [User Scenarios Supported](https://github.com/vinaygaykar/cool-lexicon/edit/tech/docs/README.md#user-scenarios-supported)\n- [Getting Started](https://github.com/vinaygaykar/cool-lexicon/edit/tech/docs/README.md#context)\n- [Troubleshooting](https://github.com/vinaygaykar/cool-lexicon/edit/tech/docs/README.md#context)\n- [Contributing](https://github.com/vinaygaykar/cool-lexicon/edit/tech/docs/README.md#context)\n- [License](https://github.com/vinaygaykar/cool-lexicon/edit/tech/docs/README.md#context)\n\n\n\n## Context\n\nThe Lexicon project aims to provide a user-friendly CLI interface to work with a lexicon of Devnagri words. It offers various operations to search and manage words efficiently.\n\n\n\n## User Scenarios Supported\n\n\n### 0. Setup \u0026 basic scenarios\n\n#### 0.1 Setup the DB or validate existing setup\nAs a user, during the first run, it is possible that necessary database and tables are not setup, to do that use the `-check` flag which will perform necessary\noperation if required. Any failures here would need manual intervention.\n\nUsage\n```console\n  ./lxc -check -ex नमस्कार\n```\n\n#### 0.2 File based \u0026 CLI inputs\n\nInputs can be given from following sources for all provided operations.\n\n1. **CLI** : (Default) Using the word directly from the terminal. \nIn the following example the operation exists uses `नमस्कार` and operation add uses `धन्यवाद` as input word.\n```console\n  ./lxc -ex नमस्कार -ad धन्यवाद\n```\nThe limitation to this is that only one word can be given as input to one operation.\n\n\n2. **File** : Using the words from the provided text file path. Use the `-if` flag to indicate this option. \nIn the following example the operation exists uses the file `./path-to/file1.txt` and add uses `./file2.txt` as input, given the file exists.\n```console\n  ./lxc -if -ex ./path-to/file.txt -ad ./file2.txt\n```\nThere are some requirements, \n  - File should exists at given place and is a valid text file\n  - File should have required access to be read by the program\n  - Words are space delimited and a line should not be more than 64K characters long\n  - Once the `-if` flag is used input for all operations is streamed from file\n\n#### 0.3 File base \u0026 CLI output\n\nOutput can be streamed to either of the places for _all the operations_.\n\n1. **CLI** : (Default) Using terminal to display result of every operation.\n\n2. **File** : Writing output of every sepcified operation to individual files at provided location. Use the `-of` flag and provided expected location of the output.\nIn the following example, output of both the operations will be written to `./output-path` location under different file for each operation.\n```console\n  ./lxc -of ./output-path -ex नमस्कार -se धन्य\n```\nThere are some requirements,\n  - Output folder should exists\n  - If file exists at the output location with name of the operation then it will be overwritten\n  - Program should have access to the output location\n  - Once the `-of` flag is used output for all operations is streamed to file\n\n**NOTE** : Add operation has no output \n\n\n### 1. Check if a word exists\n\nAs a user, you can check if a given word exists in the lexicon by using the `-ex` operation. \n\nUsage\n```console\n  ./lxc -ex नमस्कार\n```\n\n\n### 2. Search words that start with a substring\n\nAs a user, you can retrieve a list of words that start with a given substring using the `-ss` operation. The result will be a sorted list of words that match the provided substring.\n\nUsage\n```console\n  ./lxc -ss नम\n```\n\n\n### 3. Search words that end with a substring\n\nAs a user, you can find words that end with a specific substring, use the `-se` operation. It will return a sorted list of words that match the provided substring.\n\nUsage\n```console\n  ./lxc -se कार\n```\n\n\n### 4. Add words to the lexicon\n\nAs a user, you can add new words to the lexicon using the `-ad` operation. \n\nUsage\n```console\n  ./lxc -ad धन्यवाद\n```\n\n\n\n## Getting Started\n\nTo get started with the Lexicon project, follow these steps:\n\n- Clone the project repository to your local machine\n  `git clone https://github.com/vinaygaykar/cool-lexicon.git`\n\n- Install the required dependencies\n  `go get`\n\n- Set up the MySQL or libSQL database server, make sure it is running (docker is recommended but bare installation also works)\n\n- Configure the database connection in the `config.json` file, make sure the file is present at root level of the project\n\n- (Optinal) Test\n`got test --timeout 5m ./...`\n\n- Run the application.\n  `go run main.go`\n\nTo create and run a binary:\n\n- Run `go build -o lxc ./cmd/main.go`, this will create a executable named `lxc` depending upon your os \u0026 arch.\n- Make sure database server is running\n- Make sure the config file `config.json` is present at same level as that of the executable and has valid \u0026 working db connection values\n- Execute the binary, check [User Scenarios Supported](https://github.com/vinaygaykar/cool-lexicon/edit/tech/docs/README.md#user-scenarios-supported) for supported operations\n\n\n\n## Troubleshooting\n\n- If you encounter any issues with the database setup, ensure that the database is correctly configured and that you have the necessary privileges.\n\n- To provide different configs use the `-cfg` flag and pass new config file location. Usage\n\n  ```console\n    ./lxc -cfg location/to/diffent/config.json\n  ```\n\n\n\n## Contributing\n\nIf you'd like to contribute to the Lexicon project, please open an issue or submit a pull request. We welcome any improvements or feature enhancements.\n\n\n## License\n\nThis project is licensed under the Apache 2.0 License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinaygaykar%2Fcool-lexicon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinaygaykar%2Fcool-lexicon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinaygaykar%2Fcool-lexicon/lists"}