Title: Command and Natural Language
1Command and Natural Language
- MSIT 159 User Interface Design and Development
2Design Goals for Any Language
- Precision
- Compactness
- Ease in writing and reading
- Speed of learning
- Simplicity to reduce errors
- Ease of retention over time
3Higher Level Language Design Goals
- Close correspondence between reality and language
notation - Convenience in carrying out manipulations
relevant to user tasks - Compatibility with existing notations
- Flexibility to accommodate both novice and expert
users - Expressiveness to encourage creativity
- Visual appeal
4Constraints on Language
- Capacity for human beings to record notation
- Match between the recording and the display media
(for example, clay tablets, paper, printing
presses) - Convenience in speaking (vocalizing)
- Successful languages evolve to serve goals
within the constraints.
5Functionality to Support User's Tasks
- Users do wide range of work, e.g.
- text editing
- electronic mail
- financial management
- airline or hotel reservations
- inventory
- manufacturing process control
- gaming
6Designer should
- determine functionality of the system by studying
users' task domain - create a list of task actions and objects
- abstract this list into a set of interface
actions and objects - represent low-level interface syntax
- create a table of user communities and tasks,
with expected use frequency - determine hierarchy of importance of user
communities (i.e. prime users) - evaluate destructive actions (e.g. deleting
objects) to ensure reversibility - identify error conditions and prepare error
messages - allow shortcuts for expert users, such as macros
and customizing system parameters
7GOMS Model for Command Language Interfaces
- Basic goal - speed and flexibility
- Basic method
- Step1. Think of and enter command verb
- Step2. Think of and enter next argument
- Step3. if more arguments then go to Step2
- Step4. if command is incorrect then correct the
command - Step5. Signal computer to process the command.
- Step6. go to Step1
8What makes a command language easy to learn and
use?
- Easy Command Synthesis
- User can think up command by analogy from
previously learned commands - Commands conform to simple rules rather than lots
of unique special cases
9Command Language Organization Strategies
- Simple command set
- Commands plus arguments
- Commands plus options and arguments
- Hierarchical command structure (command action,
object argument, destination)
10Benefits of Structures
- Ease of learning, use, and recall
- Easy to construct guidelines documents
- Permits discussion of impact of allowing
exceptions
11Command Language Abbreviation Strategies
- Simple truncation
- Drop vowel and use simple truncation
- First and last letters
- Standard abbreviations from other contexts
- First letter of each work or phrase
- Phonics (e.g. XQT for execution)
- Cross product languages verbs x objects
12Command Language Guidelines
- Make command terms easy to remember
- Provide easy command synthesis method and
abbreviation strategy - Provide simple, consistent command structure
- Commands should be right grain size
- Parsimony (no more commands than really needed)
- Studies show a few commands are used a lot by
most users - Provide for command reuse (replay, re-entry,
macros) - Avoid unnecessary distinctions among commands
13Natural Language Processing
- Eliza (Simon Laven Chatterbot page) Developed by
Wizenbaum simulated Rogerian therapy, there is no
real understanding, only a lot of clever tricks. - Pattern matching (primary and secondary)
- mechanical rewriting of statements into questions
- key word vocabulary (e.g. mother, hate, love)
used to focus attention - remembered concept (when deadends are reached)
- Early investigators thought that grammar (or
syntax) was all you needed to make an automatic
langauge translation system work. This was found
to be wrong you also need to consider semantics. - time flies like an arrow fruit flies like a
banana
14Context Free Grammars
- Context free grammar can be represented and
parsed by finite state machines. - These may be extended to form recursive
transition networks (RTN), which might be thought
of as FSM with networks labeling the arcs. This
allows the nodes to call subroutines (context
sensitive grammars). - Augmented transition networks (ATN) add registers
to RTN to store partially developed parse trees,
allow conditional execution of arcs, and attach
actions capable of modifying the data structure
returned. This means that ATN's are Turing
machines.
15Conceptual Dependency
- Roger Shank's approach to representing deep
meaning. - I gave the man a book
- ATRANS Abstract transfer (give)
- PTRANS Physical transfer (go)
- MTRANS Mental transfer (tell)
- P Past tense PP object or picture producer
- 0 Object case relation AA Action modifier
(aider) - R Recipients Act Action
- PA Picture modifier (aider)
16Conceptual Dependency (contd)
- How can conceptual dependency facilitate
reasoning? - Fewer inference rules.
- Many inferences are contained in the
representation - Initial representation of the sentence will have
holes. Plugging holes serves as focusing a
subject for future sentences. - Argument Against
- Long time to decompose knowledge into primitive
actions. - Conceptual dependency is good for representing,
this may not be good for all kinds of knowledge.
17How does Natural Language Processing (NLP) fit
into user interface design work?
- In natural language interface (NLI) queries are
open ended prompts like "what do you want to do?"
Which gives very little support to guide user
actions - Might be used in museum type applications to
allow natural language queries (NLQ) against
relational databases. NLQ is parsed and
translated to standard SQL. - Search engine searches against text database
(e.g. find cases where tenants sue landlords. May
allow modified SQL type query to search against
simple domain model. - Natural language text generation. Reports might
be written automatically from lab data or output
might make use of computer generated speech to
help the visually impaired. - Text-based adventure games. Restricted domains,
make parsing a little easier than continuous
speech recognition. Parser is a little more
sophisticated than Eliza.
18Turing Test
- The classic test of machine intelligence is to
have a person communicate electronically with two
entities (one a machine and the other a person). - If the inquisitor is unable to determine who is
the machine and who is the person "true
artificial intelligence" has been exhibited. - Each year a restricted version Turing
competition is held at the Boston Computer
Museum. - Some progress is evident, but more work needs to
be done.