Dontopedia

apply_contextual_expansion

From Dontopedia, the open, paraconsistent wiki. (Last updated 2026-06-10.)

apply_contextual_expansion has 50 facts recorded in Dontopedia across 4 references, with 8 live disagreements.

50 facts·31 predicates·4 sources·8 in dispute

Mostly:uses(5), rdf:type(4), returns(3)

Maturity scale raw canonical shape-checked rule-derived certified

Inbound mentions (12)

Other subjects in dontopedia point AT this entity as a value. These are inverse relationships — e.g. "X motherOf this subject" — and answer questions the forward facts can't. Grouped by predicate.

hasMethodHas Method(4)

callsCalls(1)

callsInOrderCalls in Order(1)

callsMethodCalls Method(1)

chainsTechniqueChains Technique(1)

describesDescribes(1)

invokesInvokes(1)

isUsedByIs Used by(1)

usedInUsed in(1)

Other facts (47)

The long tail: predicates that appear too rarely to warrant their own section. Filter or scroll to find a specific one. Each row links to its source.

47 facts
PredicateValueRef
UsesRe Sub[1]
UsesWord Boundary[1]
UsesWord Boundary Regex[1]
UsesRe Escape in Sub[1]
UsesRe Sub Function[1]
Rdf:typeMethod[1]
Rdf:typeMethod[2]
Rdf:typePython Method[3]
Rdf:typeMethod[4]
ReturnsQuery[1]
ReturnsQuery[3]
ReturnsQuery[4]
Uses VariableContextual Expansions[2]
Uses VariableContext[3]
Uses VariableExpansion[3]
Has ParameterQuery Parameter[3]
Has ParameterSelf[4]
Has ParameterQuery[4]
Uses RegexWord Boundary Pattern[1]
Uses RegexWord Boundary[3]
Uses FunctionRe Sub[3]
Uses FunctionRe Escape[3]
Iteration VariablesContext[4]
Iteration VariablesExpansion[4]
ParameterQuery[1]
IteratesContextual Expansions[1]
Is Called byRewrite Query[1]
Loops OverContextual Expansions Dictionary[1]
ModifiesQuery Parameter[1]
Implemented inQuery Rewriter[2]
Opposite ofContext Literal Expansion[2]
Is Method ofQuery Rewriter[2]
Invoked byExpand Query[2]
Access LevelPrivate Method[2]
Transformation TypeSemantic Expansion[2]
Uses LibraryRe Module[3]
Iterates OverContextual Expansions Items[3]
PerformsText Substitution[3]
EnsuresExact Word Match[3]
Uses Regex Word BoundaryWord Boundary Assertion[3]
Uses Regex EscapingSpecial Character Handling[3]
Uses AttributeContextual Expansions[4]
Purposeexpand context-specific terms[4]
Regex Boundaryword-boundary[4]
Regex FunctionRe Sub[4]
Regex Pattern Constructionword-boundary + escaped-context + word-boundary[4]
Iteration TargetContextual Expansions Items[4]

Timeline

Timeline axis is valid_time — when each source says the fact was true in the world, not when Dontopedia learned about it. Retracted rows are kept for provenance; coloured stripes indicate the context kind.

