phrase - Manages databases used with the phrase input
method
phrase [-user class | -system class]
The phrase command is used with the following options only
to download phrase data to the VT382-D Traditional Chinese
terminal. For this terminal, phrase input is supported
directly by hardware. See DESCRIPTION for more information.
Download the phrase information for the specified
class from the system phrase database to a Chinese terminal.
Download the phrase information of the given class
from the user phrase database to a Chinese terminal.
The phrase input method is supported in the Korean, Traditional
Chinese, and Simplified Chinese environments.
Phrase input is a shorthand input method that automatically
converts a keyword into a phrase. An English text
example would be to map the keyword dci to the phrase Dascomb
Computers, Incorporated. In this case, when a user
enters dci in phrase input mode, Dascomb Computers, Incorporated
immediately appears on the screen.
Phrase input is supported by either hardware (specific
Asian terminals) or software. For the VT382-D Traditional
Chinese terminal, phrase data must be explicitly downloaded
to the terminal. When entered with either the -user
or -system option, the phrase command performs the download
operation for this terminal.
Note
For other Asian terminals in the VT382 family, phrase
input is supported through the SIM service. For these
terminals, the stty command both enables the SIM service
and also specifies the set of phrase information to be
used with the phrase input method. See stty(1) for more
information.
For the DECwindows Motif or CDE environments, phrase input
is supported through the input method server. In these
graphical user interface environments, the phrase input
method is enabled through the input method application.
Using the SIM service with terminal emulators in these
environments is not recommended because the SIM service
uses the 26th line of a terminal screen. Terminal emulator
windows do not contain a 26th line.
Without options, the phrase command invokes the utility
that manages and maintains the database that is used with
the phrase input method. By using this utility, you can
add and modify phrase keywords and the corresponding
phrase strings in the database. You create keyword/phrase
mappings within the context of phrase classes, which you
can also create through the utility.
Phrase Database Contents and Locations [Toc] [Back]
This section describes the entities that the phrase utility
creates and manages and the locations of phrase
databases on the system.
A phrase, or phrase definition, is a combination of
graphic characters in the range of hexadecimal values
0x20-0x7e and 0xa1-0xfe. The length of a phrase definition
can range from 1 to 80 bytes.
Each phrase is associated with a keyword, or phrase name,
which is a string of English alphanumeric characters. The
length of a phrase name is limited to 8 or fewer bytes.
A class is a group of related phrases. Each class is
identified by a class name. This name must be unique, must
contain only ASCII printable characters, and is limited to
a length of 8 or fewer bytes.
Regardless of whether phrase input is being supported by
hardware or software, recognition of phrase names and conversion
of phrase names to phrases is done only within the
context of a particular phrase class. Therefore, phrases
are always added, deleted, or modified in a class-specific
operation.
There are two kinds of phrase databases: systemwide and
user specific. There is only one systemwide phrase
database and this is created and maintained by the system
manager when logged in as root. Non-privileged users have
only read access to the systemwide phrase database. On the
other hand, each user can create and maintain a personal
phrase database. A user can access another user's personal
phrase database only by using a copy operation (assuming
file protections allow this). In other words, a user cannot
directly use the phrase input method with the private
phrase database of another user.
A system or user phrase database is actually a set of
locale-specific databases. Phrase data files for different
locales reside in different subdirectories of the same
base directory. (The base directory depends on whether the
phrase database is systemwide or user specific.) In each
locale subdirectory, two files, phrase.dat and class.dat,
contain the phrase database information for that locale.
The base directory locations of the system and user phrase
databases are determined by the sim service entry in the
/var/i18n/conf/cp_dirs file. This is true even when the
phrase input method is not being supported by the SIM service.
See cp_dirs(4) for more details about this file.
Menu User Interface [Toc] [Back]
When the phrase utility is invoked without any options, it
enters into a menu-driven mode. In this mode, you select
the appropriate menu option to make the utility perform a
particular function.
The main menus appear on a horizontal bar at the top of
the screen. Selecting some items on a menu may display a
submenu from which you then select a function. In the
upper right corner of the screen is the name of the current
database, which can be USER or SYSTEM, and the name
of the current phrase class.
When a menu option is highlighted, it can be selected by
pressing the Return key or the space bar. If the highlighted
option is not the one you want, you can highlight
another option (if any) by pressing the arrow key or a hot
key. The hot key is shown within parenthesis () or as an
underlined letter. You can return from the current set of
menu options to the previous menu or exit the utility
altogether by pressing Ctrl/X.
The following list summarizes the options on each main
menu. Options followed by an asterisk (*) produce submenus
in which you choose either the system or user database.
FILE Copy from Database (*) Load to Terminal (*) Exit
CLASS Create a class (*) View phrase in a class (*) Rename
a class (*) Delete a class (*) Select current class (*)
PHRASE Create phrase Modify phrase Delete phrase
LANGUAGE Local language English
Functional Behaviour [Toc] [Back]
When invoked without options, the phrase command runs the
phrase utility rather than attempting to download data to
a VT382-D terminal. The phrase utility automatically
accesses the appropriate default database (systemwide for
the root account and user for non-privileged users). If
this database does not exist, the utility will create the
database from data entered during the utility session.
Before invoking the utility, make sure that your locale
setting is the correct one for the phrases that you plan
to enter. Refer to Chinese(5) and Korean(5) for names of
appropriate locales. Refer to locale(1) for information
about setting locale.
When using the phrase utility, you must first set the
class name. By default, the class name is set to DEFAULT.
However, you can choose a different class name by selecting
the "Select current class" item of the Class Maintenance
menu.
The phrase utility supports a number of housekeeping functions.
For the following descriptions, remember that
database ownership is determined by user identity; only
the root account owns the system database. You can create
a phrase database entry by specifying a phrase name and a
corresponding phrase definition. The phrase entry is created
in the database that you own and in the database subdirectory
determined by the current locale setting. The
phrase belongs to the class that is currently set.
Duplicate phrase names are not allowed within a
given class, but phrases in different classes can
have the same phrase name. In the database that
you own, you can modify phrase definitions but not
phrase names. (You can delete a phrase and recreate
it to associate a new name with a particular
phrase.) You can delete phrases in the current
class from the database that you own. You can create
classes in the database that you own by selecting
the "Create a class" item on the CLASS menu and
selecting either the user or the system database to
work with. Then you can enter a new class name and
start to specify the names and definitions of the
phrases to belong to this class. You can delete
classes from the database that you own. You can
copy phrases from another user's database or the
system database to your own user database. To copy
phrases, select the "Copy from Database" item on
the FILE menu. If you choose to copy from another
user's database, you must enter the absolute path
to the base directory of that user's database. If
the specified path includes a valid database to
which you have read access, a class selection menu
is displayed from which you can choose the classes
you want to copy. If the names of the classes to
be copied are in conflict with existing classes in
your own database, you are offered the option to
rename the current conflicting classes. If conflicting
classes are not renamed, the phrases that
they contain are not copied.
The following information applies to Chinese terminals
that use the SIM service for phrase input support.
For most users, when the phrase utility is used to update
the phrase database, the appropriate simd daemon is notified
of the database update. However, this notification
mechanism does not work in a distributed environment. In
other words, when the updated phrase database on a remote
system is mounted on the local system through NFS, the
daemon on the local system is not notified of the update.
To work around this problem, the local user can enter the
following command to stop and restart the simd daemon so
that it can access the changed remote database:
% stty -sim % stty sim
In order for these commands to work, no other users on the
local system can be using the SIM service to access the
remote phrase database when the commands are entered.
Commands: locale(1), stty(1), simd(8)
Files: atty(7), cp_dirs(4)
Others: Chinese(5), Korean(5), sim(5)
phrase(1)
[ Back ] |