Comments (4)
I'm having a very similar issue, with a 'findall' query working correctly when called in the PL console, but returning a list of atoms instead of values when called from pyswip:
{'PROFILE': [Atom('7248900'), Atom('7249412'), Atom('7249796')]}
Has there been any progress on this?
from pyswip.
OK, got it, it has to to with how Atoms are rendered by Python when submitted to print()...
from pyswip.
I modified easy.py as follows:
def repr(self):
return str(self.chars.decode("utf-8"))
Now the above query returns:
{'PROFILE': [conf_cscw_jeffaylmss92, conf_ht_shackelfordss93, conf_ht_smiths91]}
from pyswip.
@hits-nlp The updated code for pyswip is at: https://github.com/yuce/pyswip/tree/refactor It is currently missing (a lot of) things, but the working parts should be more robust. Depending on your use case, it may work better.
from pyswip.
Related Issues (20)
- Errors on queries
- Powered by PySwip HOT 2
- Swipl DCG does not appear to function HOT 1
- Problem running the quick test code on Windows 11 HOT 2
- Compatibility with Mac M1 chip HOT 6
- How to clean prolog ?
- Error with SWI-Prolog v8.5.3 and pyswipl 0.2.10
- Error by using char '¬' as operator in prolog and translate it with pyswip
- pyswip cannot work with flask HOT 1
- Operating with dictionaries in pyswip
- Please provide support for M1 Macs HOT 2
- Core dump HOT 9
- pyswip incompatible with swi-prolog 9.0.0? HOT 6
- Could not find the SWI-Prolog library in this platform. HOT 3
- efficient way of adding and removing facts
- How do I use prolog's debug/trace mode in python HOT 1
- Reviewers
- Redefined static procedure after clearing Prolog() object HOT 1
- Problem in representing incomplete structures
- Powered by Pyswip HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyswip.