How omar-khecharem/indexation-recherche-information works
This repository is a set of progressively developed information-retrieval practicals, not a single integrated search service. Its runnable workflow loads a document collection, preprocesses text, builds or uses an inverted index, and searches by term or intersection; TP3 adds TF-IDF statistics and document vectors. The README also describes query vectors, cosine scoring, ranking, and interactive Top-K search, but those stages are not present in the sampled TP3 excerpt, so their implementation links are omitted. The graph reflects only shown calls and documented capabilities.
Main entry points: TP3.py Enriched index · TP 1.py TP1 document loader · documents.tsv TSV collections · TP2.py TP2 postings
Components 22
Document input
- TSV collections
documents.tsv
Basic retrieval
- TP1 document loader
TP 1.py - TP2 postings
TP2.py - Tokenize and filter
TP 1.py - Naive term search
TP 1.py - Inverted index
TP 1.py - Term lookup
TP 1.py - Posting intersection
TP 1.py - Skip intersection
TP2.py
Vector ranking
- TP3 document loader
TP3.py - TP3 preprocessing
TP3.py - Enriched index
TP3.py - DF and IDF
TP3.py - TF-IDF weights
TP3.py - Vocabulary
TP3.py - Document vectors
TP3.py - Query vectors
- Cosine similarity
- Ranking and Top-K
- Interactive search
- Search results
Other components
- User
Connections 27
- User → Naive term search: enters term
TP 1.py - User → Posting intersection: enters terms
TP 1.py - User → Skip intersection: enters terms
TP2.py - TSV collections → TP1 document loader: read by
TP 1.py - TSV collections → TP2 postings: opened by
TP2.py - TP1 document loader → Naive term search: searches
TP 1.py - TP1 document loader → Tokenize and filter: preprocesses
TP 1.py - Tokenize and filter → Inverted index: provides terms
TP 1.py - TP1 document loader → Inverted index: builds
TP 1.py - Inverted index → Term lookup: queries postings
TP 1.py - Inverted index → Posting intersection: supplies postings
TP 1.py - TP2 postings → Skip intersection: supplies postings
TP2.py - TP3 document loader → TP3 preprocessing: preprocesses
TP3.py - TP3 preprocessing → Enriched index: provides terms
TP3.py - TP3 document loader → Enriched index: builds
TP3.py - Enriched index → DF and IDF: supplies DF
TP3.py - Enriched index → TF-IDF weights: supplies TF
TP3.py - DF and IDF → TF-IDF weights: provides IDF
TP3.py - Enriched index → Vocabulary: provides terms
TP3.py - Vocabulary → Document vectors: defines dimensions
TP3.py - TF-IDF weights → Document vectors: weights terms
TP3.py - Document vectors → Cosine similarity: compared with query
README.md - Query vectors → Cosine similarity: scored against
README.md - Cosine similarity → Ranking and Top-K: ranks scores
README.md - Ranking and Top-K → Search results: returns
README.md - User → Interactive search: enters query
README.md - Interactive search → Ranking and Top-K: requests ranking
README.md