Are there any current initiatives for semantic forms in Drupal?
A more detailed explanation
'Semantic Forms' is somewhat vague, so let me clarify.
When I say 'semantic form', I'm talking about a form that would make it easy for people to use semantic identifiers as values in form fields.
Ideally I would like to make it possible for normal people to select terms from a list of human-readable labels, and then save the machine-readable identifiers which correspond to those labels.
I have a need for this in the library where I work. We are trying to create linked collections. But it is currently difficult to do this because staff members would need to cut-and-paste URIs. They also don't have an intuitive way to understand what a URI represents when they look at record's page.
Examples
For example, say I have a form with one field: US State.
The field's widget is an autocomplete text box. When you start typing in the autocomplete you get a list of states. When you select a state, the state's human readable-name (e.g. 'Maine') is stored as the textbox's value, *and* (here's the key bit) the state's semantic identifier (e.g. 'http://dbpedia.org/data/Maine.xml') is saved as an attribute to the textbox e.g. <input class="autocomplete" type="text" ... semantic_uri="http://dbpedia.org/data/Maine.xml' ... > )
Another Example: Freebase.com
This is what is already being done at http://freebase.com. When you edit a property in a freebase topic, the value of the property often has a Freebase ID and a human-readable label. On Freebase the human-readable label is displayed in the property's textbox, and the Freebase ID is stored as an attribute on the textbox, 'fb__id'.
I presume this works because Freebase's back-end form handlers are programmed to take the semantic ID value from the 'fb__id' attribute on input elements.
Semantic Forms in Media Wiki: Not Quite the Same Thing
A side note: MediaWiki does have something called 'Semantic Forms': http://www.mediawiki.org/wiki/Extension:Semantic_Forms . I'm not sure that this is quite the same thing as I'm talking about here
Ideal Flow In Drupal
Ideally I would like to work out a standard way for doing something similar in Drupal.
The flow I have in mind is something like this:
- Site admin configures form fields, has widget for field_X be a semantic autocomplete, pulling from vocabulary Y. Vocabulary Y consists of terms w/ a 'label' field and a 'URI' field. (this could also be generated dynamically via SPARQL)
- User enters data on the resulting form. Selects a choice from the autocomplete on field_X. Choice's label is displayed to user on editing form, and choice's URI is saved as the value of 'semantic_URI' attribute on the input for field_X.
- User submits form. Drupal semantic form handler extracts value of the 'semantic_URI' attribute on semantic form widgets and saves those as the value of the fields.
- User views data generated by form. Can view 'raw' data view (w/ semantic URI values), or can view human-readable view (queries semantic URIs to get labels).
Implementing This?
I am possible interested in doing this. It depends on how much time it would take, and whether I can justify doing it as part of my normal job.
Questions
- Is anyone else working on something like this, in Drupal or other systems?
- Does anyone else have a need for this?
- Is anyone else interested in working on this?
- Any feedback on how to do this?