How hamzarezig/search-engine works
This is a desktop information-retrieval application: users search a corpus of PDF, TXT, HTML, and DOCX documents through a Tkinter interface, then inspect ranked results, excerpts, and index statistics. The runtime workflow loads a cached index or extracts and preprocesses documents, computes TF-IDF, and executes Boolean or scored searches using selectable models. The graph reflects the shown CLI, indexing, search, and interface code; document formats and several UI actions are visible, but unsampled interface code limits some interaction details.
Main entry points: index_util.py Index manager · recherche.py Search engine · main.py CLI launcher · interface.py Desktop interface
Components 15
Application entry
- CLI launcher
main.py - Document corpus
documents
Index construction
- Index manager
index_util.py - Text extraction
utils/etape1_pdf.py - Stopword removal
utils/etape2_stopwords.py - Word stemming
utils/etape3_stemming.py - TF calculation
utils/etape4_tf.py - IDF calculation
utils/etape5_idf.py - TF-IDF calculation
utils/etape6_tfidf.py - Index cache
index.pkl
Search and ranking
- Search engine
recherche.py - Boolean operators
operateurs/__init__.py - Ranking models
modeles/__init__.py
User interface
- Desktop interface
interface.py
Other components
- User
Connections 19
- User → CLI launcher: launches
main.py - CLI launcher → Index manager: loads or builds
main.py - CLI launcher → Desktop interface: opens
main.py - Index manager → Document corpus: scans
index_util.py - Index manager → Text extraction: extracts text
index_util.py - Index manager → Stopword removal: filters terms
index_util.py - Index manager → Word stemming: stems terms
index_util.py - Index manager → TF calculation: computes TF
index_util.py - Index manager → IDF calculation: computes IDF
index_util.py - Index manager → TF-IDF calculation: computes TF-IDF
index_util.py - Index manager → Index cache: reads or writes
index_util.py - Desktop interface → Search engine: submits queries
interface.py - Desktop interface → Index manager: reindexes or inspects
interface.py - Search engine → Stopword removal: filters query
recherche.py - Search engine → Word stemming: stems query
recherche.py - Search engine → TF calculation: computes query TF
recherche.py - Search engine → TF-IDF calculation: weights query
recherche.py - Search engine → Boolean operators: evaluates Boolean
recherche.py - Search engine → Ranking models: scores documents
recherche.py