Examples I found interesting:
Semantic map lambdas
S = Symbol(['apple', 'banana', 'cherry', 'cat', 'dog'])
print(S.map('convert all fruits to vegetables'))
# => ['carrot', 'broccoli', 'spinach', 'cat', 'dog']
comparison parameterized by context # Contextual greeting comparison
greeting = Symbol('Hello, good morning!')
similar_greeting = 'Hi there, good day!'
# Compare with specific greeting context
result = greeting.equals(similar_greeting, context='greeting context')
print(result) # => True
# Compare with different contexts for nuanced evaluation
formal_greeting = Symbol('Good morning, sir.')
casual_greeting = 'Hey, what\'s up?'
# Context-aware politeness comparison
politeness_comparison = formal_greeting.equals(casual_greeting, context='politeness level')
print(politeness_comparison) # => False
bitwise ops # Semantic logical conjunction - combining facts and rules
horn_rule = Symbol('The horn only sounds on Sundays.', semantic=True)
observation = Symbol('I hear the horn.')
conclusion = horn_rule & observation # => Logical inference
`interpret()` seems powerful.OP, what inspired you to make this? Where are you applying it? What has been your favorite use case so far?