A couple of weeks ago, I gave a talk at the Maryland Institute for Technology in the Humanities (MITH) with the same title.  I’ve linked to the video here so you can see the slides along with my monotone voice.  In this talk, I use imagery and music along with mathematics to explore how we might approach taking ownership of computing in the humanities.

The last slide is wrong.  It should be the following:

close:reading(text_) :=
     word_ \ connotes: semantic:connotations(word_),
     word__ = f:split(' ', text_),
     semantic:sensible?(word__)

close:reading(sentence_ \ time-period: '1860') 

I’ll explore the implications of this code in another post.

 

I’m working through some ideas on how to move the Utukku/Fabulator expression language more into a descriptive, functional style.  I want to be able to have the programming be exposed as an editorial statement showing how certain calculations are done or inferences are drawn.  The computer’s interpretation of the data can be as important as a person’s, and knowing what the person was expecting the computer to do can be as important as knowing what the person thought they wanted the computer to do.

With that in mind, I want to walk through a few possible ways of constructing phrases and inference rules to see how they go.  Since my stereotypical example seems to be a concordance, that’s where I hope to end up.

Continue reading »

 
Part of the LHC at CERN, an experimental endeavor

Image via Wikipedia

During the first week of March, a group of humanities scholars and developers gathered in the bowels of the McKeldin library on the University of Maryland campus.  You can see the website that talks about the results on the MITH website.  We held Corpora Camp to test some ideas on distributed humanities computing that will eventually feed into the next phase of Project Bamboo. The result is an application for exploring texts called “woodchipper.”

While most of my focus is on the architecture, I want to explore what we’re beginning to enable.  If you have experience with Scrivener and Mathematica, then you have some idea of where I’m headed.  I won’t flesh everything out here.  That will have to wait for my Digital Dialogues talk at the end of April titled, “Player Piano: Mechanizing the Humanities.”

Continue reading »

Page creation

 Posted by at 4:15 pm  Fabulator  No Responses »
Dec 032010
 

I just pushed Fabulator 0.0.12 and Radiant Fabulator Extension 0.0.9 to RubyGems. The first adds the template element to libraries. The latter adds a page and page-part action for creating pages in Radiant. This will eventually enable editing of existing pages, but for now it’s aimed at creating new ones. That’s the functionality we need, so that’s what we wrote.

Continue reading »

Templates

 Posted by at 4:50 pm  Fabulator  No Responses »
Dec 012010
 

Templates mean a lot of things. This time, it’s building up strings within the Fabulator engine instead of building strings in the client presentation.

I’ve not checked them into Github yet, but I’ve coded a fifth type of function definition in Fabulator libraries: the template type. They work like this:

Continue reading »

Presentation Layout

 Posted by at 1:47 pm  Fabulator  No Responses »
Oct 182010
 

I’m working on a set of presentation capabilities inspired by MIT’s Exhibit widget set. A lot of the data management core is identical, but I’m trying to play around with the presentation and interaction a bit more. My goal is to have something sufficiently flexible that I can implement a simple game with it.

The standard Exhibit practice if you have multiple views into a data set is to show the views with what is essentially a tabbed interface. You can select which view you want, but you usually don’t get both at the same time.

I’m working on a second way of doing presentations of multiple views: an arranged set of views in a layer. Additional views might be done as windows above the layer, but the primary working set of views will be in a layer.

I could make a system in which the author would have to lay out each view by hand specifying heights and widths and placements on a grid, but that strikes me as being too close to the typesetting and too far from the idea. I want the author to specify a general idea of what they want and then have the system do a reasonably good job of presenting that idea.

What I’m playing with at the moment is a system by which the author specifies how many units they want the presentation to have for height and width. This is an arbitrary number that is used to scale other measurements so they fit in the display space. This lets the system work with computer displays, printed pages, or other devices that might not work in pixels or have the same pixel density.

Then, for each widget in the layout, the author specifies the stretchability and compressibility of bits of glue that tie the widget to other widgets and the frame. Glue is also used to specify the sizing of the inside part of the widget. The system can work with the glues to find a reasonable set of heights, widths, and distances to make everything reasonably visible. This models a bit of how (La)TeX manages text on a page.

The benefit of this system is that users can not only resize elements if they need to and everything will respond, but they can add new widgets in the layout and everything will automatically reshuffle to accomodate the new widget.

I’m still working on a simple implementation that will let me test this. I think it’s a reasonable first pass at the problem. I know I’m using the word ‘reasonable’ a lot, but I’m not going for perfect. I’m going for something that is good enough, at least for now.

