scalanlp/chalk — pull request #17 by bethard (2013-07-21 01:22:15+00:00)
Title: Here's one possible realization of a SLAB (Standoff Layered Annotated Blob)

This is essentially an extended version of what I proposed in https://github.com/bethard/nlp, allowing for SLAB[String, ...] or SLAB[Image, ...], and adding a bit of syntactic sugar for combined SLAB/annotation operations.

To get an idea of how the API is used, the best place to look is in the tests. In particular, ``test("text SLAB")`` has probably the clearest example. The ``test("image SLAB")`` is there primarily so that I could get at least a vague idea of what needed to be in the API to support SLABs with content other than Strings. It's not a serious attempt to do image annotation.

The SLAB implementation is horribly inefficient at the moment - as you can tell from the name, HorribleInefficientSLAB ;-) - but I figured we should figure out what API we want before we bother trying to make an efficient implementation. The real implementation probably needs to use interval trees or something like that.