Resources on declarative/logic programming? - logic

Hi does anyone have any resources on declaritive programming languages, the more and the newer the better.

I find Krzysztof Apt's book on constraint programming very clear, if maybe a little on the theoretical side if you're looking specifically for "programming languages". The author's page links to reviews.
There are also a few related questions I can recommend:
https://stackoverflow.com/questions/1082121/what-are-the-best-introductory-logic-programming-books
https://stackoverflow.com/questions/401635/good-beginners-material-on-prolog

Related

how do I approach Prolog

I have taken up Prolog course in my university. The coursework requires us to write prolog programs. I am able to write simple programs, however I am finding it little hard to digest the complex programs. Any suggestions how to proceed or how do I study this subject ? what is the approach to tackle this kind of course. Any help appreciated.
Thanks.
I write an answer (which is probably just rant) because I struggle with the same problems. If a question gets closed I think the answer still stays?
what is the approach to tackle this kind of course.
Like all courses, you collect all material that your teacher/instructor/professor gives and find the books they recommend. You do the exercises as the way they expect. Do not be clever with your solutions, be clever with finding what your instructor wants to see! Try to find old exams and study them; esp. if you can find graded exams (if you are lucky and "resourceful"... ask older students for help!)
Any suggestions how to proceed or how do I study this subject ?
It is difficult to learn Prolog. I try to learn it at University and the teacher says one thing. Then I pick up a book ("Sterling and Shapiro") and it says another thing. Then I go online and I find yet another two very different things ("Amzi Amazing Adventure" and "Learn Prolog Now!"). There is also "Expert systems in Prolog" (from the Amzi website) and it is still another thing. I come to StackOverflow and I find yet other answers that are NOWHERE in all the texts I have tried to read.
The best place to learn for me is the SWI-Prolog predicate documentation: this is outrageous, don't you think? At least it is consistent....
And then many of the answers here on Stackoverflow I have tried to learn from are talking about things that make no sense (to me), probably because I don't know Prolog, but how to learn it? And almost all questions are homework, and almost all answers to homework are like little lectures that talk about ISO and logic and pureness but no clear answers.
In conclusion: "Sterling and Shapiro" was at least complete, and not too strange; and SWI-Prolog has good predicate documentation and even code examples.
EDIT: nowhere nowhere in all texts do you read about modules, but how do you write big programs without module system? Even the C++ book by Stroustrup explains how to use headers and source files to maintain a bigger program. Again, you go and read the chapter on modules in the SWI-Prolog documentation.
EDIT2: I study "Computer Science" so I maybe know "programming" and "data structures" and "algorithms" and I understand what is "proof tree" and "backtracking" and such things. Prolog is just another language. So why is it so difficult to teach it and learn it? This is an open question. I don't want to ask it on Stackoverflow because it will be closed.
EDIT3: Because you have tagged "clpfd", there is yet another text:
https://www.metalevel.at/prolog
It shows many solutions with clp(fd) that I did not see in any other of the texts I cited. It is useful and consistent but again it is different from all other texts. Maybe if I read and study everything I can find I can give you a real answer.
But do you want to pass the course or learn Prolog? Do you want a good grade and minimum effort? You need to find answers to such questions first!

