Looking for semantic web tools I found
Are there other resources for the semantic web in pharo? smalltalk? Norbert
|
What did happen to Helvetia? Sorry if I am an ignorant here but I think language boxes in Pharo; to interac, remarkably with Prolog, would be definitely a plus for semantic web development in Smalltalk. Cheers 2013/9/25 Norbert Hartl <[hidden email]>
|
Am 25.09.2013 um 13:02 schrieb Jesus Nuñez <[hidden email]>: Sounds interesting. Can you elaborate on that? How could all of those mentioned support the semantic web? [1] Norbert
|
I'll try to elaborate but what I can say is only from my limited perspective. You can take it as an incomplete argument that needs much refinement, but could however serve as a seed for an upcoming idea.
Search: After all we can see the entire web as a large graph which we seek to traverse, looking for information. First-order logic is the most neutral and natural way of representing the web. With facts and rules that convolve to derive new conclusions, logic is perhaps the most compact way of representing pretty much any kind of relationships. Think of a model for a situation that would accept a query as below with some facts and rules governing the dynamics of the underlying world: "Give me all restaurants in the city where someone whose name is Laura has been a client at least once per month during the last 3 months and whose has always paid with credit card"
My opinions are based on the power of tools in Pharo, such as the moose family for data visualization and related stuff and of course Seaside, together with Prolog first order logic syntax, unification, backtracking capabilities, and search based on a sound resolution method. In the case of the use of Prolog for the semantic web, see for instance http://attempto.ifi.uzh.ch/site. Prolog counts also with mature semantic web packages http://www.swi-prolog.org/web/ that handles the semantic web RDF model naturally. For instance have a look at http://www.semanticweb.gr/topos/. In this very application you may also discover how Pharo can naturally fit in a similar application.
In a personal attempt (indeed it is part of my master thesis); since I am in Pharo 1.4, I wanted to emulate the helvetia language boxes, to create rules in Pharo and interact with Prolog as in the example below for a SQL language box,
rows := SELECT * FROM users WHERE username = @(aString ~= /\s*(\w+)\s*/) I created a parser in PetitParser for Prolog, however It was too much work to create something as the above from scratch (also somewhat involved is to handle operator declaration in Prolog) and finally I end up with a tool for imposing only queries to Prolog and retrive the results in a JSON dictionary using SocketStream for RPC handling and NeoJSONReader to read the JSON contents from the stream.
Just for reference, it looks as follows, Transcript open. stream := SocketStream openConnectionToHostNamed: 'localhost' port: 31415.
[ text:='{"method":"query", "params": ["owns_Zebra(O,X)"], "id":0}'. stream nextPutAll:text; flush.
Transcript cr; show:(stream upToEnd). ] ensure: [ stream close ] map := (NeoJSONReader on: (result contents) readStream ) next. Again, it is only my limited view, and I am only starting to understand the fundamentals of semantic web but I think it is not a bad idea to create a productive conjunction of this two wonderful worlds. So please don't blame on me if I am wrong in all of my thoughs, Cheers, Jesus
2013/9/25 Norbert Hartl <[hidden email]>
|
this sounds very much like a Squeak effort of mine in 1996 ;-) Have you looked at SOUL and Qsoul-era code of Roel Wuyts ? Some of that code was VW and Squeak as I recall. I hope you fare better than I did in comm telco setting where identifying resources should have been, err, of interest to management ( this was back before the telco scandals. ;-)
At about that time I also was looking at Logtalk (logtalk.org) for SWI and maybe waiting for XSB ... as our manager would not go for iLOG and we were VisualWorks only ... then IBM bought iLOG and something odd happened to Prologia with Air Liquide in France.
And then some manager thought RDF was XML or XML was RDF.whatever and oi vey ... Was anything ever added into Smalltalk-X for triples ? Gnu St ? But in all seriousness, my very best wishes for your thesis project. PS Visual Prolog continues in DK and I continue to follow the Mercury project ; no recent change in Mozart/Oz when I last looked ...
On 25 September 2013 10:29, Jesus Nuñez <[hidden email]> wrote:
|
In reply to this post by Jesus Nuñez
You may know about the prolog for Smalltalk/DOS of about 1990 vintage ... I must have it on a floppy in a box somewhere on a shelf. R
On 25 September 2013 10:29, Jesus Nuñez <[hidden email]> wrote:
|
In my very first attempt, I tried to port a package which sounds to me like the one you describe. In the examples there was a snoopy world as a search example, maybe you recall it from that. However I realized that I didn't want to emulate Prolog in Pharo; nothing like fast compiled and optimized code for WAM.
The idea was to emulate the language boxes of Helvetia to mix Prolog and Smalltalk code and use NativeBoost to call the swi-prolog shared library, so I could use a highly deployed version of Prolog. Some time ago I made an inquiry and for handling some text highlighting issues that would help in my aims, just for a direct reference, the code is below:
| text textRenderer textShower | However, as I said, it was too much work to create everything from scratch, so I decided only to impose queries and the result looks pretty much as the code I provided in my previous post. I omitted one detail however; I am using a python bridge through the pyswi library which does pretty much was I was trying to achieve with NativeBoost. It is a RPC-JSON server which handles the interaction between Pharo and Prolog and retrieves the query results in a JSON dictionary. At about that time I also was looking at Logtalk (logtalk.org) for SWI and maybe waiting for XSB ... as our manager would not go for iLOG and we were VisualWorks only ... then IBM bought iLOG and something odd happened to Prologia with Air Liquide in France. Logtalk is pretty much what I wanted to achieve, but the OOP language would be Pharo instead. I still think it would be good to make some effort towards creating such a framework, if I can call it like that.
You may know about the prolog for Smalltalk/DOS of about 1990 vintage ... I must have it on a floppy in a box somewhere on a shelf. I would be interesting to have a look. Please send me a copy to this email if you find it. Cheers, Jesus 2013/9/25 Robert Shiplett <[hidden email]>
|
did you look at SOUL?
Stef On Sep 25, 2013, at 9:15 PM, Jesus Nuñez <[hidden email]> wrote:
|
where is it?? 2013/9/25 Stéphane Ducasse <[hidden email]>
|
OK I found it, I'll have a look 2013/9/25 Jesus Nuñez <[hidden email]>
|
Sorry, I hate its syntax, too verbose for my taste. What about dynamic modules, DCG, CHR, CLP, performance in general?. What about meta-programming, operator declarations. Do you really thing SOUL is a good replacement for Prolog?, I do not see the expressiveness of Prolog reflected in what I have seen. What about the libraries I mentioned for semantic web? Think now about Prolog and the Helvetia approach, don't you thing it would be much more attractive for newcommers or people who already knows Prolog? If you put both approaches over the table I woudn't hesitate in taking the Helvetia approach.
Cheers, Jesus 2013/9/25 Jesus Nuñez <[hidden email]>
|
In the section SOUL versus PROLOG of http://soft.vub.ac.be/Publications/2000/vub-prog-phd-00-02.pdf, the autor says: When switching from SOUL to Prolog, we actually extended the SOUL system to export all SOUL code in Prolog format. More recent versions of the SOUL system include an option to use Prolog syntax instead of SOUL It is currently possible to achieve this in Pharo? It so, could you please provide an example?. I could forget about the syntax and learn it if this is possible.
Cheers, Jesus 2013/9/25 Jesus Nuñez <[hidden email]>
|
Free forum by Nabble | Edit this page |