{"id":24484488,"url":"https://github.com/dariodip/prefix-search","last_synced_at":"2025-04-13T18:08:42.418Z","repository":{"id":57600922,"uuid":"132011761","full_name":"dariodip/prefix-search","owner":"dariodip","description":"Implementation of LPRC and PSRC","archived":false,"fork":false,"pushed_at":"2019-09-24T16:04:02.000Z","size":3282,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T18:08:32.771Z","etag":null,"topics":["b-tree","compression-algorithm","string","trie","university-project"],"latest_commit_sha":null,"homepage":"","language":"Go","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/dariodip.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":"2018-05-03T15:03:21.000Z","updated_at":"2022-11-16T10:30:03.000Z","dependencies_parsed_at":"2022-08-25T17:41:49.393Z","dependency_job_id":null,"html_url":"https://github.com/dariodip/prefix-search","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/dariodip%2Fprefix-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariodip%2Fprefix-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariodip%2Fprefix-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariodip%2Fprefix-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dariodip","download_url":"https://codeload.github.com/dariodip/prefix-search/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248758421,"owners_count":21156957,"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":["b-tree","compression-algorithm","string","trie","university-project"],"created_at":"2025-01-21T13:14:56.819Z","updated_at":"2025-04-13T18:08:42.364Z","avatar_url":"https://github.com/dariodip.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prefix Search\n\n[![Build Status](https://travis-ci.com/dariodip/prefix-search.svg?token=NZ9VK4sB4UsVShV1p8wD\u0026branch=master)](https://travis-ci.com/dariodip/prefix-search)\n[![GoDoc](https://godoc.org/github.com/spf13/cobra?status.svg)](https://godoc.org/github.com/dariodip/prefix-search)\n[![Go Report Card](https://goreportcard.com/badge/github.com/dariodip/prefix-search)](https://goreportcard.com/report/github.com/dariodip/prefix-search)\n\n\nprefix-search is an implementation of the [paper](https://link.springer.com/chapter/10.1007/978-3-642-40450-4_40) *Compressed Cache-Oblivious String B-tree* of Paolo Ferragina and Rossano Venturini. We developed the proposed algorithm (LPRC) and a new one (PSRC), giving you the ability to deal with online dictionaries of strings in an unspecified order.\n\n## Getting Started\n\nWith these instructions, you will get a copy of the project up and running on your local machine for development and testing purposes.\n\n### Prerequisites\nYou need [make](https://www.gnu.org/software/make/) and [Golang](https://golang.org/) installed in order to run all the command listed next. \n\nYou also need [Python 3](https://www.python.org/) to run our scripts.\n\n### Installing\n\nIn order to install all the required dependencies, in the project root directory run the following:\n```\nmake install\n```\n\nIn order to create an executable, in the project root directory run the followings:\n```\nmake build\n```\nthis will install all the dependencies, run all the tests and create an executable inside your `$GOPATH/bin` directory.\n\n## Release\nIf you want to create an executable for a specific platform, run the following:\n```\nmake [VERSION=\u003cversion\u003e] \u003cplatforms\u003e\n```\nwhere the platforms are `windows`, `linux` and `darwin`. If not specified, the value of the parameter `VERSION` will be\n`vlatest`.\n\nIf you want to create an executable for each platform, then simply run:\n```\nmake [VERSION=\u003cversion\u003e] release\n```\n## Usage\nPrefix search can be used with 4 commands:\n* **console**: \n```\nprefix-search console --help                                                                12:35   08.06.18 \nUsing \"console\" you can start an interactive console that gives you the opportunity\nto, given a preloaded dataset, to find prefixes interactively.\n\nUsage:\n  prefix-search console [flags]\n\nFlags:\n  -a, --algorithm string    Algorithmto use (default \"lprc\")\n  -e, --epsilon float       Epsilon is the parametergiven to the algorithm in order to decide how many bits compress in the trie.\n  -h, --help                help for console\n  -i, --input_file string   Input file containing all the word to build up the dictionary.\n```\n* **lprc**:\n```\nprefix-search lprc --help\nlprc (Locality Preserving Rear Coding) is an algorithm designed by Paolo Ferragina and Rossano Venturini\nin their paper \"Compressed Cache-Oblivious String B-Tree\". \n\nOur implementation takes in input: \n\t- a file containing all the worlds to add to the dictionary (-i);\n\t- a file containing all the prefixes to search on the built dictionary (-p).\n\t- the epsilon to use in order to build our structure\n\nAll the results will be saved into a json file.\n\nUsage:\n  prefix-search lprc [flags]\n\nFlags:\n  -e, --epsilon float         Epsilon is the parametergiven to the algorithm in order to decide how many bits compress in the trie.\n  -h, --help                  help for lprc\n  -i, --input_file string     Input file containing all the word to build up the dictionary.\n  -p, --input_p_file string   Input file containing all the prefix to search on the dictionary.\n  -o, --output_file string    Output file containing the final output of lprc, with information about the memory usage and the time elapsed.\n                              Default \u003cword filename\u003e-\u003cprefix file name\u003e-\u003cepsilon\u003e.json\n  -v, --verbose               Detailed Output\n```\n* **psrc**:\n```\nprefix-search psrc --help \npsrc (Prefix-Suffix Rear Coding) is an algorithm designed by Mattia Tomeo and Dario Di Pasquale, \ninspired by the paper \"Compressed Cache-Oblivious String B-Tree\". \n\nOur implementation takes in input two files: \n\t- a file containing all the worlds to add to the dictionary (-i);\n\t- a file containing all the prefixes to search on the built dictionary (-p).\n\nAll the results will be saved into a json file.\n\nUsage:\n  prefix-search psrc [flags]\n\nFlags:\n  -e, --epsilon float         Epsilon is the parametergiven to the algorithm in order to decide how many bits compress in the trie.\n  -h, --help                  help for psrc\n  -i, --input_file string     Input file containing all the word to build up the dictionary\n  -p, --input_p_file string   Input file containing all the prefix to search on the dictionary\n  -o, --output_file string    Output file containing the final output of lprc, with information about the memory usage and the time elapsed.\n                              Default \u003cword filename\u003e-\u003cprefix file name\u003e-\u003cepsilon\u003e.json\n  -v, --verbose               Detailed Output\n```\n* **fullbenchmark**:\n```\nprefix-search fullbenchmark --help\nThis command gives you the ability to run a sophisticated benchmarking test.\nYou can select the file to open as dataset, the file to open as prefix, the lower value\nof epsilon, the higher value of epsilon and the step with which increase the value of it.\n\nThe test gives you only a JSON file containing all the results of the test.\n\nUsage:\n  prefix-search fullbenchmark [flags]\n\nFlags:\n  -a, --algorithm string      Algorithmto use (default \"lprc\")\n  -h, --help                  help for fullbenchmark\n  -i, --input_file string     Input file containing all the word to build up the dictionary.\n  -p, --input_p_file string   Input file containing all the prefix to search on the dictionary.\n  -x, --max_epsilon float     Maximum value of Epsilon: the parameter given to the algorithm in order to decide how many bits compress in the trie.\n  -n, --min_epsilon float     Minimum value of Epsilon: the parameter given to the algorithm in order to decide how many bits compress in the trie.\n  -o, --output_file string    Output file containing the final output of lprc, with information about the memory usage and the time elapsed.\n                              Default \u003calgorithm\u003e-\u003cword filename\u003e-\u003cprefix file name\u003e-\u003cmin_epsilon\u003e-\u003cmax_epsilon\u003e.json\n  -s, --step float            Step value with which increment the value of epsilon\n  -v, --verbose               Detailed Output\n```\n## Running the tests\n\nAll the test are built using the package [testing](https://golang.org/pkg/testing/).\n\nTo execute all our tests, run the following\n```\nmake test\n```\n\n## Scripts\n\nIn our project we have implemented some utility scripts:\n* **resources/generate_dataset.py** - create word datasets of different size from the single dataset **words.txt**\n## Built With\n\n* [Golang](https://golang.org/)\n\n## Authors\n\n* [**Dario Di Pasquale**](https://github.com/dariodip)\n* [**Mattia Tomeo**](https://github.com/mattiatomeo)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdariodip%2Fprefix-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdariodip%2Fprefix-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdariodip%2Fprefix-search/lists"}