typebeam/730c48fc-40c0-4bb9-aa45-3ee6f2bdd32c
ex:Method
parameterbeam/730c48fc-40c0-4bb9-aa45-3ee6f2bdd32c
ex:query
iteratesbeam/730c48fc-40c0-4bb9-aa45-3ee6f2bdd32c
ex:contextual-expansions
usesbeam/730c48fc-40c0-4bb9-aa45-3ee6f2bdd32c
ex:re-sub
usesbeam/730c48fc-40c0-4bb9-aa45-3ee6f2bdd32c
ex:word-boundary
returnsbeam/730c48fc-40c0-4bb9-aa45-3ee6f2bdd32c
ex:query
usesbeam/730c48fc-40c0-4bb9-aa45-3ee6f2bdd32c
ex:word-boundary-regex
usesbeam/730c48fc-40c0-4bb9-aa45-3ee6f2bdd32c
ex:re-escape-in-sub
labelbeam/730c48fc-40c0-4bb9-aa45-3ee6f2bdd32c
apply_contextual_expansion
isCalledBybeam/730c48fc-40c0-4bb9-aa45-3ee6f2bdd32c
ex:rewrite-query
usesbeam/730c48fc-40c0-4bb9-aa45-3ee6f2bdd32c
ex:re-sub-function
usesRegexbeam/730c48fc-40c0-4bb9-aa45-3ee6f2bdd32c
ex:word-boundary-pattern
loopsOverbeam/730c48fc-40c0-4bb9-aa45-3ee6f2bdd32c
ex:contextual-expansions-dictionary
modifiesbeam/730c48fc-40c0-4bb9-aa45-3ee6f2bdd32c
ex:query-parameter
typebeam/ea0e817a-1408-493e-bbcf-6f0c90a888ee
ex:Method
labelbeam/ea0e817a-1408-493e-bbcf-6f0c90a888ee
apply_contextual_expansion
implementedInbeam/ea0e817a-1408-493e-bbcf-6f0c90a888ee
ex:query-rewriter
usesVariablebeam/ea0e817a-1408-493e-bbcf-6f0c90a888ee
ex:contextual-expansions
oppositeOfbeam/ea0e817a-1408-493e-bbcf-6f0c90a888ee
ex:context-literal-expansion
isMethodOfbeam/ea0e817a-1408-493e-bbcf-6f0c90a888ee
ex:query-rewriter
invokedBybeam/ea0e817a-1408-493e-bbcf-6f0c90a888ee
ex:expand-query
accessLevelbeam/ea0e817a-1408-493e-bbcf-6f0c90a888ee
ex:private-method
transformationTypebeam/ea0e817a-1408-493e-bbcf-6f0c90a888ee
ex:semantic-expansion
typebeam/ac826f8e-c61d-42f2-a68f-f348f50ad7c5
ex:PythonMethod
hasParameterbeam/ac826f8e-c61d-42f2-a68f-f348f50ad7c5
ex:query-parameter
usesVariablebeam/ac826f8e-c61d-42f2-a68f-f348f50ad7c5
ex:context
usesVariablebeam/ac826f8e-c61d-42f2-a68f-f348f50ad7c5
ex:expansion
usesLibrarybeam/ac826f8e-c61d-42f2-a68f-f348f50ad7c5
ex:re-module
returnsbeam/ac826f8e-c61d-42f2-a68f-f348f50ad7c5
ex:query
usesFunctionbeam/ac826f8e-c61d-42f2-a68f-f348f50ad7c5
ex:re-sub
usesFunctionbeam/ac826f8e-c61d-42f2-a68f-f348f50ad7c5
ex:re-escape
iteratesOverbeam/ac826f8e-c61d-42f2-a68f-f348f50ad7c5
ex:contextual-expansions-items
usesRegexbeam/ac826f8e-c61d-42f2-a68f-f348f50ad7c5
ex:word-boundary
performsbeam/ac826f8e-c61d-42f2-a68f-f348f50ad7c5
ex:text-substitution
ensuresbeam/ac826f8e-c61d-42f2-a68f-f348f50ad7c5
ex:exact-word-match
usesRegexWordBoundarybeam/ac826f8e-c61d-42f2-a68f-f348f50ad7c5
ex:word-boundary-assertion
usesRegexEscapingbeam/ac826f8e-c61d-42f2-a68f-f348f50ad7c5
ex:special-character-handling
typebeam/7b4bf2e3-60c1-4558-933c-d63455859bde
ex:Method
labelbeam/7b4bf2e3-60c1-4558-933c-d63455859bde
apply_contextual_expansion
hasParameterbeam/7b4bf2e3-60c1-4558-933c-d63455859bde
ex:self
hasParameterbeam/7b4bf2e3-60c1-4558-933c-d63455859bde
ex:query
usesAttributebeam/7b4bf2e3-60c1-4558-933c-d63455859bde
ex:contextual-expansions
purposebeam/7b4bf2e3-60c1-4558-933c-d63455859bde
expand context-specific terms
regexBoundarybeam/7b4bf2e3-60c1-4558-933c-d63455859bde
word-boundary
regexFunctionbeam/7b4bf2e3-60c1-4558-933c-d63455859bde
ex:re-sub
iterationVariablesbeam/7b4bf2e3-60c1-4558-933c-d63455859bde
ex:context
iterationVariablesbeam/7b4bf2e3-60c1-4558-933c-d63455859bde
ex:expansion
regexPatternConstructionbeam/7b4bf2e3-60c1-4558-933c-d63455859bde
word-boundary + escaped-context + word-boundary
returnsbeam/7b4bf2e3-60c1-4558-933c-d63455859bde
ex:query
iterationTargetbeam/7b4bf2e3-60c1-4558-933c-d63455859bde
ex:contextual-expansions-items

References (4)

4 references
  1. ctx:claims/beam/730c48fc-40c0-4bb9-aa45-3ee6f2bdd32c
    • full textbeam-chunk
      text/plain1 KBdoc:beam/730c48fc-40c0-4bb9-aa45-3ee6f2bdd32c
      Show excerpt
      query = self.sanitize_query(query) query = self.apply_keyword_substitution(query) query = self.apply_pattern_matching(query) query = self.apply_contextual_expansion(query) return query def saniti
  2. ctx:claims/beam/ea0e817a-1408-493e-bbcf-6f0c90a888ee
    • full textbeam-chunk
      text/plain1 KBdoc:beam/ea0e817a-1408-493e-bbcf-6f0c90a888ee
      Show excerpt
      # Example usage: rewriter = QueryRewriter() query = "SELECT * FROM table WHERE condition AND column = value" rewritten_query = rewriter.rewrite_query(query) print(f"Rewritten Query: {rewritten_query}") ``` ### Explanation 1. **Keyword Sub
  3. ctx:claims/beam/ac826f8e-c61d-42f2-a68f-f348f50ad7c5
    • full textbeam-chunk
      text/plain1 KBdoc:beam/ac826f8e-c61d-42f2-a68f-f348f50ad7c5
      Show excerpt
      def apply_contextual_expansion(self, query): for context, expansion in self.contextual_expansions.items(): query = re.sub(r'\b' + re.escape(context) + r'\b', expansion, query) return query def process_qu
  4. ctx:claims/beam/7b4bf2e3-60c1-4558-933c-d63455859bde
    • full textbeam-chunk
      text/plain1 KBdoc:beam/7b4bf2e3-60c1-4558-933c-d63455859bde
      Show excerpt
      raise QueryParseError(f"Error rewriting query: {query} - {e}") def expand_query(self, query): query = self.sanitize_query(query) query = self.apply_keyword_substitution(query) query = self.apply_patt

See also

Keep researching

Missing something or suspicious of what's here? Kick off a research session — a Claude agent will investigate, cite its sources, and file new facts into a dedicated context you can review before accepting into the shared view.