Reputation: 41
I need help with a library system in prolog.
I tried to define all the books in my library this way:
book(['programming in logic'],
[nm(k, clark), nm(f, mcCabe)],
['programation'],
['editorial 123']).
And I tried to do a query for all programming books this way:
?- book(Title,Autgor,Genre,Editorial),
findall( Genre, (member('programation', Genre)), [G]).
but I need to suggest books by genre, author...
I also need to do statistics, most wanted book, genre most searched, author most wanted, things like that, but I'm not sure how to define the rules to do these queries. I have searched for examples, but only find things like family tree and I don't understand. If you could collaborate with examples for this exercise, I would appreciate too much.
Upvotes: 0
Views: 1355
Reputation: 60024
For sure, modelling a library system could be a very complex topic.
I would suggest to start to learn RDF, for instance with SWI-Prolog, that has a very powerful library devoted to the task.
I just tried to use RDF to model objects simpler than biblio domain.
Anyway, I googled 'biblio ontology' and got some reasonable result, like bibo.
To start with, maybe you could consider some introductory material.
Upvotes: 1