Class QuestionRegistry
java.lang.Object
org.ek9lang.assist.QuestionRegistry
Central registry for all Q&A pairs.
Provides lookup by ID and category-grouped listing.
Precomputes BM25F index data (IDF values and average field lengths)
at construction time for efficient query-time scoring.
Populated from .ek9 resource files via Ek9QaFileLoader.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic QuestionRegistryCreate a registry from all .ek9 QA resource files.getAll()double[]Average token count per BM25F field across the corpus.getById(int id) getForCategory(String category) Precomputed IDF (inverse document frequency) values for all tokens in the corpus.intsize()
-
Field Details
-
NUM_FIELDS
static final int NUM_FIELDS- See Also:
-
-
Constructor Details
-
QuestionRegistry
-
-
Method Details
-
createDefault
Create a registry from all .ek9 QA resource files. -
getAll
-
getByCategory
-
getForCategory
-
getById
-
size
public int size() -
getIdfMap
-
getAvgFieldLengths
public double[] getAvgFieldLengths()Average token count per BM25F field across the corpus. Field order: keywords, question text, alternates, answer text, migration context.
-