SWI Prolog & libraries online index of "words"

Looking at the Prolog dictionary of the University of New South Wales, I was wondering if having an index could be a feature added to the SWI Prolog Web ?

As mentionned many times, one of the problems for new or mid level users of Prolog is to use the language and among other things “write” the Prolog way … as in any language, apart from practice, grammar etc. learning is first learning words i-e a dictionary that would have an easier access with a simple sum-up list (index) of words before going deeper into definitions. I guess it is something that would result from an update to PlDoc ?

1 Like

Nice collection. Should we link it from the tutorials menu? Note that the manual already provides a glossary

Hello Jan, my point was about having a view focusing on “words” as links to navigate though the glossary is already an expanded view.
Those can also be split by “families” = standard predicates, input/output, libraries etc. i-e same as those lists that students often do in the groceries lists style.

To give you another example, here is the “bible” used by llscript developpers and the most used page for all those programming in Second Life (beginners as well as confirmed). The approach is that “if you don’t remember it” (as you can’t embrace it all) but understood how things are done you can go straight to the “word” and find its related content.

As for how it should look like on the SWI Prolog website and be integrated, to make it be like a swiss knife tool, it could be a “A…Z” button on the main SWI Prolog page. Many people i know getting to the SWI Prolog website often get afraid because they don"t know where to search for and where … though A…Z could lead to “first words”, Prolog words, integrated libraries words, external libraries words, etc… Basically in a “words” approach that it be /0 /1 /2 /3 /4 do not matter at first … the functor is the main entry point. To explain it differently such an approach is done to reply to a simple question = “which words should i know ?” … to input/ouput content, or to manipulate strings, or to open close / files etc. (keep in mind the students groceries list approach or just the way babies learn language with sounds then words then some kind of grammar on a try and retry mode).

PS: In the tools for students digging, another link that i like from the University of Pensylvania, is this Concise Introduction to Prolog. Which is a good straight to the point way to have a quick overview for people often already knowing other languages.

1 Like

I am currently planning to remove the comment system from my web site, and shift towards a GitHub issue system. To make an example, that would motivate such a move: I don’t think it makes sense to have a glossary, and then dozen of pages comments by LogicalCaptain.

GitHub isssue system for documentation would also imply that there is something wrong that needs to be fixed, so that in the end an improved documentation results. Not a kind of pseudo wiki, which has a official part and a comment part. And only if you scroll down, you find the comment part, and

loose for example the sorting and integration of a single glossary. Now there are multiple lists. And you are supposed to search them all? The other lists are even not sorted.

For example LogicalCaptain does things like:

  • Deduction , …
  • Induction , …
  • Abduction , …

A___ comes after D___ .

Edit 08.06.2021:
You might want to chop your glossary into smaller pieces for HTML presentation.
And place an A-Z bar for navigation:

A B C D E F G H ...

BTW: I remember mySQL had also a comment system, and it was somehow useful.
I don’t know why this doesn’t work out always?

Totally agree and what i meant with “words” is have an instant compact view of hyperlinks based on words :slight_smile: Looking at my children that are doing high level studies, new generations want to go straight to the point and then expand search. I myself always worked with lists of keywords from which i can go straight to what i am interested in (which doesn’t necesarily mean ordered from A to Z but families of words). Concerning examples, it could be selections of links to some other sites like GitHub, StackOverflow etc Those sites are stable in the duration, with ways already done to add comments and have support from the ones who initially created the topics, which is also a good way to develop social interactions around SWI Prolog as well as expand the users base, the same way Discourse is a nice area to discuss about what could be made better …

Stackoverflow is sometimes useful but has some really questionable mechanics. As a result, it is a battle ground and not a place to disseminate knowledge.

In particular, popularity is not a measure of quality nor usefulness.

I agree on that StackOverflow “battle ground” approach but it is also a place for students i-e new users looking for solutions and the thing lacking to the SWI Prolog site is to have a bunch of examples that any user can understand immediately and interaction if there are questions.

Even 10 or 100 of the best brains on Earth in AI can’t reply to the mass of users who are the future of Prolog as a language for the next generations.

Look at the time dedicated to C or Python or Java & Co in engineering studies compared to Prolog and you easily understand that Prolog needs to go outside books and labs to grow as a programming language widely used, what it could be if students were feeling more comfortable with it.

The thing is that SWI Prolog is considered as a reference thanks to the great job done by Jan and some other AI specialists BUT it needs to expand its audience, not to be considered by most students as the boring thing they are forced to learn for a few hours during their cursus as if they were learning Greek or Latin …

Now I took a further deep dive of the SWI-Prolog web site. It has tags! Recently I started appreciating tags on stack overflow. They are one of the communist tools for brain washing. Like create a tag “clpfd” and spread it everywhere.

But jokes aside, there is a tag “doc-needs-help”, but it doesn’t have an explanation:
https://www.swi-prolog.org/show-tag?tag=doc-needs-help

The tag “doc-needs-help” was used often:
https://www.swi-prolog.org/list-tags

But somehow I have the feeling stack overflow offers something more. There are various review and approval queues. Maybe SWI-Prolog uses tags, which should be reserved for semantic annotations, for what would be pending work items.

But maybe that should be cast in a kind of a separate document dimension.

There are “docs-needs-help” and “doc-needs-help” :slight_smile:

Concerning tags the confusing point is between examples, tags to group links by subjects, comments on bugs or improvements etc. though tags are usually done to enhance transversal navigation by thematics.

I just “played” with search. As for my “words” and “families of words” approach and to make things easier, maybe the solution would be simply an expand / collapse on the blue background parts resulting from a simple search on words (it seems that it would fit correctly when i test it with a generic search on words like “file”, “input” etc.) and it would make the documentation “dynamically” generated.

You could add WordNet to the backend, and use hypernym relationship. Further synsets would group synonymous words, which could be also useful. But most likely, WordNet doesn’t have all the logic programming vocabulary. And yes you would search phrases, and not single words.

I don’t know whether you can extra hypernym and synset through machine learning from the tags cloud. The easiest would be to allow to edit a hypernym and somehow synset relationship of tags. Whats the current database system and database schema for the SWI-Prolog tags?

WordNet is available as Prolog facts:
https://wordnet.princeton.edu/download/current-version#pro

Personnaly, i did a method that i named #tag consisting of using #. as a tag to have a better classification of my data whatever system i use as just searching by words leads to too much non significant data especially when you are in a specific field … for example #.gFRA for France #.dd2021-06-10 for june 10th #.ds2021-06-04 for day start june 4th #.cIBM fro company IBM etc. If you want to have fun i demoed it on @OneProductivity / Twitter with StarWars, GTD methodology as well as how to do messaging through OneNote or any text … and let’s say that some liked it as Microsoft ToDo team added the ability to use it into their search tool with filtering on # after i explained them why transversal keywords search make the difference …