Closed abd-als closed 1 month ago
Hey! Sorry for the late reply. There was a subtle bug, which we fixed in the meantime. Please pull latest main
and use as follows:
from symai import Symbol
s1 = Symbol('The horn only sounds on Sundays.', only_nesy=True)
s2 = Symbol('I hear the horn.')
print(s1 & s2) # or |
The first symbol (in the above case that's s1
) must have the only_nesy
flag set to True
for the logical operators. Without going into detail for why we did this, the tl'dr is that we didn't find a better way in python to do meta-overloading. Without this flag, the logical operators default to string concatenation. For us, having syntactic sugar for concatenation is important, such as being able to use operators like 'A' & 'B' & 'C'
to produce 'ABC'
or 'A' | 'B' | 'C'
to result in 'A B C '
.
Please confirm it's working on your end as well.
Due to innactivity.
hello, It still gives out the same output
I'm not sure what's the issue. It could be that the jupyter state messes something up.
On my machine on latest main:
Im trying to use the expressions interpret and expression but it doesnt seem to work.
The actual output should be : <class 'symai.expressions.Symbol'>(value=It is Sunday.)
What I get is "(value=The horn only sounds on Sundays.I hear the horn.)" which just adds them together the Reasoning part is not working.