How calebscott0/text-indexer works
text-indexer is a command-line tool that builds a word-to-file-and-line index from named text files, then lets a user search that index interactively. The main workflow selects either an AVL-tree or hash-table backend, tokenizes input, filters stop words, records locations, and prints matches. The README is only a title; the sampled source shows the core flow and both backends, but does not establish additional product capabilities.
Main entry points: main.c CLI Workflow · index.c Index Facade · avl.c AVL Backend · hash.c Hash Backend
Components 9
Indexing and Search
- CLI Workflow
src/main.c - Tokenization
src/token.c - Stop-word Filter
src/main.c - Index Facade
src/index.c
Index Backends
- AVL Backend
src/avl.c - Hash Backend
src/hash.c
Location Storage
- Location Records
src/utils.c
Other components
- User
- Input Files
Connections 10
- User → CLI Workflow: selects and searches
src/main.c - Input Files → CLI Workflow: provides text
src/main.c - CLI Workflow → Tokenization: reads tokens
src/main.c - CLI Workflow → Stop-word Filter: checks tokens
src/main.c - CLI Workflow → Index Facade: inserts, searches, clears
src/main.c - Index Facade → AVL Backend: dispatches tree operations
src/index.c - Index Facade → Hash Backend: dispatches hash operations
src/index.c - AVL Backend → Location Records: creates and updates records
src/avl.c - Hash Backend → Location Records: creates and updates records
src/hash.c - Index Facade → User: prints matches
src/index.c