My initial algorithm will try to lay out the widgets as points on a frame using the glue relationships to determine relative ordering. Once laid out, I’ll use the tensions in the glue to correct the centers. Then, I can do some slight adjustments to get the widget frames in place. It isn’t quite as simple as taking the distance between centers: the tension is between edges, so we take vertical or horizontal distance, but not diagonal distance.

Oct 012010
 

Fabulator 0.0.9 is going to be full of changes. Some are relatively minor internal changes that only matter to people who have written tag libraries (i.e., me). The biggest change that will have an impact for you, the user, is the presentation layer management.

XML is at the heart of the Fabulator system. Applications are written in XML, libraries are written in XML. The views are written in whatever markup is comfortable, but the interactive elements (the forms) are easiest in XML.

Tag libraries will have two ways they can influence the system beyond defining types, functions, and actions. Tag libraries will be able to specify two different XSLTs: one that can be applied to the application to transform it, and one that can be applied in a presentation context to provide new presentation elements. The first can be used as a macro language for the applications. The second can be thought of as similar for presentations.

I’m considering using Fluid Infusion as the foundational JavaScript library for presentation. I’m not settled yet on which gem will get it, though it might be easiest to bundle it with the Radiant extension.

To add presentation transformations, you do something like the following in your Ruby tag library. This example is taken from the core action library.

presentations do
  transformations_into.html do
    xslt_from_file File.join(File.dirname(__FILE__), "..", "..", "..", "xslt", "form.xsl")
  end

  interactive :text
  interactive :asset
  interactive :selection
  interactive :password
  interactive :submission

  structural :form
  structural :container
  structural :group
  structural :o ption
end

Now the system knows which XSLT file to use when transforming the markup to HTML, it knows which elements in the tag library’s namespace should automatically be given default values and captions, and it knows which elements contribute their ‘id’ attribute to the path pointing to the default value in the application’s memory (and thus contribute to the name of the HTML input element as well).

You can have, for example, the following form in Radiant:

<r:form base="account">
  <text id="name"><caption>Name</caption></text>
  <text id="email"><caption>Email</caption></text>
  <submission id="go"><caption>Submit</caption></submission>
</r:form>

The name and email fields will be populated by the data in ‘/account/name’ and ‘/account/email’ if they exist. The HTML input fields will have the names ‘account.name’ and ‘account.email’.

The Radiant tag (<r:form />) automatically surrounds the enclosed XML in a <form xmlns=”http://…” /> element with the appropriate namespace declaration to allow simple form markup without prefixes.

Because different tag libraries may have structural elements that contribute to the path, the system will also inject a ‘path’ attribute into interactive elements so they know how to name the HTML elements. The tag library doesn’t have to know what other tag libraries are contributing.

It makes sense for one library to use another, so the XSLT associated with one library will be run before the XSLT associated with a library associated with a namespace mentioned in the library’s root element (for libraries defined in XML), or in the root element of the XSLT (for libraries defined in Ruby). This is for presentation and application XML transformations.

This is the start of a push away from explicit HTML in projects. We’ve done a lot to make the algorithms transportable through time — we don’t have to revisit projects to update code when we update the framework (or won’t once we hit 1.0), but there’s more to a project than just the algorithms. There’s also the HTML and CSS that tends to grow stale over time. By creating a presentation layer, we can capture the presentation intent of the project while providing a (hopefully) robust path forward.

Ultimately, a project may be able to expose the presentation and algorithm layers to advanced researchers and let them create their own algorithmic presentations built from humanities data. That’s a number of years off, but that’s the direction we’re headed.

Next on the todo list: come up with a reasonable set of presentation tags for building Exhibit displays. For those thinking this looks similar to things like Cacoon, you’re not too far off from the general idea as far as the implementation goes. Some details are a bit different, of course.

Workflows

 Posted by at 5:04 pm  Fabulator  No Responses »
Sep 152010
 

I’ve been working a little here and there on getting a workflow extension together. I still have a bit to do, but the skeleton is shaping up and passing some simple tests.

The plan right now is for workflows to act like grammars in that they augment a library instead of standing alone. Workflow definitions will attach themselves to the namespace of a library and have a name that can be used (when qualified by the library’s namespace) to reference the workflow definition.

Workflows are very similar to applications in that they are a collection of states and state transitions. The important differences are that you can add data over time to the workflow and test which transitions (actions) can be taken at any given time without automatically following a transition.

