blog

Rolling out the Roles

Jono and I have recently been working to incorporate the Parser The Next Generation into Ubiquity proper, and this of course involves the process of retooling the standard commands with semantic roles. 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 transition1
    • 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:

commandcurrent modifiersemantic role
converttogoal, format
emailtogoal
translatetogoal, format
fromsource
searchwithinstrument
wikipediainformat
yelpnearposition
weatherinlocation
twitterasalias
share-on-delicioustaggedalias
entitledalias

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! ^^


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

Related posts:

  1. Writing commands with semantic roles
  2. Ubiquity Commands by The Numbers
  3. Three ways to argue over arguments
  4. Ubiquity Parser: The Next Generation Demo
  5. Contribute: how your language identifies its arguments

Related posts brought to you by Yet Another Related Posts Plugin.

Tags: , , , , , , ,

If you enjoyed this post, make sure you subscribe to my RSS feed (optionally with tweets from my Twitter)!

9 Responses to “Rolling out the Roles”

  1. Ran Says:

    For share-on-delicious, the title is the alias (name) and the tags are probably positions ("in category x"). If not, then tags probably are a role not yet specified, but they are not names.

  2. Alejandro Moreno Says:

    "share-on-delicious as blah with tags x, y" could be used. Also "… using tags x, y". So maybe the tags could be an instrument? An instrument for categorization :)

    share-on-delicious {object} {as:alias} {using, with:instrument} and clean arguments for instrument, removing "tags"

    I don't know what I'm doing, but Ubiquity TNG is exciting!

  3. Walter K Says:

    Sounds like you are shooting for semantic language-dependent command parsing and full-blown inference engine… Is this the direction Ubiquity is taking? What happened to the initial idea of (fairly) short list of predictable commands that a user is able to master which speed up common everyday tasks? This new direction sounds like too big of a bite to take. I think many large companies spent decades of research on language processing and we have not seen a lot of results from that research yet.

    Don't take this the wrong way. I'd like this new engine to work, but this sounds like a very large project with many unknowns. Language differences are enormous. For instance, valid English command constructs might not make sense in another language. But if it just works for English commands, it might be good enough for now!

  4. mitcho Says:

    Thanks for your comments Walter. Healthy skepticism is welcome and encouraged!

    Perhaps I didn't make the goals for this approach clear… although I've called these "semantic roles" there isn't any actual semantic analysis going on… these are just "roles" which tend to have clear morphosyntactic markings in various languages. For example, an "instrument" role is normally marked by something like English "with" or "using"… a "goal" is marked by "to" or "toward", etc, and these two will not get mixed up. In many other languages it would be this way. The goal is to make use of these abstract notions of "roles" of arguments in the commands to help semi-automatically translate the argument structure of commands. The original post which explains this approach can be found here.

    I hope that helps explain what we're trying to do, but I don't think it's as big of an endeavor as the post would have you think. :)

  5. Gordon P. Hemsley Says:

    I think it's worth noting that I'm probably not the only one who would "save this page as PDF".

  6. Zach Lym Says:

    Why not just have share as the command with on being the modifier and auto suggest the social networking site based on history, cookies, usage, etc?

  7. Attachment Ambiguity—or—when is the gyudon cheap? Says:

    […] “April 15th” is an object argument, but it will only check its noun type, not put it in the correct semantic role (position). Perhaps this is something to think about in the […]

  8. A Demonstration of Ubiquity Parser 2 Says:

    […] Rolling out the Roles […]

  9. Adding Your Language to Ubiquity Parser 2 Says:

    […] property is the inventory of semantic roles and their corresponding delimiters. Each entry has a role from the inventory of semantic roles and a corresponding delimiter. Note that this mapping can be many-to-many, i.e., each role can have multiple po […]

Leave a Reply

mitcho.com uses Markdown with Smarty Pants for simple, lightweight markup.


© 2006–2011 mitcho (Michael 芳貴 Erlewine).
Proudly powered by WordPress on Media Temple.
The views expressed on these pages are mine alone and do not
reflect those of my employers and clients, past and present.