{"id":25819022,"url":"https://github.com/pngo1997/inverted-index","last_synced_at":"2026-04-16T17:02:56.886Z","repository":{"id":229218378,"uuid":"776152984","full_name":"pngo1997/Inverted-Index","owner":"pngo1997","description":"Practices on Inverted Index algorithm.","archived":false,"fork":false,"pushed_at":"2025-01-31T19:12:11.000Z","size":1713,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T14:13:30.756Z","etag":null,"topics":["information-retrieval","inverted-index","natural-language-processing","python","query-processing","text-analysis","text-processing","tf-idf"],"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/pngo1997.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-03-22T19:38:14.000Z","updated_at":"2025-01-31T19:12:34.000Z","dependencies_parsed_at":"2024-03-22T20:45:11.012Z","dependency_job_id":"9289b2b4-75d3-4c9d-9ca0-ba1de8cbe9bc","html_url":"https://github.com/pngo1997/Inverted-Index","commit_stats":null,"previous_names":["pngo1997/inverted-index"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pngo1997/Inverted-Index","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pngo1997%2FInverted-Index","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pngo1997%2FInverted-Index/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pngo1997%2FInverted-Index/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pngo1997%2FInverted-Index/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pngo1997","download_url":"https://codeload.github.com/pngo1997/Inverted-Index/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pngo1997%2FInverted-Index/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31895650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T11:36:10.202Z","status":"ssl_error","status_checked_at":"2026-04-16T11:36:09.652Z","response_time":69,"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":["information-retrieval","inverted-index","natural-language-processing","python","query-processing","text-analysis","text-processing","tf-idf"],"created_at":"2025-02-28T08:14:24.474Z","updated_at":"2026-04-16T17:02:56.859Z","avatar_url":"https://github.com/pngo1997.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔍 Information Retrieval: Positional Index, TF-IDF, and Inverted Index  \n\n## 📜 Overview  \nThis project focuses on key **Information Retrieval (IR)** tasks, including:  \n1. **Positional Indexing** – Phrase query searching using a positional index.  \n2. **TF-IDF Weighting \u0026 Cosine Similarity** – Calculating term weights and identifying relevant documents.  \n3. **Inverted Index Construction** – Indexing TED Talk descriptions for efficient retrieval.  \n\n📌 **Datasets Used**:  \n- **Positional Index Sample Data** (Manually provided).  \n- **Document-Term Matrix** (For TF-IDF calculations).  \n- **TED Talks Dataset (`ted_main.csv`)** – Extracting and processing text descriptions.  \n\n📌 **Programming Language**: `Python 3`  \n📌 **Libraries Used**: `NLTK`, `NumPy`, `pandas`, `math`, `csv`  \n\n## 🏷️ 1️⃣ Positional Index \u0026 Phrase Query Matching  \n- **Queries Evaluated**:  \n  - `\"fools rush in\"`  \n  - `\"fools rush in\" AND \"angels fear to tread\"`  \n- **Task**: Identify matching documents and positions from a given **positional index**.  \n- **Issue Identified**: The index may have inconsistencies affecting search accuracy.  \n\n## 🔢 2️⃣ TF-IDF Computation \u0026 Cosine Similarity  \n- **Task**: Compute **TF-IDF** weights.\n- **Cosine Similarity**: Determine the most relevant document: cos(θ) = (A • B) / (||A|| ||B||)\n- **Goal**: Rank document similarity based on weighted term importance.\n\n## 🔎 3️⃣ Inverted Index Construction (TED Dataset)  \n- **Preprocessing**: Tokenization, Lowercasing, Stopword Removal, Stemming.  \n- **Index Output Files**:  \n1. `TED_term_index.csv` – Term-to-ID mapping with document frequency.  \n2. `TED_doc_index.csv` – Document-to-ID mapping (TED Talk URLs).  \n3. `TED_inverted_index.csv` – Term ID → (Doc ID, Term Frequency).  \n- **Query Processing**: Boolean AND retrieval for:  \n- `'climate' AND 'change'`  \n- `'climate' AND 'fuel'`  \n- `'artificial' AND 'intelligence'`  \n- `'giant' AND 'troll'`  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpngo1997%2Finverted-index","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpngo1997%2Finverted-index","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpngo1997%2Finverted-index/lists"}