View on GitHub

python-tutorials

iPython notebooks, tutorials and code snippets

Python tutorials

Here are some iPython notebooks and other tutorials and code snippets that I’d like to share (as of now there is only one, but more could perhaps come later).

Please do with them whatever you choose - they are published under the MIT license. Comments are welcome - you can suggest changes in the github issues.

Tutorial: Earley-style chart parsing

Chart parsing is a pretty old technique, originating in the 60’s with CKY (Cocke-Kasami-Younger). CKY is a really simple and efficient algorithm, but it only works for grammars in Chomsky normal form. The first efficient parsing algorithm for general context-free grammars was Jay Earley’s algorithm from 1970, and that algorithm is what I will try to explain in this notebook.