> This command is only example. I search common solution. Here is
> suitable to change modifier keyword 'password' with 'with' but in
> other commands is not possible to select proper role.

With the move to make commands localizable and fit a more "natural  
syntax"[1], we now require that all arguments be specified using our  
finite set of semantic roles. The downside, as you note, is that  
syntax such as "login <user> password <pass>" and other such custom  
syntax is not supported. However, I believe this to be a positive  
thing, as all verbs use the same small set of modifiers which means  
there are less surprises for users, and all these modifiers are  
natural for users, even across languages (due to our new localized  
parser). All of these improve the learnability and memorability of  
Ubiquity commands and their syntaxes.

[1] http://mitcho.com/blog/projects/how-natural-should-a-natural-interface-be/

If you really would like to support this "login <user> password  
<pass>" syntax, there is actually a hack, which is to set one object  
to have a nountype which accepts input of the form "<user> password  
<pass>". If you would like to see sample code for that, I could  
quickly sketch something out.

If you have other specific commands and use cases which you'd like to  
find appropriate roles for, I'd love to field those questions. I'm  
often on irc.mozilla.org #ubiquity and that would be a great place to  
have such discussions.

mitcho

> On Jul 31, 4:53 pm, Brandon Pung <[email protected]> wrote:
>> Here ya go:
>>
>> CmdUtils.CreateCommand({
>> names: ["ods-authenticate-user"],
>> arguments: [
>>     {role: "object", label: "username", nountype: noun_arb_text},
>>     {role: "instrument", label: "password", nountype: noun_arb_text}
>> ],
>> ......
>>
>>
>>
>> On Fri, Jul 31, 2009 at 3:37 AM, mitache <[email protected]> wrote:
>>
>>> I am in the process of converting our ubiquity commands to work
>>> with Parser2.
>>> I have problems how to convert old modifiers with semantic roles but
>>> to preserve old modifier nouns?
>>> One typical command is:
>>
>>> CmdUtils.CreateCommand({
>>>  name: "ods-authenticate-user",
>>>  takes: {"username": noun_arb_text},
>>>  modifiers: {"password": noun_arb_text},
>>> ......
>>
>>> I want to preserve its syntax:
>>
>>>  >ods-authenticate-user <user> password <password>
>>
>> --
>> Brandon James Pung
>> Massachusetts Institute of Technology Class of 2010
>> Department of Electrical Engineering and Computer Science
>> 828.777.8640 | [email protected]
> >

--
mitcho (Michael 芳貴 Erlewine)
[email protected]
http://mitcho.com/
linguist, coder, teacher


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ubiquity-firefox" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/ubiquity-firefox?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to