Apple Newton Utilities Guia do Utilizador Página 653

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 942
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 652
CHAPTER 18
Intelligent Assistant
About the Assistant 18-7
Figure 18-4 Simplied overview of the Assistant’s matching process
Action Template
call_act := {
isa: 'action,
value: "call action",
Lexicon: ["yo", "call",
"phone", "ring"],
…}
Target Template
Parse raw input
person := {
isa: 'who_obj,
value: "person",
…}
aCall_act := {
isa: "action,
lexicon: ["call",
…}
calling_task:=
{
name: "Calling Task",
isa:task_template,
primary_act:call_act,
signature: [call_act,
who_obj,
where_obj],
preconditions:['action,
'who,
'where],
score:nil,
postParse:func () begin … end,
taskslip:mySlip,// view templt
}
aCalling_task :=
{isa:'action,
score:nil
raw:[...], // for internal use
phrases:[Call", "Bob"],
noisewords: ["for"]
origphrase: [Call for Bob"],
postparse:<function, 0 args>,
action:aCall_act
who:aPerson
// more template info,
}
aPerson :=
{isa: 'person,
value: "Bob",
…}
Call
For Bob
Matching "fax" in lexicon
of fax_action template
causes action frame to be
created from this template
Matching call_act template with the
primary action in calling_task template
causes the Assitant to use the calling_task
template to create the task frame
Matching "Bob" in
lexicon of person
template causes
target frame to be
created from this
template
Because "for" is not matched,
it is added to the noisewords
array. If a target is not found in
the original parse, your
PostParse method can try to
extract it from the task frame or
the appropiate soup.
Lexical matching & tokenization
Create frames from
registered templates
that match input
Create the task frame
Store action and target frames in
slots specified by
preconditions
Invoke post parse task
Vista de página 652
1 2 ... 648 649 650 651 652 653 654 655 656 657 658 ... 941 942

Comentários a estes Manuais

Sem comentários