Rolling out the Roles

Jono and I have recently been working to incorporate the [Parser The Next Generation][1] into Ubiquity proper, and this of course involves the process of [retooling the standard commands with semantic roles][2]. The first step, however, is to come up with a list of universal semantic roles which the verbs will be rewritten to use and individual languages’ parsers will be built to identify. Today I have just such a proposal.

Something to consider…

As we rewrite these current commands to specify semantic roles instead of specific modifiers, it is important to distinguish between synonymous prepositions in English which actually map to different semantic roles. Here are two examples:

  • with: English “with” can refer to one of two relations: “together-with” as in “share this with Jono” and “using-with” as in “share this with delicious” or “eat this with a fork.”
  • in: “in”, similarly, can refer to two different relations: “location-in” as in “find mexican food in Tokyo” and “format-in” as in “search Moscow in Russian” or “save this page in PDF.”

A quick test for such cases is “would these markers translate to the same markers in a different language?” It’s easy to find a language where the two different “with”s and the two different “in”s are expressed using different words. With semantic roles in Parser TNG, it’s okay for multiple semantic roles to share the same delimiters/markers.

A proposed set of semantic roles

Here is a set of semantic roles which I would like to propose. Keep in mind that these roles should map to morphological features in languages, not necessarily to the type of content in the argument (which is why we also will keep the noun types).

  • object: direct object (the default or unmarked argument)
  • goal: the goal or end point of (metaphorical) movement or transition
    • example: in English, arguments marked by “to”, “into”, “toward”, etc.
  • source: the source or starting point of (metaphorical) movement or transition[^1]
    • example: in English, arguments marked by “from”, “by”, etc.
  • position: refers to a (metaphorical) location which defines the scope of an action, in contrast to goal and source.
    • example: in English, arguments marked by “in”, “at”, “near”, etc.
  • instrument: a tool or intermediary to be used
    • example: in English, arguments marked by “using” or “with”, as in “bookmark this with delicious.”
  • format: describes the intended or expected form of the result
    • example: in English, arguments marked by “in” as in “in PDF form” or “in German”
  • alias: a name or reference to
    • example: in English, arguments marked by “as” as in “tag this as new” or “login to mail as aza.”

Note that all three locational roles, goal, source, and location may be used for both times and places as the morphological marking of temporal and spacial expressions are often conflated in language. The appropriate type of referent (time or space) can then be specified with the noun type.

As a quick sanity check of this proposal, here are all the standard feeds built into Ubiquity which have multiple arguments together with what semantic role is appropriate for each argument:

</thead> </table>

The only problematic standard command, then, is the share-on-delicious command which can take both tags and a title, both of which would most naturally correspond to the alias role. If you have a suggestion for how best to deal with this type of case, I’d love to hear your suggestions!

We’d love to get your feedback to this proposed set of semantic roles. How do you feel about the proposed set of semantic roles laid out here? In particular, if you have a command or can envision a command which would like to use a semantic role which does not fit any of these roles or would take multiple arguments of the same role, please let us know! ^^

The Filmore (1971) semantic role of “result” may also be lumped into this.

[1]: http://mitcho.com/blog/projects/ubiquity-parser-the-next-generation-demo/ [2]: http://mitcho.com/blog/projects/writing-commands-with-semantic-roles/
command current modifier semantic role
convert to goal, format
email to goal
translate to goal, format
from source
search with instrument
wikipedia in format
yelp near position
weather in location
twitter as alias
share-on-delicious tagged alias
entitled alias