This allows an application to add data to a workflow and give feedback to the user as to which actions can be taken on the workflow. For example, I’m considering building a workflow that can manage the process from proposal submission to final approval. Such a system would allow anyone to upload a project proposal to a queue (resulting in a workflow in the ‘pending’ state), allow the advisory committee to review pending proposals and possibly approve them (moving them to the ‘approved’ state) or request more information (moving them to the ‘more-info-needed’ state).

The resulting workflow might look something like the following:

<w:workflow xmlns:w="http://dh.tamu.edu/ns/fabulator/workflow/1.0#"
    xmlns:f="http://dh.tamu.edu/ns/fabulator/1.0#"
>
  <w:state w:name="start">
    <w:action w:name="submit" w:goes-to="pending">
      <f:params>
        <f:param f:name="proposal" f:required="yes" />
      </f:params>
    </w:action>
  </w:state>
  <w:state w:name="pending">
    <w:action w:name="approve" w:goes-to="approved" />
    <w:action w:name="request-more-info" w:goes-to="more-info-needed" />
  </w:state>
  <w:state w:name="approved" />
  <w:state w:name="more-info-needed" />
</w:workflow>

We still need ways to manage authentication and authorization. The final version of this will also require some framework-specific code to manage workflow storage. There’s a lot still to be figured out to try and get this close to right, but we’re getting there.

Gems updated

 Posted by at 1:22 pm  Fabulator  No Responses »
Sep 112010
 

I went ahead and pushed out new gems for fabulator, fabulator-grammar, and radiant-fabulator-extension. The last requires a database migration run to add the library table.

This update brings to Radiant the ability to define libraries that can be referenced from applications through the namespace declarations.

I’m starting to put together some project management stuff using the fabulator setup in Radiant. I’ll use that to flesh out the next set of updates to the gems. Once I have something workable, I’ll see where I can post the XML for the libraries and some of the pages as examples of how to use the Fabulator+Radiant system.

We’re still bootstrapping, but we’re far enough along now that we can start doing meatier projects.

Sep 112010
 

I think we’re getting very close to having libraries sufficiently developed that we can return to focusing on actual projects. Upcoming gem releases (tomorrow or early next week) will have a good start for building libraries and grammars. A lot of work remains, but there’s enough there that we can get real work done now.

Our current play library is the following:

<l:library
           xmlns:l="http://dh.tamu.edu/ns/fabulator/library/1.0#"
           xmlns:g="http://dh.tamu.edu/ns/fabulator/grammar/1.0#"
           xmlns:f="http://dh.tamu.edu/ns/fabulator/1.0#"
           l:ns="http://example.com/ns/grammar"
>
  <g:grammar>
    <g:context g:mode="normal">
      <g:token g:name="LETTER" g:matches="[:alpha:]" />
    </g:context>
    <g:token g:name="NUMBER" g:matches="[:digit:]" />
    <g:token g:name="LETTER" g:matches="[:upper:]" g:mode="upper"/>
    <g:token g:name="LETTER" g:matches="[:lower:]" g:mode="lower"/>
    <g:rule g:name="something">
      <g:when g:matches="[mode normal] LETTER NUMBER [mode upper] LETTER" />
    </g:rule>
    <g:rule g:name="something2">
      <g:when g:matches="[mode normal] LETTER NUMBER [mode upper] LETTER">
        <g:result g:path="foo" f:select="NUMBER" />
      </g:when>
    </g:rule>
  </g:grammar>
  <l:mapping l:name="double">
    <f:value-of f:select=". * 2" />
  </l:mapping>
  <l:function l:name="fctn">
    <f:value-of f:select="$1 - $2" />
  </l:function>
  <l:action l:name="actn" l:has-actions="true">
    <f:value-of f:select="f:eval($actions) * 3" />
  </l:action>
</l:library>

In an application (assuming the ‘m’ prefix maps to ‘http://example.com/ns/grammar’), we can use the grammar rules ‘something’ and ‘something2’ as filters and constraints. We can also use them as functions for matching and parsing strings.

We also have the functions ‘m:double’ (a mapping) and ‘m:fctn’ (a regular function).

Finally, we have the action ‘m:actn’ which accepts enclosed elements as actions and returns thrice the value returned by running the actions. The ‘f:eval’ function evaluates the referenced code using the current node in the context.

In general, mappings will be called with their argument as the current node. Functions will be called with each argument as a separate variable ($1, $2, $3, …) and with $0 representing all of the arguments as one list. Reductions will be called with a long list in $0.

We still have a few more things we need to do to make these XML-based libraries as flexible as the Ruby ones, but that will come as we need that flexibility.

We also need to think about how we want to document libraries… but enough for one day.

© 2012 James Gottlieb Suffusion theme by Sayontan Sinha