Friday, January 27, 2012

lx in core.logic #2: Jumps, Flexible Transitions and Parsing

This is a continuation of the post Finite State Machines in Clojure core.logic.

This current plan for this series is to follow the book Algorithms for Computational Linguistics using Clojure core.logic instead of Prolog.

Jumps, wildcard transitions and parsing are natural and useful ways to extend and leverage finite state machines for text analysis. This was an opportunity to introduce extensions of fact databases and non-deterministic matching. Here's the code:

2 comments:

  1. This is really fantastic stuff! I'm also very, very excited about leveraging core.logic for parsing. One hurdle we have to surmount is very large inputs - Prolog has some tricks that we haven't implemented yet. Looking forward to watching this series evolve and any feedback you may have about core.logic.

    ReplyDelete
    Replies
    1. Cool to hear that. I haven't been looking at complexity yet, just trying to get used to this paradigm and looking for what it can offer over Prolog. Just being able to prototype and experiment this fast is great already. But absolutely, it would be pretty neat if this actually scaled up.

      Delete