Tutorials For Natural Language Processing [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I recently attended a class on coursera about "Natural Language Processing" and I learnt a lot about parsing, IR and other interesting aspects like Q&A etc. though I grasped the concepts well but I did not actually get any practical knowledge of it. Can anyone suggest me good online tutorials or books for Natural Language Processing?
Thanks
You could read Jurafsky and Martin's Speech and Language Processing (2008 edition), which is the standard textbook in the field. It's long, and has a variety of topics, so I'd suggest reading just the chapters that really apply to your interests.
Further, the best way to learn is almost certainly to actually implement NLP algorithms from scratch. You could pick some standard tasks (language modeling, text classification, POS-tagging, NER, parsing) and implement various algorithms from the ground up (ngram models, HMMs, Naive Bayes, MaxEnt, CKY) to really understand what makes them work. It also shouldn't be too hard to find some free dataset to test your implementations on.
Finally, there are lots of tutorials out there for specific NLP algorithms that are excellent. For example, if you want to build an HMM, I suggest Jason Eisner's tutorial which also covers smoothing and unsupervised training with EM. If you want to implement Gibbs sampling for unsupervised Naive Bayes training, I suggest Philip Resnik's tutorial.
Aside from Jurafsky and Martin's book, Christopher D. Manning and Hinrich Schütze's Foundations of Statistical Natural Language Processing is also widely used. For IR, Manning et al. also wrote Introduction to Information Retrieval which can be read or downloaded online at their site.
If you want practical knowledge on how can you work on Natural language you should start implementing it.
I suggest to use NLTK(Natural Language Proecessing Toolkit) with Python. Its easy to implement NLP in python.
You can refer to this link
http://nltk.org/
Or you can try it online on
http://cst.dk/online/pos_tagger/uk/
Instead of reading a specific book, diving into the sea of papers might be an as good idea. http://www.aclweb.org, for example, contains many topics on NLP. Through those papers, you get references to more papers, some of which are the foundations of a certain branch of NLP. And because they were written by different authors, you are unlikely to be influenced too much by one point of view.
If you are a Java developer there is an extensive list of tutorials for how to build components of NLP systems using LingPipe at http://alias-i.com/lingpipe/demos/tutorial/read-me.html. Full disclosure I wrote some of those tutorials and one of the books below.
There are a few books that are more industrially oriented:
1) Natural Language Processing with Java by Richard M Reese
This covers how to do some common tasks with a range of open source toolkits (including LingPipe).
2) Natural Language Processing with Java and LingPipe Cookbook Paperback
by Breck Baldwin, Krishna Dayanidhi
This book is task driven at the level of "get the component built" and covers the major technologies driving most NLP systems that are text driven. It does not cover translation. It goes into more detail than the first book and has broader coverage than the LingPipe tutorials but is sometimes less detailed than the tutorials.
Breck
There is a hub for teaching and learning materials called TeLeMaCo. You can find resources for many aspects of NLP, and you can easily add more materials that you have found on the web.

What is a good intermediate introduction to Scheme?

I am trying to find a resource where I can practice my programming skills in scheme.
I have a class coming up that uses scheme exclusively. While I have done moderate amounts of programming in C++ and Java, and grasp the basic ideas about good/bad programming practices and different programming paradigms (as much as a second-year college student could be expected to), Scheme looks like hieroglyphics to me!
Any help would be appreciated.
If you haven't looked at Structure and Interpretation of Computer Programs yet, that's the obvious (and free!) place to start.
I really like The Little Schemer. The format is very different, but it all builds up from basics.
If you're looking for an intermediate introduction, SICP will not be a good choice. You could try HtDP, but that not too much of an intro to Scheme as it is an intro to programming in general.
The Scheme Programming Language, 4th Edition (Covers the language as described in R6RS.).
If you are using a Scheme that conforms only with R5RS, use the 3rd edition of the book.
Structure and Interpretation of Computer Programs is highly recommended.
The Guide to Racket http://docs.racket-lang.org/guide/index.html is a good place to find the information you need. It has a very good navigation system and many simple examples. You can use it with SICP.

Learning Pascal FC

I'm looking for tutorials and examples on Pascal FC's channels and rendesvouz mechanisms.
There is a nice introductory tutorial, but unluckily it is in Spanish.
You may also take a look at the language's reference manual and user guide, but they are not suitable for learning the language from scratch.
I have not found any digital, freely accessible, introductory material in English yet.
I've been learning with a Spanish book on Concurrent Programming and there may be a bunch of books that explain topics on Concurrent Programming with Pascal-FC, but I have not checked them.
However, you might find the bibliographies of this papers useful:
Teaching concurrent programming with Pascal-FC
Pascal-FC: a language for teaching concurrent programming
You do not need to download the papers to see the bibliography, the list is shown on the webpage. However, there are some explanations and examples in the papers that might be useful to you, it would thus be nice if you could access those papers.
There is also another thorough list of books on Concurrent Programming which you may want to have a look at if you are realy looking forward to learning Pascal-FC.

PLT-Scheme learning reference

After having got through the two Schemer books, I'm about to embark on HtDP but also discovered the http://docs.plt-scheme.org/guide material.
The previously mentioned books are more particular to Scheme, it seems, and the latter being more geared towards PLT specific extensions (modules, require, bracket syntax, etc...). The online manual is excellent but I was hoping there might be a book form that I could purchase?
If not, I'm certainly grateful for the in-depth online manual - was just curious!
No, I don't believe so. The only other PLT-specific book that's in print right know (AFAIK) is the excellent "Semantics Engineering with PLT Redex", but I don't think that's what you're looking for. You might also be interested in Krishnamurthi's Programming Languages: Application and Interpretation. Both of these are targeted at programming languages folks.
HTH
How to Design Worlds
How to Design Programs
Programming Languages: Application and Interpretation
There is a pdf version of the guide which might be easier for you to use than the html document:
http://download.plt-scheme.org/doc/4.0.2/pdf/guide.pdf
I assume this is legit, feel free to edit my post if it isn't.

Resources