{"id":22234860,"url":"https://github.com/gre1wy/oaa","last_synced_at":"2025-03-25T09:23:29.265Z","repository":{"id":274937134,"uuid":"873307513","full_name":"gre1wy/OAA","owner":"gre1wy","description":"KPI IPT course, 5 semester","archived":false,"fork":false,"pushed_at":"2024-12-17T18:57:06.000Z","size":513,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T08:43:09.451Z","etag":null,"topics":["db","inverted-index","lexer","parser"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gre1wy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-10-16T00:17:28.000Z","updated_at":"2025-01-27T12:08:03.000Z","dependencies_parsed_at":"2025-01-30T08:43:11.280Z","dependency_job_id":"ece8ed1f-e342-4497-9848-a6a8ae902687","html_url":"https://github.com/gre1wy/OAA","commit_stats":null,"previous_names":["gre1wy/oaa"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gre1wy%2FOAA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gre1wy%2FOAA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gre1wy%2FOAA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gre1wy%2FOAA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gre1wy","download_url":"https://codeload.github.com/gre1wy/OAA/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245432551,"owners_count":20614340,"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":["db","inverted-index","lexer","parser"],"created_at":"2024-12-03T02:09:56.388Z","updated_at":"2025-03-25T09:23:29.245Z","avatar_url":"https://github.com/gre1wy.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Algorithm Analysis Foundations\n\n# Text Collection Management System\n\n## Overview\n\nThis is a console-based program that allows users to manage a collection of text documents and perform efficient full-text search using an inverted index data structure\n\n## Features\n\nThe program supports the following commands:\n\n1. **CREATE `\u003ccollection_name\u003e;`** - Creates a new collection with the specified name.\n2. **INSERT `\u003ccollection_name\u003e \"\u003cdocument\u003e\";`** - Adds a new document to the specified collection.\n3. **PRINT_INDEX `\u003ccollection_name\u003e;`** - Prints the internal structure of the inverted index built for the specified collection.\n4. **SEARCH `\u003ccollection_name\u003e [WHERE \u003cquery\u003e];`** - Searches for documents in the specified collection that match the given query. The query can be:\n    - `\"\u003ckeyword\u003e\"` - Finds documents containing the specified keyword.\n    - `\"\u003ckeyword_1\u003e\" - \"\u003ckeyword_2\u003e\"` - Finds documents containing any word between `\u003ckeyword_1\u003e` and `\u003ckeyword_2\u003e` (inclusive).\n    - `\"\u003ckeyword_1\u003e\" \u003cN\u003e \"\u003ckeyword_2\u003e\"` - Finds documents where `\u003ckeyword_1\u003e` and `\u003ckeyword_2\u003e` are exactly `N` words apart, regardless of their positions and order.\n\n## Implementation Details\n\nThe program is implemented using the following components:\n\n1. **Lexer (`lexer.py`)**: Responsible for tokenizing the input text into a sequence of tokens (e.g., keywords, identifiers, quoted strings).\n2. **Parser (`parser.py`)**: Parses the sequence of tokens and executes the corresponding commands.\n3. **Inverted Index (`invertedIndex.py`)**: Implements the inverted index data structure, which maps words to the documents they appear in and their positions within those documents.\n4. **Database (`invertedIndex.py`)**: Manages the collections of documents and their associated inverted indexes.\n5. **Main Entry Point (`main.py`)**: Provides the command-line interface and coordinates the interaction between the other components.\n\n## Usage\n...\n## Error Handling\n\nThe program is designed to detect and handle various error situations, such as:\n\n- Incorrect syntax of commands\n- Attempting to create a collection with a name that is already in use\n- Attempting to execute a command on a non-existent collection\n\nWhen an error occurs, the program will output an appropriate error message to the user.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgre1wy%2Foaa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgre1wy%2Foaa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgre1wy%2Foaa/lists"}