Class ConceptRegistry
java.lang.Object
org.ek9lang.assist.ConceptRegistry
Immutable registry of concept nodes with forward and reverse indexes.
Provides weighted query expansion for -q and keyword suggestions for -h.
Pre-computed at construction time for sub-millisecond query-time performance.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for constructing a ConceptRegistry.static final recordA hit linking a term to its containing concept and ring distance. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConceptRegistryCreate the default registry with all concept nodes.expandTokens(Set<String> inputTokens) Expand input tokens using concept associations.findConcepts(String term) Find all concepts that contain a term, with ring distance.suggestEk9Keywords(String term) Suggest EK9 keywords/types related to a term.
-
Method Details
-
createDefault
Create the default registry with all concept nodes. -
expandTokens
Expand input tokens using concept associations. Depth-adaptive: fewer input tokens allow broader expansion. Returns a map of term to maximum ring weight across all matching concepts.- Parameters:
inputTokens- the tokenized query terms- Returns:
- weighted token map (original tokens get weight 1.0)
-
suggestEk9Keywords
-
findConcepts
Find all concepts that contain a term, with ring distance.
-