{"id":18520614,"url":"https://github.com/nerett/ht_fdict","last_synced_at":"2025-10-20T02:38:38.930Z","repository":{"id":196370018,"uuid":"469513683","full_name":"nerett/ht_fdict","owner":"nerett","description":"Frequency dictionary implementation based on custom hashtable","archived":false,"fork":false,"pushed_at":"2022-03-31T22:41:02.000Z","size":196,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-06T05:11:32.770Z","etag":null,"topics":["frequency-analysis","hashtable","text-analysis"],"latest_commit_sha":null,"homepage":"","language":"C++","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/nerett.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}},"created_at":"2022-03-13T22:44:39.000Z","updated_at":"2023-03-28T20:29:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"d3c12aa0-a348-4d60-a491-b44923616a47","html_url":"https://github.com/nerett/ht_fdict","commit_stats":null,"previous_names":["nerett/ht_fdict"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nerett/ht_fdict","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nerett%2Fht_fdict","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nerett%2Fht_fdict/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nerett%2Fht_fdict/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nerett%2Fht_fdict/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nerett","download_url":"https://codeload.github.com/nerett/ht_fdict/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nerett%2Fht_fdict/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265262490,"owners_count":23736408,"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":["frequency-analysis","hashtable","text-analysis"],"created_at":"2024-11-06T17:21:29.315Z","updated_at":"2025-10-20T02:38:33.902Z","avatar_url":"https://github.com/nerett.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HT_FDict\nThis frequency dictionary based on hashtable aims at studiyng the frequency of occurrence of certain words in books written by Petrovich and other respectable MIPT professors.\n\n## Usage\nRun this program with `./ht_fdict \u003cfilename\u003e` (if you haven't done any changes to the Makefile) from the `Release/` or `Debug/` depending on how you've built it (also see [*Building from sourse*](https://github.com/nerett/ht_fdict#building-from-source) section for more information). Or type `make run TEXT=\u003cfilename\u003e` (also use `MODE=DEBUG` if you built the program in the `DEBUG` mode; program runs in the `RELEASE` mode by default).\n\nThe program will automatically index the file given. Then you'll be asked to enter a word to search in the hashtable. After you enter a word, the program will display this word's frequency. You can search for `q` to exit the program.\n\n## Building from source\n#### Downloading\nDownload this repository with\n\n```bash\ngit clone https://github.com/nerett/ht_fdict.git\n```\n\n#### Installing dependencies\nProject's dependencies can be installed with (also see [*Dependencies*](https://github.com/nerett/ht_fdict#dependencies) section for more information)\n\n```bash\ncd ht_fdict/\nmake install-dependencies\n```\n\n#### Configuring\nYou need to configure this project's dependencies before building. You can do it by running\n\n```bash\nmake config\n```\n\n#### Building\nNow you can build the project. Proceed with\n\n```bash\nmake MODE=\u003cmodename\u003e HASHFUNC=\u003chashfuncname\u003e\n```\n\nThere are 2 modes available: `DEBUG` and `RELEASE`. The project builds in `RELEASE` mode by default, so you haven't to use `MODE` option if you want to build the project in the `RELEASE` mode.  \nThere are 3 hash functions available: `XOR`, `SYMCODESUM` and `SYMCODESUMV2`. `SYMCODESUMV2` is set to default (it is called by default in the `calchash` from the `ht_fdict.cpp`), so you don't need to use `HASHFUNC` option if you want to use `SYMCODESUMV2` (moreover, this function is the most efficient among this 3 fuctions, so do not decide to change it without the need).  \nFor exaple, if you want to build the project in the `RELEASE` mode with `SYMCODESUMV2` function, you can simply run\n\n```bash\nmake\n```\n\n#### Running\nYou can run `ht_fdict` with\n\n```bash\nmake run MODE=\u003cmodename\u003e TEXT=\u003cfilename\u003e\n```\n\nIf you choose not to use `TEXT` option, the program will use `Onegin.txt` file from the `Testfiles/` directory.\n`MODE` is set to `RELEASE` by default.  \nTherefore, if you want to run the program in the `RELEASE` mode with `Onegin.txt` file, simply type\n\n```bash\nmake run\n```\n\nAnother option is to run the program with `valgrind` (options are the same)\n\n```bash\nmake rund\n```\n\n...or run this binary with (from project root directory)\n\n```bash\n./Debug/ht_fdict \u003cfilename\u003e\n```\n\nWithout the `\u003cfilename\u003e` given the program will crash/display error message depending on the build `MODE`.\n\n#### Rebuilding\nTo totally rebuild the project run\n\n```bash\nmake clean\nmake MODE=\u003cmodename\u003e HASHFUNC=\u003chashfuncname\u003e\n```\n\n## Dependencies\nThis project actually depends on [`cpp_list`](https://github.com/nerett/cpp_list.git) and `libc` and building requires `make`, `g++` and `git` (it can also require `valgrind` installed to use `rund` target).\n\n#### Automated method\nIf you already have `ht_fdict` repo cloned, for many Unix-like oparating systems you can install all this things by running (it is runned with `sudo`, so it requires `sudo` to be installed)\n\n```bash\ncd ht_fdict/\nmake install-dependencies-all PACKAGEMANAGER=\u003cyour-package-manager-name\u003e\n```\n\n##### Debian/Ubuntu\n`apt` is set as default `PACKAGEMANAGER`. So, if you want to install full list of dependencies on Debian/Ubuntu-based OS, you can simply run\n\n```bash\nmake install-dependencies-all\n```\n\n##### Fedora/CentOS/RHEL\nHere is an example for rpm-based operating systems like Fedora/CentOS/RHEL:\n\n```bash\nmake install-dependencies-all PACKAGEMANAGER=dnf\n```\n\n#### Manual method\nDependencies can also be installed manually.\n\n##### Debian/Ubuntu\nFor Debian/Ubuntu-based OS run the following sequence:\n\n```bash\napt install git build-essential valgrind\ngit clone https://nerett/cpp_list.git\n```\n\n##### Fedora/CentOS/RHEL\n\n```bash\ndnf install git build-essential valgrind\ngit clone https://nerett/cpp_list.git\n```\n\nFor other operating systems check information about packages names and actual package manager used.\nIf you have already installed all dependencies required, you can now go to the [*Building from source*](https://github.com/nerett/ht_fdict#building-from-source) section.\n\n\n## Documentation\nThis section isn't done yet.\n\n## About project\nThis programm was written during MIPT **Ded's** cource.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnerett%2Fht_fdict","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnerett%2Fht_fdict","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnerett%2Fht_fdict/lists"}