Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 28

Module 2

Chapter 7

Command and Natural Languages

• Introduction
• Command Organization Functionality, Strategies
and Structure
• Naming and Abbreviations
• Natural Language in Computing
Introduction
Basic Goals of Language Design
• Precision
• Compactness
• Ease in writing and reading
• Speed in learning
• Simplicity to reduce errors
• Ease of retention over time

Higher-Level Goals of Language Design


• Close correspondence between reality and the
notation
• Convenience in carrying out manipulations relevant to
user's tasks
• Compatibility with existing notations
• Flexibility to accommodate novice and expert users
2
• Expressiveness to encourage creativity
Introduction
Constraints on a Language
• The capacity for human beings to record the
notation
• The match between the recording and the
display media (for example, paper, printing
presses)
• The convenience in speaking (vocalizing)

3
Introduction
• Computer has had only modest influence on spoken
natural languages
• First Programming languages had strong mathematical
flavour - developed for non-interactive environment
• Newer applications - require languages for
communication and solving real world problems –
mechanisms for recording, manipulating and
displaying on a computer are necessary
• Command Languages originated with OSs
• Command Language systems may offer brief prompts
• A typical form is a verb followed by noun object with
qualifiers for verb/noun. E.g. print file 2 copies
• Natural language interaction - may be considered 4as a
complex form of command language
Introduction
• Command Languages are used to do a wide range
of tasks - Text editing, Electronic Mail, Financial
management, Airline or Hotel Reservations,
Inventory, Manufacturing Process Control,
Gaming

5
Command Organization Functionality
Designer should
• determine functionality of the system - Neither
excessive nor insufficient
• create a list of task actions and objects
• abstract this list into a set of interface actions and
objects and represent low-level interface syntax
• create a table of user communities and tasks, with
expected use frequency and 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, such as macros and customizing
6
system parameters
Command Organization Strategies
• A unifying interface concept or metaphor aids
learning, problem solving, retention
• Designers often err by choosing a metaphor closer
to machine domain than to the user's task domain

Strategies
1.Simple Command set
2.Command plus Arguments (plus Options)
3.Tree Structured Command Set

7
Command Organization Strategies
1. Simple Command Set
• Each command is chosen to carry out a
single task. Number of commands =
Number of tasks
• For small number of tasks - easy to learn
and use
• Danger of confusion - if the number of
commands is large

8
Command Organization Strategies
2. Command plus Arguments (plus Options)
• Each command is followed by one or more
arguments that indicate objects to be
manipulated
• Commands and arguments may be
separated by blanks or delimiters
• COPY FILEA, FILEB
• DELETE FILEA
• PRINT FILEA, FILEB, FILEC

• Keyword Labels for arguments may be


allowed to help for some users
• COPY FROM=FILEA TO=FILEB 9
Command Organization Strategies
• Commands may also have options to
indicate special cases
E.g. to produce 3 copies of FILEA on the
printer in the headquarters building
• PRINT/3,HQ FILEA
• PRINT (3, HQ) FILEA
• PRINT FILEA -3, HQ

• Error rates and the need for extensive


training increase with the number of
possible options

10
Command Organization Strategies
3. Tree Structured Command Set
• The full set of commands is organized into a
tree structure
• First level may be the command action,
second might be an object argument and third
might be a destination argument
Action Object Destination
CREATE FILE FILE
DISPLAY PROCESS LOCAL PRINTER
REMOVE DIRECTORY SCREEN
COPY NETWORK PRINTER
MOVE

• Offers a meaningful structure to a large


number of commands. 5X3X4 = 60 tasks
11
carried out with 5 command words
Command Organization Strategies

Command Structure
•Meaningful structure is beneficial for Task
concepts, Computer concepts and Syntactic
details of command languages
•Uniformly editing objects like characters,
words, sentences, paragraphs, chapters, and
documents is preferable
•If the operations are Overtype a character,
change a word, revise a sentence, replace a
paragraph, substitute a chapter and alter a
document – error rate grows substantially 12
Command Organization Strategies
Consistent Argument Ordering

13
Command Organization Strategies
• Command structure affects performance

Symbols Versus Keywords

14
Naming and Abbreviations
Names
•With larger command sets names make a difference if
they support a meaningful structure
•Specific and distinctive terms are more descriptive and
memorable than general terms

15
Infrequent discriminating words resulted in faster learning
Naming and Abbreviations
Abbreviations
•Command should be brief and easy to type
•Hence abbreviations become attractive

•Abbreviations should be accomplished by a


consistent strategy

