Add a subject search mode (options.subject = true) backed by a curated subject graph: each node groups related Arabic lemmas/roots by theme (weather, emotions, family, worship, etc.).
search('climate', { /* ... */ subjectMap }, { subject: true });
// returns verses containing أمطار، رياح، عواصف، بروق، رعد، سحاب ...
Files / Links:
Content:
Today, semantic search in src/core/layers/semantic-search.ts only expands to a flat list of synonyms from src/data/semantic.json. Searching for "climate" returns nothing because the engine has no concept of themes — rain, wind, tornadoes are not connected.
Add a subject search mode (options.subject = true) backed by a curated subject graph: each node groups related Arabic lemmas/roots by theme (weather, emotions, family, worship, etc.).
Requirements:
-New loader loadSubjectData() exported from src/index.ts.
Example:
https://github.com/adelpro/quran-search-engine/blob/main/src/core/layers/semantic-search.ts
https://github.com/adelpro/quran-search-engine/blob/main/src/data/semantic.json
https://github.com/adelpro/quran-search-engine/blob/main/src/utils/loader.ts
https://github.com/adelpro/quran-search-engine/blob/main/src/types/index.ts
https://github.com/adelpro/quran-search-engine/blob/main/src/core/search.ts
https://github.com/adelpro/quran-search-engine/blob/main/src/index.ts
https://github.com/adelpro/quran-search-engine/blob/main/README.md