Archive for the ‘Python’ Category

reWork: an online workbench for regular expressions

Thursday, February 23rd, 2006

reAnimator got me interested in writing something that would let you use regular expressions. That something is reWork. This web page has a couple of fields where you can type in a regular expression and a string to match it against, and see the results update as you type. It also displays the code to perform the match in some of the languages (JavaScript, PHP, Python, and Ruby) that I use with regular expressions.

reWork limited to the features of the JavaScript regex engine. In particular, it’s missing dotall (/.../s), because JavaScript is. I actually figured out a hack to implement dotall anyway, but this will have to wait for another day.


Read the rest of this entry »

Visualizing Regular Expressions

Sunday, February 19th, 2006

Here’s something I’ve wanted for a long time. So I finally built it. reAnimator is a tool for visualizing how regular expression engines use finite-state automata to match regular regular expression patterns against text.

This is intended to demonstrate the implementation of regular expressions. If you want to learn how to use them instead, I recommend these references instead:


Read the rest of this entry »

PyWordNet 2.0

Monday, April 19th, 2004

After a spate of requests and a contribution from Wei-Hao Lin, I’ve finally gotten around to releasing an update of PyWordNet that works with the WordNet 2.0 database files. (WordNet 2.0 adds lexical links for derivational morphology and topical classification. This broke the PyWordNet 1.4 dictionary file parser.)

more

This release also adds a module, contributed by Des Berry, for reading the concordance data; and an implementation of Lexname by Klaus Reis. I don’t know how these work, so ask for help on the PyWordNet discussion group, or from the authors.


Read the rest of this entry »