16
Potential Abbreviation Strategies
1. Simple truncation: The first, second, third, etc.
letters of each command
• Can be of same length or not : Eg. a, del
2. Vowel drop with simple truncation
• Eliminate vowels and use some of what remains. If the
first letter is a vowel it may or may not be retained.
H, Y and W may be considered as vowels
3. First and last letter
• Since the first and last letters are highly visible.
Eg. ST for SORT
4. First letter of each word in a phrase
• Use with a hierarchical design plan
5. Standard abbreviations from other contexts
• Use familiar abbreviations. Eg: PRT, XTALK
6. Phonics: Focus attention on the sound
17
• XQT for Execute
Naming and Abbreviations
Guidelines for using abbreviations…
1. A simple primary rule should be used to
generate abbreviations for most items. A simple
secondary rule should be used for those items
where there is a conflict
2. Abbreviations generated by the secondary rule
must have a marker (like an asterisk)
incorporated in them
3. The number of words abbreviated by the
secondary rule should be kept to a minimum
4. Users should be familiar with the rules used to
generate abbreviations 18
Naming and Abbreviations
…Guidelines for using abbreviations
5. Truncation should be used. If it produces
identical abbreviations for different words,
adjustments must be found
6. Fixed length abbreviations should be preferred to
variable length ones
7. Abbreviations should not be designed to
incorporate endings (e.g., ING, ED, S)
8. Unless there is a critical space problem,
abbreviations should not be used in messages
generated by the computer to the user
19
Command Menus and Keyboard Shortcuts
Command Menus
• Instead of memorizing the commands - brief prompts
of available commands are offered – Command Menu
• Experienced Users – Do not need
• May turn off the menu – more screen space
• Intermittent Users – Refer sometimes
• Novices – May take Online help
• Eg. Lynx (Text only browser):
H)elp O)ptions P)rint M)ain Screen Q) Quit

Keyboard Shortcuts
• Single Letter command shortcut in GUIs. The letter is
underscored in the Menu. 20
Natural Language in Computing
• Translation Systems – Human intervention required

• Pre/Post processor at input or output


• Can be used for:
1. Interaction (NLI)
2. Queries (NLQ)
3. Text-database Searching
4. Text generation (NTLG)
5. Games & Instructional Systems

• Natural Language Processing (NLP): Natural


Language Tool Kit (NLTK) – Python Modules
are available for R&D 21
Natural Language Interaction - NLI
Natural Language spoken commands to give
instructions and receive responses

•No syntax to learn – No menu selections

•Impediment: NLI interfaces depend on assumed


user models – Knowledgeable users

•Might apply to task domains like Checkbook


maintenance

•Limited success and popularity only

22
N L Queries and Answering - NLQ
• Querying the database

• Modestly successful
• INTELLECT – Database querying system

• Question-Answering: MULDER , Q&A, English


Query

• More research is required

23
Text-database Searching
• Selecting documents from a large collection
• Filters and Parsers are necessary for queries
expressed in natural language
• E.g. “Find cases of tenants who have sued
landlords unsuccessively for lack of heat”
• WWW Search tools use natural language
techniques like stemming, filtering of common
words, latent semantic indexing etc.
• Analyzing the stored text and creating a more
structured format – Extraction – speeds up
searching
• Categorizing of documents based on contents24
Natural Language Text Generation
NTLG
• Modest applications
• Generation of structured Weather Reports
• Laboratory Test Reports
• Legal Documents
• Business Proposals

• Generated spoken reports from databases can


be made available over telephone in multiple
languages

• Creative works – Poems and Novels - have


many difficulties 25
Adventure Games
• Notable and widespread success in computer-
based adventure games

• Specifying some commands or directions of


movement etc.
• Take all the keys, Open the Gate, …..

• Not many games in the market now

26
Instructional Systems
• Natural language for tutorials have been
successful with some students

• Instructional systems for teaching Physics,


Electronics, Programming … have been
developed

• Introduced into automated scoring of speech

• Natural language competency is a key


component of technology for robots

• Many research projects are underway


27
Question Bank
1. What are the basic and high-level goals of language design? What
are the constraints?
2. What is the importance of functionality and task analysis in
identifying the necessary commands? What are the
considerations for expert users?
3. Describe the different command organization strategies.
4. Discuss on the command structure and benefits.
5. Bring out the importance of specificity versus generality in
naming.
6. What are the strategies for abbreviation?
7. What are the guidelines for using abbreviations?
8. Write a note on command menus.
9. What are the different situations in which natural languages can
be used in computing? OR
Write a note on Natural Language in Computing (NLI, NLQ, 28Text
based searching, NTLG, Games and Instructional systems

You might also like