Lexa

Corpus Processing Software

Vol.1 

Lexical Analysis and Information Retrieval

Raymond Hickey 
English Linguistics
Essen University 

Contents

Programme summary
Lexical Analysis
0.	Introduction
	0.1.	Text files
	0.2.	Databases
	0.3.	Tagging a text corpus
		0.3.1.	Lemmatisation	
		0.3.2.	Automatic tagging
		0.3.3.	Cumulative tagging
		0.3.4.	Manual tagging
		0.3.5.	Stop words
		0.3.6.	Locating tagged forms
		0.3.7.	Constructing lexical databases
		0.3.8.	Dealing with special characters

1.	Lexa
	1.0.	Introduction
	1.1.	Setup operations
		1.1.1.	System and text input directories
	1.2.	Statistics
	1.3.	Lemmatise
		1.3.1.	On-line text editing
			1.3.1.1.	Navigation keys
			1.3.1.2.	Deletion operations
			1.3.1.3.	Find and exchange operations
			1.3.1.4.	Miscellaneous
		1.3.2.	Special editing facilities
		1.3.3.	Command activation via picklists
	1.4.	Transfer
	1.5.	Function key settings
	1.6.	Use of initialization files
		1.6.1.	Sample initialization file
	1.7.	Starting Lexa in the batch mode
		1.7.1.	Using multiple lemma definition files
	1.8.	System limitations
	1.9.	Using the file slice mode
	1.10.	Command typology in Lexa
	1.11.	Troubleshooting with Lexa

Data processing

1.	Lexa Te
	1.0.	Introduction
	1.1	Startup options
	1.2.	Screen layout
		1.2.1.	Processing several texts with Lexa Text
		1.2.2.	Split screen
		1.2.3.	Command execution via picklists
	1.3.	Summary of commands
		1.3.1.	Text editing options
			1.3.1.1.	Navigation keys
			1.3.1.2.	Deletion operations
			1.3.1.3.	Find and exchange operations
			1.3.1.4.	Miscellaneous
		1.3.2.	Text appearence
		1.3.3.	Block processing
		1.3.4.	Printing options
			1.3.4.1.	Printer drivers and Lexa Text
		1.3.5.	Online calculation
		1.3.6.	File retrieval
			1.3.6.1.	File information
		1.3.7.	System facilities / saving texts
	1.4.	Macro facilities
		1.4.1.	Alpha macros
		1.4.2.	File lines macros
		1.4.3.	Text databases
		1.4.4.	Using word lists
	1.5.	Importing data from an external database
		1.5.1.	Using the database viewer
		1.5.2.	Navigation in database
		1.5.3.	System information
		1.5.4.	Locating field contents
		1.5.5.	Marking and exporting records
	1.6.	File management
		1.6.0.	Introduction
		1.6.1.	Directory lister commands
	1.7.	Initialization files

2.	Lexa Bat
	2.0.	Introduction
	2.1.	Summary of commands

3.	Lexa Form
	3.0.	Introduction
	3.1.	The structure of a form initialization file
		3.1.1.	Items in a form
		3.1.2.	Prototyping forms
	3.2.	Lexa Form desktop
		3.2.1.	Commands on desktop
	3.3.	Editing a form
		3.3.1.	Function key settings
	3.4.	Additional text in a form
	3.5.	Printing facilities

4.	Lexa Browse
	4.0.	Introduction
	4.1.	Function key settings
	4.2.	General key settings

5.	Lexa View
	5.1.	Function key settings
	5.2.	Command line parameters

6.	Lexa Hex
	6.1.	Function key settings

7.	Lexa Info

8.	Lexa Comp

Information Retrieval

1.	Lexa Pat
	1.0.	Introduction
	1.1.	Search switches and configuration
	1.2.	Sample searches
	1.3.	Disk options
	1.4.	File services
	1.5.	Function key settings
	1.6.	Internal text editor
		1.6.1.	Summary of commands
			1.6.1.1.	Navigation keys
			1.6.1.2.	Deletion operations
			1.6.1.3.	Search operations
			1.6.1.4.	Function key settings
	1.7.	Starting Lexa Pat in the batch mode
	1.8.	Retrieving Cocoa file information

2.	Lexa DbPat
	2.0.	Introduction
	2.1.	Database pattern matching
	2.2.	Database viewer
		2.2.1.	Navigation in database
		2.2.2.	Locating records

3.	Lexa Context
	3.0.	Introduction
	3.1.	Specifiable parameters
	3.2.	Various limits
	3.3.	Programme setup

4.	Lexa Sweep
	4.0.	Introduction
	4.1.	Configuration
	4.2.	Sweep options
	4.3.	File processing
	4.4.	Function key settings

5.	Lexa Search
	5.1.	Using a file list
	5.2.	Using a list of search strings
	5.3.	Command line options

6.	Lexa Replace

7.	Lexa Filter

Bibliography on Corpus Linguistics
Glossary of Corpus Linguistic Terms
Glossary of Computing Terms
Appendix A	User input editor
Appendix B	Directory lister commands
Appendix C	Mouse support

Foreword

The intention behind the present set of programmes is to put at the disposal of the interested linguist the tools he or she would require in order to process linguistically relevant data, most probably from an available corpus, with a high degree of automation on a personal computer. The package is divided into several groups which perform typical functions. Of these the first, lexical analysis, will be of immediate concern. The main programme, Lexa, allows one to tag and lemmatise any text or series of texts with a minimum of effort. All that is required is that the user specify what (possible) words are to be assigned to what lemmas. The rest is taken care of by the programme. 
	In the design of the current set flexibility has been given highest priority. This is to be seen in the number of items, in nearly all programmes, which are user-determinable. Furthermore, techniques have been employed which render the structure of each programme as user-friendly as possible, permitting the linguist to concentrate on essentially linguistic matters. 
	To the user who has little or no previous experience of computing a word of warning is called for: all technical explanations given below assume that one is acquainted with the basics of computer hardware and software and that one has at least some experience with word processing if not with database management. Those users for whom this is not the case are strongly advised to acquire the necessary background knowledge in these relevant areas before embarking on linguistic data processing. Most of these are covered by the text database on personal computing, PC_KNOW.TDB, which can be processed with Corpus Manager and by the various utilities on the basics of personal computing supplied with the Lexa set. 
	The present project spans a gestation period of a number of years. As it was drawing to a close I had the rewarding experience of cooperation with many colleagues, especially from Scandinavia. Particular mention is deserved by Merja Kytö and Matti Rissanen of the University of Helsinki who have given me many a sound suggestion for improvement from the point of view of the corpus linguist. From Norway I received welcome support from Stig Johansson of the University of Oslo and above all from Knut Hofland of the Norwegian Computing Centre for the Humanities in Bergen. It is he who was involved in all the practical work connected with printing the documentation and producing the software and it is to him that my debt of gratitude is greatest. 

Raymond Hickey						Munich 
								December 1992

Programme summary

I	Lexical analysis

1.	Lexa

This is the main programme of the current set. It allows one to automatically lemmatise any input ASCII texts, to create frequency lists of the types and tokens occurring in any loaded text, to generate lexical density tables, to transfer textual data in a user-defined manner to a database environment, to mention just the main procedures which are built into Lexa. The results of all operations are stored as files and can be examined later. Each item of information used by Lexa when manipulating texts is specifiable by means of a setup file which is loaded after calling Lexa and used to initialize the programme in the manner desired by the user. 

II	Data processing

1.	Lexa Text

A compact and flexible text editor intended primarily for editing both text files from a corpus and output files generated by such programmes as Lexa. On-line help, block processing, find and replace, undo delete and a system of text macros are included. Up to 20 texts can be edited at one time. 

2.	Lexa Bat

A combined editor and dispatcher for DOS batch files (or other files if you like). From a desktop you can survey the batch files on your disk, edit them with ease and execute them at will. 

3.	Lexa Form

A versatile form editor which allows users to fill in data of their own into pre-determined forms which are kept on disk. An internal module allows interfacing with databases so that field contents can be imported into fields of a form as can external text. Output of form data can be to printer or to file as desired. 

4.	Lexa Browse

The purpose of this utility is to allow the user to leaf through the files of an entire hard disk and view and/or edit them at will. You page through a directory listing and the beginning of each file is shown in a window; should you wish you may then view the entire file or call your own editor to alter it or hexedit it or whatever. During Lexa Browse you are still in DOS and can execute any command you like. 

5.	Lexa View

Permits the viewing of any input file (but not of course editing). Scrolling is allowed in both directions and you can search for and count strings. 

6.	Lexa Hex

Dumps a specified file in hex format. Offers the information in byte and text form as well and permits the user to scroll in both directions. At any stage you can edit a stretch of text as either hex or ASCII and save the changes to disk. 

7.	Lexa Info

Takes an ASCII file and carries out various counts, such as the number of characters, words, sentences, etc. and calculates a series of further statistics, all of which you can save to file, if you wish. 

8.	Lexa Comp

Takes two ASCII files, compares them and reports on differences if any are found. The lines which differ are listed and the results written to file. 

III	Information retrieval

1.	Lexa Pat

A pattern matching facility to allow searches for user-specified strings in files. Searches can be made to cover groups of files by using the DOS wildcards * and ?. A whole variety of switches offer the programme flexibility, e.g. a search can include all directories on a disk, can merely look for whole words, can report non-matches, etc. Various statistics pertaining to the search are offered and the results can be written to a file. Will work with binary files as well. Includes a desktop, from where all operations can be easily controlled, and an integrated text editor. 

2.	Lexa DbPat

A version of the previous programme which works with databases. You may comb through any number of databases in any number of directories for user-determined contents, specifying such features as whether all fields of a database should be searched or only the field chosen by the user. 

3.	Lexa Context

To determine whether strings or words occur in a certain context the present programme can be used. It allows the specification of many parameters of relevance such as one or two string search, the number of ambient or separating characters, the consideration of letter case and of sentence boundaries as well as the drive to be used, directory scope, etc. The results are written to an ASCII text file.

4.	Lexa Sweep

A menu driven utility for global ‘find and exchange’ operations over sets of files in which you can confirm replacements as they are made, edit files during replace procedures, increase scope to deal with an entire disk, just delete strings, write string finds to file, etc. Allows customization via initialization files. 

5.	Lexa Search

For quick searches of simple strings (without loading the files combed through) the programme Lexa Search should be useful. On finding the search string it auto-matically loads Lexa View and locates the string within the file and displays the section of the file where this is to be found. 

6.	Lexa Replace

Permits the substitution or deletion of a string or character (or several of these) in file(s) specified by the user. A switch determines the mode of operation. 

7.	Lexa Filter

With the help of an input table file the present programme allows you to change several bytes in a set of input files to a series of different bytes in one move. 

IV	Database and corpus management

1.	DbStat

This is one of the major programmes which allows the editing of dBASEcompatible databases directly. It is primarily intended for statistical calculations on data gleaned from texts processed with Lexa. To this end there are many standard statistical tests incorporated into the programme. DbStat is, however, a powerful database manager which will deal with any type of database in the dBASE format and allows the user to filter databases, append data from existing databases, copy databases to text files, import text files into databases, locate contents, selectively delete records during processing, etc. 

2.	DbTrans

For such purposes as pre-translation or normalization of texts the present programme has been included in the current set. It takes a terminology database (generated with DbStat for instance) and replaces any occurrences of input terms by corresponding output terms in a user-defined set of files. Various parameters for the operation of DbTrans can be set and the programme will also run in a batch mode. 

3.	DbPage

A desktop with a series of options concerning the interfacing of texts and databases. The programme allows you to generate a text file which can act as an input template for database records and then to import the textual information entered into such a template into an actual database, thus permitting you to collect information for a database while actually editing texts. 

4.	DbLook

A reduced form of the database manager DbStat. It can be used to view databases quickly with. You may scroll at will in the database. The display is on a one-record-per-screen basis; a browse mode and a field search facility are also included. 

5.	CompDb

In order to fulfill the frequent need of checking up on doublets in different databases this programme has been added to the set. On two halves of the screen the user can compare records, transfer from one window to the other, mark for deletion and search for contents among other options. 

6.	MergeDb

A means of merging any two databases with each other. The programme examines the second database and only imports those records into the first which are not already present in the latter. The checking can cover entire records or single fields. 

7.	ReportDb

A report form generator enabling users to determine the layout of the text which is created on exporting records from DbStat. From a comfortable interface, ReportDb allows users to place fields and extraneous text on a report form, store this to file and export any database using this form. Configurations of ReportDb can be stored as setup files on disk and be used repeatedly. 

8.	DbList

An interface with databases which creates user-determined lists from data contained in record fields. Lists can be generated in tabular form with several columns and output can be to file or to printer. Similar in command structure to ReportDb. Configurations of DbList can be stored as setup files on disk in an identical manner to ReportDb. 

9.	ClassifyField

A database utility with which you can classify the contents of a user-specified field of any database. The programme works by registering each unique word in the chosen field and writing the resulting list to disk. 

10.	PackMemo

A simple utility which compresses the text file created in association with a database which has a memo field, i.e. it packs a .DBT file which is structured according to the dBASE format for such files. 

11.	CalcStat

A desktop calculator with an array of functions. It allows complex expressions to be calculated and the results to be written to a file. Data entered can be collected internally and then used for statistical purposes, with the results displayed as a bar chart and stored to file for further processing. Numerical data can be loaded into the calculator to allow repeated processing of data from session to session. 

12.	Corpus Manager

Provides a means of structuring existing texts in the simplest way which then allows users to retrieve information selectively from within an easy-to-grasp user interface. The texts to be used can be determined by the user or prepared in advance by a supplier of texts, e.g. a university department compiling a corpus. The programme indexes text files for quick searching later. 

13.	CharacterIndex

Generates a word list from the file specified on the DOS command line, storing it as a new file. The word list consists of a list of all the words (but only registered once) which are preceded by the character which is passed to the programme. 

14.	DosDemo

An online demonstration of the normal interface of the operating system MS-DOS. Typical mistakes are simulated and explained with tips as to how these can be avoided. An explanation of DOS error messages and how memory is used along with a dictionary of computer terms is included. 

15.	DosDict

A text-oriented dictionary database manager which comes with a file containing comprehensive definitions of the most common computer terms. The programme offers all the basic functions such as adding, deleting and searching for records. The user can specify the file to be loaded and so maintain several files at once. 

16.	DosHelp

Something for the beginner to help him/her on the way to proficiency in DOS. It offers on-line descriptions of all the more common operating system commands with examples on a series of 38 screens. 

V	Utilities

1.	Lexa Control

The intention of the present programme is to provide users of the Lexa set of programmes with a convenient platform from which to launch any of the items of these packages along with a brief explanation of what they do. Note that each time a programme is started the entire system memory used by Lexa Control is released. Thus there are no size restrictions on the programmes which can be launched. General information concerning Lexa is available via F10 and assumes that the file LEXAINFO.TXT is accessible. 

2.	Lexa Desk

Here the user is offered a single interface as entrance point for the entire set of programmes in the Lexa package. The desktop functions as a launching pad and is arranged in groups which correspond to typical functions realised by the data processing utilities and which offer quick orientation for the user at the outset. 

3.	Lexa Shell

A command shell which provides swift and easy access to the Lexa set. The shell is arranged such that you can use it for the internal options or for normal DOS commands and programmes. There are two main levels within the shell. You may move from level to level without effort. Most importantly, the user can configure the shell to suit his/her own needs and store the setup to disk. 

4.	Lexa File

The file manager for the Lexa package. The intention is to provide a convenient environment for typical management tasks. From a series of picklists the user can carry out various operations necessary when managing disks such as formatting and copying, directory control, disk scanning, etc. as well as copying, deleting and renaming files. On-line help and a diary are available and DOS commands can be processed; DOS can be loaded temporarily as well. 

5.	Lexa FileCat

A database generator with which one can transfer the information on the files of a hard disk to a dBASE database (created internally by Lexa FileCat). The user can specify the drive to be used, the directories to be searched, the file template to be matched, etc. 

6.	Lexa Backup

A utility which allows you to specify parameters from a desktop (and save these to disk) which are used when examining any number of drives and directories to copy or delete files or just create a disk log file of the latter. Size and date filters can be set and inclusive or exclusive file templates can be used during backup operations. 

7.	Lexa Move

A file copying utility which shows you what is happening during its operation; it can be run interactively or from the command line. 

8.	Lexa Dirs

Offers a list of the directories on a disk in tree form. By using the arrow keys you can move a highlight bar and, by pressing Return, change to a new directory. The tree structure can also be written to a disk file. The second function of Lexa Dirs is as a directory switcher. By typing the fragment of a path on the DOS command line, the programme switches to the next directory it finds which matches this. 

9.	Lexa Find

A means of retrieving file information in a comprehensive and visually effective manner. The contents of an entire disk are read by the programme, the files then being listed in a column on the left of the screen, while the directory in which each file is to be found is highlighted in a tree graph on the right. As with Lexa Browse you can edit/view/hexedit any file you like, call it with an external programme or issue any DOS command via an input line at the bottom of the screen. 

10.	Lexa Scan

A disk search facility which enables you to comb through your disk for a file you specify. The legal DOS wildcards * and ? are permissible to allow searches for more than one file. The output of a search can be viewed on the screen or written to a file (determined by a command line switch). 

11.	Lexa Print

A stand-alone pretty print programme. There are a whole series of switches which allow one to determine page layout and printer pitch, header, page numbering, etc. for the file to be printed. Several files can be specified at once as can a number of copies of the same file. Works with all 24 needle dot matrix and laser beam printers. Includes a desktop from where all operations can be easily controlled. 

12.	Lexa Sort

Sorts an input ASCII file into ascending alphabetical order. The sort can be made to start at a specified column or tab number. In addition, the length of time the sort takes is recorded so that the programme can be used as a benchmark for computer performance (as sorting is entirely in RAM eliminating the factor of disk access). 

13.	Lexa Chain

A utility which links any series of input text files together to produce a single composite output file. This file can be processed by Lexa afterwards, e.g. to force the latter programme to analyse a very large text file. Lexa Chain also generates a log file to allow you to keep a record of what files have been linked together. 

14.	Lexa UnChain

The reverse of Lexa Chain so to speak. It unravels the text files contained in a composite file and allows you to edit these normally before possibly re-linking them with Lexa Chain. 

15.	Lexa List

A directory lister with a difference, namely that it allows you to scroll forwards and backwards in any directory which, if not the default one, is supplied as a command line parameter (DOS wild cards are permissible). You can change both directory and mask within the programme and specify the sorting order of listings as well. 

16.	Lexa CrLf

A small programme to extract the carriage return/line feed characters from an ASCII text file and so allow it to be imported and automatically word wrapped by any word processor. 

17.	Lexa LineNo

Takes any set of input files and adds line numbering to them. This programme recognizes Helsinki Corpus texts and can use separate file numbering for composite files, include them as comments and delete line end markers to achieve natural line wrapping. 

18.	Lexa Adjust

The idea behind the present programme is to allow users to extract a section of a large file, process it (e.g. with Lexa for grammatical analysis) and re-insert it into the original file. By these means it is possible to analyse parts of very large files without worrying about whether these will fit into system memory when another programme is loaded. 

19.	Cocoa

With this utility users can extract the information contained in the Cocoa-style header for each file of the Helsinki and other text corpora, depositing this in a database which can be edited with DbStat or DbTxt afterwards. 

20.	Lexa Byte

A much expanded version of Lexa Hex which allows you to hexedit two files at once, compare them for differences, search for strings, etc. In addition it includes file management facilities similar to Lexa File and a hex print option. 

21.	Lexa Kill

A global delete programme. Permits the deleting of files in all directories of a disk (the current one or another) which match a file specification. User confirmation can be disabled for those who know what they are doing. 

22.	Lexa MkAsc

A utility to convert any input file to an ASCII output file. You can specify how long each line in the resulting text is to be and if the upper ASCII symbols should be filtered out or not. 

23.	Lexa Strip

Removes formatting information from an input file. By this is meant that all characters below $32 and above $126 are filtered out (the upper ASCII area can be left untouched if the user so desires). This can be useful when transporting texts from one environment to another. 

24.	Lexa Mem

A simple utility to show how system memory is currently occupied. Useful when checking on memory-resident software. 

25.	Lexa ExtMem

Shows whether the current machine has EMS support and how much expanded memory is available. 

26.	Install

In order to facilitate the quick installation of the Lexa package, an install programme has been included on the first distribution diskette. This will make the necessary directories, alter your DOS path and adapt your AUTOEXEC.BAT file for operation with the Lexa set. 

VI	Font module files

1.	Lexa Keyboard

A special keyboard driver for which users can determine the settings (with LexaSetKey). A pre-adapted driver, KEY_HELS.EXE, is supplied with Lexa in which the special symbols of the Helsinki Corpus (for Old and Middle English) have already been assigned to combinations of the right Alt key and a letter. 

2.	Lexa SetKey

A keyboard manager with which you can customize the supplied keyboard driver LKEYB.EXE to suit your needs. In all, five keyboard layouts per driver are permitted. This allows you to access the entire extended ASCII character set without having to resort to entering the values of symbols on the numeric keypad. 

3.	Lexa Perm

A utility with which users can load a video font file into the adapter of the computer permanently (until the computer is reset). Works with EGA and VGA adapters and allows special fonts to survive the video reset which so many programmes make when loaded. 

4.	Lexa LoadVid

This utility is similar to Lexa Perm only that fonts loaded may well be discarded by programmes started later (this may be desirable). It can also be used to load a special font for use with a Hercules Plus video adapter. 

5.	Make Symbols

Takes any set of input files and combs through them for occurrences of special character codes of the Helsinki Corpus type and then converts them to the actual symbols as defined in the Lexa font module. This means that a sequence such as "+t" is converted to the actual thorn character. Otherwise input files are left unaltered. 

Lexical Analysis

0.	Introduction

0.1.	Text files

Text corpora It is fair to say that any data which users of the present programmes will process will initially be in text form. This is due to the fact that the software is intended for use with text corpora. A text corpus consists of a collection of files which contain pure text, i.e. the files it comprises are in the so-called ASCII format. An exception to this is the special case where one commences with texts which have been indexed for use with particular software in advance. But even in such instances, the actual text files usually remain in the original ASCII format, i.e. they do not contain any information which is specific to a certain word processor. This is in sharp contrast to the situation with the text files one may generate with one’s word processor on a personal computer. Here the file which contains a text will also include information for the formatted output of the text on a printer, e.g. information concerning the layout of the page (page length, left/right margins, etc.), the attributes used for certain letters or words (boldface, italics, etc.). Formatting information is always specific to a particular word processor and so cannot be intelligently interpreted by some other programme. Bear in mind that if you wish to analyse a text, which you have processed or created with a word processor, with corpus processing software such as Lexa then you must store it to disk without any formatting information (this option will always be available in your word processor). 

The meaning of the term ‘text’  Users of computers should bear in mind that in computer use the term text has a very definite meaning. A text is a collection of informational units (usually bytes) which are arranged as an unstructured number of lines. There may well be a semantic structure to the text (determined by its contents) but for the computer a text contains no inherent structure. In computer use, the term ‘text’ is frequently used somewhat loosely to refer to an ASCII (i.e. non-formatted) text. 
	With an ASCII text there is a pre-defined set of characters which trigger the end of a line: ASCII $13 and ASCII $10 (called carriage return and line feedrespectively). Any programme processing an ASCII text thus knows where a line comes to an end. 

0.2.	Databases

The second major file type, after text files, is the database. Linguists should note to begin with that this term is used differently here than in their discipline. While a database to a linguist (or social scientist, etc.) is the collection of data which is used to infer conclusions from, for a computer scientist a database is a file type with a definite structure. A database can be filled with data (imported from elsewhere, e.g. from a text file, or entered directly). 
	The advantage of the database vis à vis the text is that it can be manipulated much more efficiently. Take a simple example for the purposes of illustration. A bibliography can be typed into a word processor and directly outputted on a printer; it can equally be entered into a database and then exported to a word processor. The latter method requires somewhat more work as the database to receive the bibliographical data must first of all be created. Furthermore, the data cannot be keyed in indiscriminately with a database. This fact has to do with the pre-defined structure of the database: each item for the bibliography must be assigned a separate record and the sections on each item must be entered into different fields which are reserved for typically recurring information. It is precisely this manner of organization which permits such effective manipulation of databases by the user at any stage during processing, something which is not possible with a simple text file. 

Database = Group of Records        Record = Fixed Set of Fields with
                                                       Contents Entered by User 
Record 1
    Record 2
        Record 3 
             Record 4                     Field Name 
                  Record 5                    |     
                                                TOKEN       receive
                                                LEMMA                                                              
                                                ROM_VERB 
                                                FREQUENCY   17
                                                REVERSE     eviecer
                                                                           |
                                                                       Field Contents   

Databases can be seen as the electronic counterpart of a box of index cards or a filing system. As such it is advisable to enter any data into this type of programme which would require one of these non-electronic means of storage under normal circumstances. 
	With reference to the kind of data processing at hand, databases have a specific function to fulfill, namely to extract lexical information from input texts and store this in a form which will allow later manipulation according to user-specified criteria. 

0.3.	Tagging a text corpus

Before any kind of useful analysis can be performed on a text corpus it is necessary for it to be tagged. This is an operation which is carried out by the data processing software. In essence tagging works as follows: each word in a file is examined and a label is added to it to identify it grammatically. 

Stretch of text before tagging

	A marchant was ther, with a forked berd,
	In motlee, and hye on horse he sat,
	Upon his heed a Flaundryssh bevere hat,
	His bootes chasped faire and fetisly

Stretch of text after tagging

	A_ART marchant_NOUN was_VERB ther_PREP, with_ADV a_ART forked_ADJ berd_NOUN,
	In_PREP motlee_NOUN, and_CONJ hye_ADJ on_PREP horse_NOUN He_PERPRO sat_VERB,
	Upon_PREP his_POSSPRO heed_NOUN a_ART Flaundryssh_ADJ bevere_NOUN hat_NOUN,
	His_POSSPRO bootes_NOUN chasped_VERB faire_ADJ and_CONJ fetisly_ADV

It is obvious from the above illustration that the tags are placed after the words they refer to and are separated by a single underscore (_). This is a widely accepted convention (cf. the London-Lund or the Lancaster-Oslo-Bergen corpora). The tag itself is the capitalised abbreviation used to unambiguously classify the word in question. Needless to say for an ensuing grammatical analysis of any sophistication, it would be necessary to devise more refined categories than those used above. 
	Tagging may be done manually by the computer operator deciding as he/she goes through the text how each word is to be classified. However, the task is impracticable unless one resorts at least to a degree of automatic tagging. 

0.3.1.	Lemmatisation

The term lemma is used in lexical data processing with the equivalent meaning of lexeme in general linguistics. A lemma is thus an abstraction of the set of inflected forms which are united by a common semantic core. For instance the attested forms walk, walks, walked and walking all belong to the lemma walk. In the lexical analysis of a corpus the concern is then to group together inflected forms and somehow mark them so that their semantic affiliation is obvious. 

0.3.2.	Automatic tagging

Lexical tagging. With any type of computer analysis involving automatic procedures it is necessary for the computer operator to initially lay down the criteria which the system is to use for classification. 
	 When tagging a corpus with the Lexa software this can be achieved as follows. The computer operator creates a file with a list of tags contained in it. After each tag are listed those forms which can be given the tag in question. When involved in lexical tagging, the user enters the keyword Lemma on a line and after this the lexeme to which the ensuing form belongs. 

		LEMMA: SING 
		TOKENS: WORDS 
		sing
		sings
		singing
		sang
		LEMMA: WALK 
		TOKENS: WORDS 
		walk
		walks,	etc.	

Before initiating a tagging session the computer operator specifies which tag list file is to be used for the run. The system reads the file and fills an internal table with the definitions contained in the tag list file. 
	Technically the steps are as follows: a two-dimensional array is allocated in memory from the heap (that section of system memory which can be used for data by the programme which is currently running). One dimension of the array contains the names of the tags which are defined in the tag list file; the second dimension contains the forms which are defined as being tokens of a particular tag. You can envisage this as a series of rows and columns with types and tokens occupying vertical and horizontal positions respectively. For every word in a text which is tagged, Lexa combs through the entire array of tags to see if the current word is a token of some tag or other. If the search for a match is positive the relevant tag is attached to the current word and the system proceeds to the next word. 
	For the Lexa programme a tag can be of two basic types: (i) it refers to a lemma, i.e. a dictionary entry which subsumes a whole series of inflected forms, in which case the tag begins with the keyword LEMMA or (ii) it indicates a word class or morphological category, in which case the keyword CLASS is to be found after the tag. 
	You will have remarked that on the next line after the lemma in the above example the keyword TOKENS occurs; immediately following this is either the word WORDS or STRINGS. This is noted by Lexa and when lemmatising a text the tokens which are found in the input file are either treated as whole words or as strings. Take an example to see what advantage is to be gained from this. Say you have defined a set of prepositions as follows: 

		CLASS: PREP 
		TOKENS: WORDS 
		for
		in
		out
		on

When later combing through a text Lexa will only mark occurrences of these tokens as instantiations of the word class PREP (the same would apply to a lemma) which form whole words thus avoiding incorrect tagging such as foreigner_PREP, intake_PREP, outgoing_PREP, button_PREP. 

Grammatical tagging When dealing with inflected forms it is no longer sufficient to use list of lexemes as a basis for successful tagging. The solution is to create a tag list file which consists of sub-word morphemes and to allow the data processing software to determine class affiliation on the basis of a morpheme being present in a word form or not. Consider the following extract from a list file for grammatical tagging: 

		CLASS: PAST_PART
		TOKENS: STRINGS
		#y*e#
		#y*en#
		CLASS: ADV
		TOKENS: STRINGS
		ly#
		CLASS: PREFIXVERB
		TOKENS: STRINGS
		#pre
		#fore   		CLASS: FRENCHVERB 
		TOKENS: STRINGS
		ceive#	

It should be obvious just what type of returns one is expecting with such a list. Note that the fore tag for a prefix verb will not of course yield unambiguous results as words like forehead, forelimb would be returned if present in a text which is examined. Equally the ending ly will return words like fly which must be re-classified manually afterwards. 
	One solution to the difficulty of unacceptable returns is to perform some other type of tagging beforehand which would capture these forms. Once they are tagged they will not be re-tagged by the system. 
	Another solution would be to create a stop word file (see below) with those forms listed in it which one does not want tagged. Of course this alternative is really only viable if the set of potentially undesirable tags is fairly small. 

Note With the Lexa programme if the symbol ‘#’ (or a user-specified word delimiter) is placed before an affix then it must occur at the beginning of a word; if it is placed at the end then it must be at the end of a word. The word delimiter can be used at the beginning and end of a token. DOS wild cards, * and ?, can also be used to leave (one or several) characters unspecified. 

0.3.3.	Cumulative tagging

Not all the words of a text need to be tagged on one run. In fact it is sensible to tag the most obvious words (those which constitute a small closed class of items) first and then gradually work on to the more difficult classes with hopefully only a small number of non-classified items left which have to be dealt with manually by the computer operator at the end. 
	When the data processing software examines a text a mechanism can be used to determine whether any given word which it strikes upon has already been tagged or not. If every tag begins with a pre-defined character, say an underscore, and if the underscore does not occur as a constituent of any normal word of the text then any given word can be examined to see if it contains an underscore. Should this be the case then the word has been tagged on a previous run, if not, then the data processing software is to attempt tagging this time. 

0.3.4.	Manual tagging

No matter how good the tagging algorithm is there will always be a residue of word forms which cannot be automatically classified. These must be tagged manually. To do this one must demand that the computer operator decide on the tag to be attached to any words found in a text being examined which have not yet been classified. Bear in mind that manual tagging is always necessary with ambiguous forms as the data processing software can only use formal criteria to determine class affiliation. 

0.3.5.	Stop words

The easiest forms to tag are those which form a small closed class, e.g. the articles in English.  However, these forms are usually of little interest to the linguist examining a corpus. What is then desirable is to filter them out and concentrate on the remaining forms. This can be achieved quite easily. The first step to this end is to create a list of those words (called stop words in computer jargon) which are to be ignored. When the data processing software then examines a text file it first checks to see if a given form has been labelled as a stop word (by looking it up in an internal table). If this is the case the form is ignored and it precedes to the next. 
	Evading stop words can be achieved either by excluding them from a tagging operation or by erasing them from a file to start with. One might care to create a temporary version of a text file without stop words as this would speed up tagging later (after all there would then be no cases in which forms are examined and then discarded by the system). 

0.3.6.	Locating tagged forms

At any point when processing a corpus it may be expedient to both tag certain sets of forms and then locate them to see just what words were affected by the tagging. This can be realized within Lexa when dealing with single files. If a broader scope is required, covering a group of files, for instance, then the easiest way of satisfactorily locating tagged forms involves using one of the many information retrieval programmes in the Lexa set. The supplementary programmes one can avail of are Lexa Pat, Lexa Search or Lexa Context, for text files, or Lexa DbPat, for databases. 

0.3.7.	Constructing lexical databases

A frequent desideratum when lexically analysing a corpus is to construct a dictionary with grammatical information included on the word forms which constitute the dictionary. Such a task becomes quite easy with a lemmatised text. The first step (or rather sequence of steps) is the complete lemmatisation of the corpus in question. Once this has been achieved the data processing software can now extract information from the text and deposit it in a database. Recall that a database is a structured file which consists of a number of records, each in turn consisting of a number of fields. A typical lexical database has one record per word form. 
	The programme Lexa constructs a (primary) lexical database by generating an empty database with a minimum of four fields as follows (this is all that is required at this stage; lexical databases can of course be manipulated later with a database manager such as DbTxt). 

		Field 1:	TOKEN 
		Field 2:	LEMMA 
		Field 3:	FREQUENCY 
		Field 4:	REVERSE 

Each word form in the database occupies a record of its own. The system starts by checking to see if a particular record is already present in the database. If not, a new record is appended and the word form is entered automatically in the field TOKEN. The lemma is extracted from the tagged word by locating the lemma divider character (by default an underscore) and copying the remainder of the word form (up to the next space) into the field LEMMA. The field FREQUENCY is incremented each time an occurrence of the particular type of that record is found. Lastly, the field REVERSE contains the word form in reverse order. The idea behind this is to allow users to create a reverse dictionary (by sorting the database on the field REVERSE) thus making it much easier to recognize what inflectional information is contained in the word forms of the database. 
	After the process has been completed, you are left with a database which has as many records as there are unique word forms in the corpus examined. Note that should a word form not be lemmatised in the corpus for some reason then the form is nonetheless added while the field LEMMA is left empty. 
	Apart from the database type just outlined above it is possible with Lexa to generate a database which has one record per lemma. This is a secondary database which is reached by first creating an empty database manually (e.g. by deriving a shell database from a Lexa database via the appropriate option on the DbStat or DbTxt desktop) and then importing the information from a frequency list file into it subsequently. The information in the latter type of text file (see appropriate option in Lexa) is organized into lines with three items on each: a unique word form, the lemma attached to it and the number of times it occurs in the database (frequency). These items of information always begin in the 1st., 33rd. and 49th. columns of each line in the text file respectively. Due to this organization it is easy to import the information into a database by treating the frequency text file as an SDF (= system data format) file and using it as the source of a text importation operation with a database manager (such as DbStator DbTxt). 

0.3.8.	Dealing with special characters

Almost every linguist is confronted at some stage when processing data with the difficulty of special characters, e.g. those of the phonetic alphabet. For users of any type of personal computer modelled on the original IBM PC there will be a set of 256 characters at one’s disposal. These cover the English alphabet, those special characters required for the major European languages and a (small) selection of symbols from the Greek alphabet. As soon as one needs just a single character which is not already in the so-called extended ASCII character set, the problems arise. A number of solutions are available here. The simplest is to use some character which is available (and not otherwise required) and to remember each time one uses or sees this that something else is intended. This is quite definitely a makeshift and is only acceptable as a last resort. 
	The most elegant solution is to design symbols of one’s own. Consider the case of the linguist who requires six additional symbols to be able to process Old English data satisfactorily. With appropriate software one can re-design the shape of symbols (actually numeric values) which one does not require. Then each time one activates the numeric code which the altered symbol has one obtains the special symbol on the screen. There are a number of difficulties here which are of a technical nature (e.g. one must ensure that no programme rejects the symbols one has designed or switches to a video mode in which these are no longer available). However, the method basically works. To see the symbols on paper it is necessary to design special characters for one’s printer as well. This is usually taken care of by the font editing software one is using. If one links the symbols on the screen with those for the printer (or in the simplest of cases just uses the same numeric values in both cases) then one can see and print any special characters one wants. Adapting the keyboard to deal with new symbols allows one to type them in from keys of one’s own choice. 
	The main difficulty with altering the standard font of one’s computer involves data transfer to another computer or another data processing environment (a computer of a different type). If one has re-defined the shape of some characters to achieve shapes one requires for a special alphabet then this re-definition must be applied to any computer on which you wish to transfer data which you have collected otherwise one’s special characters are no longer available (they are replaced by the shapes of the original characters one re-defined). However, for stand-alone computer operations within the arena of IBM-compatible personal computers, these problems do not arise. 
	For a practical example of how the management of a special font is realised users should consult the section of Vol.3 of the present documentation entitled Font Module Files. 

1.	Lexa

Syntax:  lexa [ini_file] [/b] 

1.0.	Introduction

The present programme is intended for automatic lexical and grammatical analysis of texts. It takes normal ASCII files as input, reading them into system memory, and depending  on the procedures demanded by the user carries out one or more operations on these, writing the results back to disk in the form of output text files. The latter can then be used for further linguistic analysis. 
	The emphasis here is on automation. Lexa attempts to analyse texts as accurately and as comprehensively as possible going on the information specified by the user in a definition file. By these means most of the work which would have to be done manually is achieved by the software, thus releasing the linguist from time-consuming work which would of necessity sidetrack himself or herself from actual linguistic analysis. Indeed the operations which are possible with Lexa will hopefully enable the linguist to reach insights concerning the texts analysed which would remain hidden because of the great difficulty of performing manually the tasks accomplished by the programme. 

1.1.	Setup operations

This is the group of options which is displayed when Lexa is loaded. It is the rightmost menu on the screen; to change to others use the Left, RightArrow keys. As you move the current menu is closed and the next is opened. To move vertically within a menu, press either the Up, Down Arrow or the PgUp, PgDown keys. 

Load directory file A list of all the files in the current directory is presented in a window on the left of the screen when you choose the current option. You may move the highlight bar up and down in the list with the cursor keys. Note that you may furthermore log in a new drive via F4 (this offers you a list of the logical drives on your system) and enter a new file template for the listing with Shift-F4, using the wild-cards which users will be acquainted with from DOS. 

To load a text for analysis by Lexa, press F5. The screen changes and you and informed that Lexa is reading the file into memory. When this is concluded a few statistics are displayed and by pressing any key you may continue. 

Read input text file Assuming that you have specified a text file for analysis in an initialization file, this option will now read this text into memory, i.e. you do not have to choose a file from a directory listing as with the previous option. 

1.1.1.	System and text input directories

The files which are used and or processed by Lexa can be divided into two main groups. The first are system input files, above all the setup file (by default lexa.ini) along with the lemma definition file(s) used to glean tagging information from. In all there are seven system input files. 

	SYSTEM INPUT FILES

	1)	Setup file
	2)	Help system files

	3)	Lemma definition file
	4)	List of lemma definition files (used in batch mode)

	5)	Manual tag file
	6)	Stop word file
	7)	Alt-macro file

The second main group is that of text files. Of these the files to be processed are input files, those to be generated are output files. 

	TEXT INPUT/OUTPUT FILES

	1)	All text input files

	2)	All text output files, specifically:
	
		(i)	Lemma output file
		(ii)	Database file
		(iii)	Delimited text file
		(iv)	Token text file
		(v)	Type text file
		(vi)	KWIC concordance
		(vii)	KWOC concordance
		(viii)	Search output file
		(ix)	Clipboard text
		(x)	Log file

Now if the user specifies nothing to the contrary, then the Lexa home directory is searched for system input files and all text input files are expected in the current DOS directory; furthermore all text files generated are deposited in the current directory. 
	The files 3) to 7) of the System Input Files can be maintained in another directory by entering a full path in the setup file, stating where they are to be found. A setup file can be located anywhere apart from the home directory as long as you specify this on the command line when you start Lexa. A different directory for the programme and its setup file leads to Lexa expecting the files 3) to 7) in the setup directory. By these means you can use a special directory for the system input files 1) and 3) through 7). 
	Furthermore any system input file can be loaded from any directory by doing  this manually from the desktop via an appropriate picklist option. 

A different directory for text input and output files can be achieved by either specifying this at the appropriate point in the setup file or simply by choosing a text input file from a file listing (directory window) on the desktop. Once a file is chosen by this means, Lexa automatically resets the text input/output directory to the one currently displayed in the file listing and thus re-directs all files to be generated to this destination. 

Set current directory Allows you to specify the directory which is to be used during the operation of Lexa. By default this is the DOS current directory, i.e. that from which you loaded Lexa. If you change directory then output files are now written to this and a listing will by default contain the files of this directory. 

Specify text editor Permits the specification of the editor which the user wishes to use. The name you enter here should be that of a valid DOS programme which is accessible (either in the current directory or reachable via the DOS path variable). Be careful not to enter the letters after the dot in the full file name, e.g. enter MY_ED and not MY_ED.EXE! 

Edit current setup Calls the user editor with the name of the standard initialization file, lexa.ini, passed to it or a user-determined setup file if one was specified on the DOS command line when loading Lexa (see syntax of programme above). 

Load search output Works just like the previous option only this time the file name passed to the editor is SEARCH.$$$ (or a user-specified search output file name) which is the file written to disk with the contents of a search of the currently loaded text in memory. 

1.2.	Statistics

Here a number of options have been grouped together which all have to do with the determination of statistics concerning the currently loaded text. 

Show text statistics This just displays the statistics on the current text which are offered to the user after loading the file initially. 

Token lexical density A text file is created with the present option which contains the unique word forms of the currently loaded text arranged in ascending alphabetical order of their frequency, offering the user a picture of the density of word forms in the text. 

Lemma lexical density This is similar to the previous option with the difference that the lemmas of the word forms (i.e. the tags) in the currently loaded text are arranged in the output text file according to frequency of occurrence. 

Display environment Shows a windowful of useful information on the current system environment. This is purely informative and has no bearing on the operation of the programme. 

1.3.	Lemmatise

Autom. lemmatise text For many this will be the essential function of Lexa. Assuming that a text has been loaded by the user and that a valid lemma definition file has been specified (consult the sample definition file _lexa.def which is supplied with Lexa to see how such a file is constructed), the current text is now lemmatised going on the information specified in the lemma definition file. 

You may interrupt the lemmatisation process by pressing Escape. If it continues to a normal conclusion then the entire text in memory is combed through and Lexa marks any tokens which occur in this with the types they are associated with going on the definitions in the lemma definition file. 
	During the operation, a screen is displayed on which the number of tokens found are shown by a counter. This is just to re-assure users that the programme is actually working. When it has completed the task you are asked to press any key to continue. 

Manual lemmatisation Automatic lemmatisation is certainly the quickest means of processing a text but may not always be desirable as certain tokens might be assigned to types which are not correct. The present option functions in a similar fashion to the previous one with the essential difference that each time Lexa hits on a form which it is about to tag, you are asked to confirm this. 

At this point the user has three possible courses of action: (i) press ‘y’ to have the present form tagged, (ii) press ‘n’ to skip it or (iii) press F5 to choose a tag from a list of manual tags which appear in a window on the right of the screen. Note that the forms which are displayed in the screen are those which are stored in the current manual tag file the name of which is specified in the current initialization file. You may move in this with the usual navigation keys (arrow keys and [Ctrl-]PgUp, [Ctrl-]PgDn). In addition you can locate a form in a long list swiftly by typing the first letter or two; when you do this the highlight bar jumps to the form with a match for the letter you just typed. 
	To use a form in the manual tag list for the word at which Lexa has just halted, press Ctrl-Return and the tag is added to the current word and the programme proceeds to comb through the text for more matches. 

Save memory to file Writes the current text in memory to a disk file. 

Enter text file name Allows you to specify the name to be used for the file created during the previous operation. 

Manual tagging file Permits the specification of the name for the manual tagging file to be used in the above option. Normally this is included in the initialization file, but you may change to another file at this point if you wish. 

Comb for word/string The text in memory can be searched through for a word or string specified by the user. The results of such a search are written to a file which by default bears the name SEARCH.$$$ (the user can also specify an alternative name). This can in turn be examined with the user editor by choosing the last option in the rightmost menu. 

Note The string you enter on being prompted should not include wild-cards. If you wish to search a text using non-specified characters, then use Lexa Pat, the pattern matcher in the Lexa set, which has been specifically designed for this purpose. 
	The type of search carried out with this option depends on the settings for two variables which can be altered from the desktop: (i) Case-sensitive searchand (ii) Whole word or string search, both of which appear, and can be changed, in a window on pressing F6. 

Name for search file Here you can state what name is to be used for the file created during a search through the current text in memory. Confirmation of overwriting an existing file is required. 

1.3.1.	On-line text editing

Edit text in memory It is patently obvious that with any sizeable text not all words can be lemmatised automatically acting on a lemma definition file. Nor will the option of manually confirming lemmatisation (see previous paragraph) be entirely satisfactory. What one requires are normal editing facilities to manipulate the text in memory with maximum flexibility. 
	When you select the present option on the desktop the screen changes and you are shown the text as it is held in memory. Some tags may already be present, either from a lemmatisation operation just carried out or from some earlier work session. You may now page in the file with the usual navigation keys (the arrow keys and [Ctrl-]PgUp, [Ctrl-]PgDn). To all intents and purposes you are now in a text editor with which you can process the text at will. This text editing module within Lexa has, however, a series of options which are geared towards effective processing of text corpora (see section 1.3.2. Special editing facilities below). 

1.3.1.1.	Navigation keys

	End 	 	End of current line 
	Home  	Beginning of current line 
	PageUp	Top of current screen 
	PageDown	Bottom of current screen 
	Grey Plus	Down half a screen 
	Grey Minus	Up half a screen 
	Ctrl-PgUp	Beginning of entire text
	Ctrl-PgDn 	End of entire text

	Up,Down,Left,Right Arrow	(Expected cursor movements)
	Ctrl-RightArrow		Move right a word
	Ctrl-LeftArrow		Move left a word 

Note The last two keystrokes just listed locate the cursor at the end of the next/previous word to allow the manual addition of a tag without the necessity of repositioning the cursor. 

Ctrl-Home  Goto to line # In addition to the obvious cursor movements just listed you can jump to a particular line with the present command. 

1.3.1.2.	Deletion operations

	Del 		Delete current character (no shift) 
	Backspace	Delete character (shift to left) 
	Ctrl-L		Delete current line 
	Ctrl-End	Delete from cursor to end of current line
	Ctrl-R		Delete word to right of cursor 

Note All deletion operations result in the deleted characters being stored in the undo buffer for later retrieval if this is desired. 

F6  Undo Delete Any stretch of text which has been deleted by means of any one of the deletion operations (see above) can be retrieved from an internal buffer in which Lexa stores deleted text. The screen changes on pressing F6. The initial 6 lines of the buffer are shown and you press Return to retrieve the contents of the buffer or any other key to return to the current text without any change. 
	The undo buffer can store up to 4,000 characters at any one time.

1.3.1.3.	Find and exchange operations

Ctrl-F  Find search string This operation always begins from the current cursor position, so to find the first occurrence of a string in a text move to the top by pressing Ctrl-PgUp. A search or exchange string can be up to 48 characters in length. 
	As indicated in the window which opens on pressing Ctrl-F, search is by default case insensitive. Press SpaceBar to toggle the value for type of search. 

Ctrl-N  Next search string find This continues the search from the current cursor position without the necessity of re-entering the search string. You may continue until no further find is found in the text (a message to this effect appears in the first line of the screen). 

Ctrl-E  Exchange strings To initiate the "find and exchange" operation you press Ctrl-E on which a dialogue similar to that for a simple search is opened. However, you must also specify here whether each exchange of a string should be confirmed by the user or not (the default value requires confirmation). 
	If you choose confirmation of exchange, then on each find Lexa stops and this prompt appears on the top the screen:  Exchange [ y | n | Esc ]?  You may choose one of the three possibilities indicated. 

Note During any search or exchange operation pressing the Escape key leads to the operation being aborted. The cursor remains placed at the point at which the user pressed Escape. 

1.3.1.4.	Miscellaneous

Ins / Over  Insert or overwrite mode Note in addition to the above commands that you can toggle input modes with the Ins key (from the Insert to the Typeover mode and back again). In the latter mode the reference "Over" can be seen in the top right-hand corner of the screen. 

F1 Show help texts Identical to the same command on the desktop. 

F3  Store/Retrieve Line This command stores the contents of the current line; by pressing F3 again you can copy the stored line into a new line. 
	Before Lexa proceeds the user must specify whether he/she wishes to store the line the cursor is currently resting on or to retrieve the contents of the line buffer (assuming that something was copied into it earlier). Note that the tab ruler in the second line of the screen is replaced by a special prompt. 
	Use either the LeftArrow, RightArrow or the Tab, ShiftTab keys to choose the desired action (as always, Escape aborts the action). If the line buffer has already been filled then its contents are displayed on the second line of the screen. 

Note F3 causes the current line from the present cursor position to the end of the line to be stored. If you wish to have the entire line copied then you must move to the beginning by pressing the Home key. 
	If you choose "Retrieve", the contents of the buffer are inserted into the current line at the cursor position. The remainder of the line remains intact. 

Shift-F6  Copy Previous Line Assuming that the previous line has a length greater than one, pressing the present key combination leads to the previous line being copied in the present one. Note that only that section is copied from the cursor position to the end of the previous line (to duplicate the entire line, move the cursor to the beginning of the current line with Home). The section is then inserted into the present line, i.e. if there is text to the right of the cursor in the current line then this is shifted to the right by the appropriate amount. 

Ctrl-F3  Show formatting This is a toggle which alternatively turns the display of line ends and tabs on or off. 
	The initial state is ‘off’ (unless you have specified otherwise in an initialization file, see below). Turning the formatting display ‘on’ is especially useful with those text files where heavy use of tabs is made and where the latter may vary in the number of spaces they resolve to. Note that line ends are indicated by the symbol ¶ while the spaces used to resolve tab characters are indicated by a small dot and the beginning of each new tab position is shown by the broke vertical bar, |; normal spaces are displayed as small dots. 

Alt-F7  Return to desktop Note that the text is retained in memory. On re-entering the text editing level, the cursor is positioned on the same line you were located on before exiting last. 

Ctrl-Q  Switch colours This command simply switches between the two sets of colours available for text display on colour systems. 

F9  Show environment Offers you the same windowful of information pertaining to the system environment you are working in which you also obtain with the F9 key on the desktop. 

1.3.2.	Special editing facilities

In order to avoid repetitive entry of frequently required text a number of macro options have been included in the text editing module of Lexa; furthermore, a series of commands which are of value when tagging texts have been added. 
	The first macro facility works as follows: you enter a stretch of text and associate it with a key combination in the range of Alt-A through Alt-Z. When you press any of the assigned keys during text editing the string you entered for that key is inserted at the current position in the current text. 

Shift-F2  Alpha Macros This key combination opens a window on the right of the screen with the first 12 of the 26 alpha macros which are available when editing a text. 

You may move vertically in the list by using the Up, Down Arrow keys or PgUp, PgDn to jump to the beginning or end of the list. 
	On the left of the window the letter which a text line is associated with is to be seen. Press Return to edit a particular alpha macro. To save the line press Return again, or Esc to reject changes. In order to write the set of alpha macros to disk you must use the F10 key, striking Esc simply returns you to your current text. 
	If you changed the text line for any letter then the altered stretch of text is now available by pressing the Alt key along with the relevant letter, i.e. it is not necessary to save the alpha macros to disk before this applies. 

Notes Pressing a certain combination of Alt and a letter not only inserts the current stretch of text associated with the letter pressed but adds this to the end of the present word as a tag with the current tag delimiter (specified in the initialization file) separating word and tag. 
	There is a limit of 20 characters per stretch of text with Alt macros.

Ctrl-F2  New Alt File Several alpha macro files can be created and used at will within Lexa. By default the programme expects a file called lexa.alt. To specify that a different file be used, you may choose one from the directory listing you are presented with on pressing Ctrl-F2. 

Note An alpha macro file in Lexa must have the extension .alt. For this reason only those files in the current directory with this extension are listed when you activate the present command. 

F4 Delete current tag Simply removes the tag, if any, from the current word. 

Shift-F4  Show stop word list Shows the current list of stop words, i.e. those words which are excluded from automatic tagging, assuming that such a word list is currently active. 

F5 Open manual tag list. Pressing the F5 key leads to a window opening on the right of the screen. The contents to be seen here are those of the manual tag file specified in the initialization file (again assuming that one has been specified). You may edit this window with Return, save the contents to disk file with F10and import the tag on the current window line to the word form the cursor in the text is currently located in with Ctrl-Return. Type a letter or two to quickly locate an entry in a long list. 
	Up to 160 manual tags fit into a list, each of which may be up to 12 characters in length. 

Shift-F5 Show current lemma set Display the set of lemma definitions (types and the tokens which are associated with them) which is currently active. Recall that you can choose a new lemma definition file from the desktop via the appropriate option. 

F8  Edit clipboard The clipboard in the text editing module of Lexa is a reserved area of memory in which users can store up to 16 short lines of text (each a maximum of 24 characters in length). The clipboard can thus be used as a scratchpad for storing bits of text. With Return you can edit a line and via Ctrl-Return transfer the form in the current line to the text, but without adding this as a tag to the current word form, contrast the situation with both Altmacros and manual tags. 

Shift-F8  Deposit current word in clipboard A major application of the clipboard is to store word forms. By pressing the current key combination the word the cursor in currently located in is transferred into the next free line of the clipboard, assuming that it is not already full. 

Alt-F8  Call Lexa Text with Lemma Definition File Basically lemma definition files are text dictionaries in which entries (types) have sets of forms (tokens) associated with them. When working on a text corpus it is sensible to maintain such a dictionary, adding forms to it as you go along, thus ensuring that the lemmatisation procedures you use for a group of texts become increasingly more accurate and comprehensive. 

The question naturally arises, how is such dictionary maintainence achieved in Lexa? The answer is via the clipboard. Should you wish to add a form to a lemma definition file from the text editing level, then you simply store this to the clipboard. Now when editing a text, press Alt-F8. This leads to Lexa Textbeing loaded with the current lemma definition file; not only that, the contents of the clipboard from the text editing module of Lexa are now to be found in the word list which you activate within Lexa Text via Ctrl-G. 

This facility is rendered possible because each time the user calls Lexa Textfrom the text editing level within Lexa the contents of the clipboard are saved to a text file called CLIP_BRD.$$$, this then being read by Lexa Text on starting and its contents deposited in the internal word list of the text editor. 

Notes Needless to say, Lexa Text must be accessible via the DOS path variable for the current option to work. 
	If you specify any other editor than Lexa Text then the present function is not available. 
	The clipboard file CLIP_BRD.$$$ is a temporary file (to be recognized by the three dollars used as extension) and is automatically deleted when you exit Lexa. Bear this in mind when depositing anything in the clipboard which you might like to use outside of Lexa. This is not normally possible unless you retrieve the clipboard contents with Lexa Text in the manner described above for dictionary maintainance. 

Shift-F9  Text settings This command is the same as that which displays statistics on the currently loaded file available on the desktop. 

1.3.3.	Command activation via picklists

To facilitate the handling of the commands on the text editing level a series of picklists have been included by means of which the user can activate any of the legal commands for this level of Lexa. As with other programmes of the group, such as Lexa Text, the picklists are opened by pressing either the key combination Alt-Return or Shift-Tab (as prompted at the bottom of the screen). You can reach the picklist you require via LeftArrow, RightArrow and then, by moving the highlight bar and pressing Return, execute the command indicated; the function key setting which has the same effect is also shown. Pressing Escape hides the picklists and returns you to the current text without any command being executed. 

1.4.	Transfer

The first two options of the Transfer menu are concerned with the generation of text files in which word forms are highlighted in order to easily recognize the context in which they occur. These are traditional types of files to be found with concordance programmes and are included at this point to offer similar facilities to users of Lexa. 

Concordance file (i) The present option generates a so-called KWIC concordance. The abbreviation stands for "key word in context" and as the name implies, each occurrence of unique word forms is highlighted (by spacing on either side) in the context in which it is to be found. 

[ whan ] 

1    :    Whan  that Aprill with hise shoures soote 26   :   And shortly,  whan  the sonne was to reste, 

[ that ] 

1    :                                    Whan  that  Aprill with hise shoures soote 6    :                                          That  slepen al the nyght with open eye, 14   :                                          That  hem hath holpen what that they were seeke. 15   :                                   Bifil  that  in that seson on a day 19   :                At nyght were come in to  that  hostelrye 23   :                                          That  toward 28   :                                          That  I was of hir felaweshipe anon, 32   :                                      Er  that  I ferther in this tale pace, 37   :                    An eek in what array  that  they were Inne; 

Concordance file (ii) The second type of concordance file has similarities with what is known as a KWOC file from the term "key word out of context". The keyword is however not so much out of context as not centred in the line in which it occurs. This type of file simply contains the tokens of word types enclosed in curly brackets for easy recognition. 

	[ whan ]

	1    : {Whan} that Aprill with hise shoures soote
	26   : And shortly, {whan} the sonne was to reste,

	[ that ]

	1    : Whan {that} Aprill with hise shoures soote
	6    : {That} slepen al the nyght with open eye,
	14   : {That} hem hath holpen what that they were seeke.
	15   : 	Bifil {that} in that seson on a day
	19   : At nyght were come in to {that} hostelrye
	23   : {That} toward 
	28   : {That} I was of hir felaweshipe anon,
	32   : Er {that} I ferther in this tale pace,
	37   : An eek in what array {that} they were Inne;

Note Concordance files normally contain all the unique forms found in the text file currently in memory. However, if you set the relevant option in the initialization file to ‘on’, you can force Lexa to create a concordance file with only a selection of word forms. These are contained in a text file which is also specified in the initialization file. A word list for concordance generation consists of a number of words each occupying exactly one line in the input text file which must be in ASCII form, i.e. without word processor formatting information. 

Name for concordance Allows you to specify the name which is used for a concordance file. The extension which is attached to this file name depends on whether you generate a KWIC or KWOC type concordance. 

Make delimited text In order to move the data of a text file to a database environment it is essential to either create a database or a file which can be read directly by a database. The latter course of action is covered by the present option. It generates a so-called delimited text file from the text in memory. Using a specially reserved character as a delimiter of certain contents on each line, an output text is created which can be read by a database manager and which leads to the information in the text file being properly assigned to the fields of a database. 

Generate database With the current option an actual database is generated. This always has the fields TOKEN, LEMMA, FREQUENCY, REVERSE into which the contents of (i) words in the text, (ii) a possible lemma associated with a word, (iii) the frequency of occurrence of the token in the text file from which it is derived and (iv) the reverse order form of the word are stored. The resulting database can be processed directly by DbStat or DbTxt, for instance, or indeed by any other database manager which can handle files in the so-called dBASE file format. 

Merge list with database One of the chief uses to which Lexa can be put is to construct a lexical database from a text corpus. As the latter will in all probability consist of a number of files, generating a database from the word forms in the entire corpus will require that the data from each text file be transferred to a database. However, it would be pointless to create a new database each time a text is analysed. Instead what one needs is an option in which data is added in a cumulative fashion to a single database so that it reflects the lexical structure of more than one input file. 
	This is realised with the present option. For the first text you create a database with the Generate database option. With all subsequent files you select the present option. On doing so you must first of all choose a database to merge textual data with. Be careful here that the database you choose is one which was generated by Lexa at some previous stage. If not, Lexa issues an error message and refuses to continue. 
	Assuming that the database is acceptable to Lexa, it now combs through it and undertakes one of two steps: (i) adds the word form in the current text file in memory to the external database if this form is not already contained in it, (ii) increments the frequency field of the database should the current word form from the memory text already occur in the external database. 

Enter database name Enables the user to specify the name to be used for both a delimited text file and a database generated with the present set of options. Note again that delimited texts always have the extension .TXT and databases .DBF. 

1.5.	Function key settings

F1  Help screen This displays a picklist from which you may choose to view one of a number of on-line help screens for Lexa. The command assumes that the files LEXA.HLP and LEXA.IND are accessible (either in the Lexa home directory or reachable via the DOS path variable). 

Shift-F1 Execute DOS command Here you are presented with an empty input line and can enter anything you like. Lexa then tries to load your entry externally by passing it on to DOS so that for the successful execution of this command you must have entered (i) a DOS command or (ii) the name of an external startup file which is either in the current directory or accessible via the DOS path. 

Ctrl-F1  DOS Call With this command DOS is loaded temporarily and you can carry out any commands as if you were in DOS normally with the restriction that some of your system memory is now taken up by Lexa which is in the background. If you load a further programme when you enter DOS, avoid making another DOS call from within this programme as this may lead to your system hanging. When finished working in DOS, type exit to return to Lexa. The screen is restored just as you left it. The configuration for the current work session is not effected by calling DOS. 

Alt-F1  Load user editor This command simply loads the user editor (without passing any text file name to it). The programme called is that specified in the initialization file or with the relevant option of the Setup operations menu. 

F3  Call Lexa List Loads the Lexa utility Lexa List to give you a list of all files in the current directory. 

F6  (i) Specify handling of case This key activates a toggle with which you can alter the value for case which is assumed during searches. The value which Lexa uses is that which is found in the initialization file. However with the current command you can alter this on-line without the necessity of editing the initialization file and re-starting Lexa. 
	(ii) Treatment of search strings In the initialization file there is an item which determines if search strings used during Lexa, e.g. when you are combing through a file in memory, are to be treated as whole words or just strings (a part of a word). With the current option the value for this parameter can be altered without having to change it in the initialization file. 

F7, Alt-F4  Exit Lexa.  Returns to DOS. Confirmation of exit is required. 

Shift-F7  Exit with directory change.  Between starting Lexa and your present position you may have changed directory (via the Set current directory option in the rightmost menu) and now wish to change to this and unload Lexa. Pressing Shift-F7 will leave you in the directory last chosen as current. 

Note When you exit Lexa and there is a modified text in system memory then you are notified of this and asked if you wish to save it before exiting to DOS. 

F8  Load database manager.  This command loads the database manager specified in the initialization file. By default the programme called is DbTxt, the compact version of the database manager DbStat of the Lexa set (see Vol.2 of the present documentation). The current command can be used, for instance, in order to examine a database generated with an option from the Transfer menu. 

Alt-F8 Edit lemma definition file.  Calls Lexa Text with the name of the current definition file passed to it; see comments on this option in section 1.3.1. On-linetext editing above. 

F9  Show Environment Displays some relevant information about the environment you are working in such as the current and original path, the total and presently free disk space, the amount of system memory left, the current date and time, etc. 

F10  Save text in memory to disk file This option is the same as the last one in the Lemmatise menu. 

1.6.	Use of initialization files

Practically all the information of relevance to the operation of Lexa can be specified in an initialization file. The latter is a normal ASCII text file with the extension .ini which is examined by Lexa when the latter is loaded. An initialization file can have any name, i.e. any letters can precede the extension. The default is lexa.ini; any other name must be specified on the command line (see programme call syntax at the beginning of this section). Notes Lexa only reads information from those lines of an initialization file which do not begin with a semi-colon. 
	To indicate a positive value for a parameter you may type either the word ‘yes’ or the number ‘1’ (without inverted commas). A negative value is symbolised by either ‘no’ or ‘0’. 
	The backslash is a so-called escape character. By this is meant that the character immediately following it is interpreted at its literal value, despite the fact that it is a special character for the programme in question. For instance ‘\;’is interpreted as a simple semi-colon, i.e. not as a comment. 
	If you change any parameters then be very careful to keep to the pre-determined format as outlined in the comments below. 

Lexa only reads the setup file on starting. To operate the programme with altered parameters you must exit and start Lexa again. 

I.	Information referring to the input text for an analysis

1: Name of system input directory 

	Default is the Lexa home directory

2: Name of text input/output file directory 

   Default is the current DOS directory 

3: Name of default input file 

   Note You may enter a so-called file template here; this is a partial file    specification e.g. txt*.inp, my_*.doc, etc. However, if more than a single file    is found which matches the template then a second one is only processed if    Lexa is loaded in the batch mode, otherwise the first file found is examined    and all other potential input ignored.    Pay attention to the fact that if Lexa is called in the batch mode then all    file names (i.e. those for lemmatised texts, frequency lists, databases, etc.) are    derived from the entry for input file by appending the appropriate file extension    (see below). For this reason wild cards should only be used in the first part of    a file name, i.e. up to the dot before the extension. 

4: Character which marks a comment line 

5: Character which marks a comment to the end of the current line 

6: The line of the input text at which analysis is to begin 

7: The line of the input text at which analysis is to end    Note Here you either enter an actual value or 0 if you wish Lexa to    process any input file until the end of the file is reached. 

8: Name of the stop words file to be used (leave this line empty if you do not    want any to be used) 

9: Type of search to be carried out. 
	Legal entries:	0 = Only examine entire words
					1 = Examine parts of words

10:Specify whether case differences in source file are to be ignored during searches 

11:What characters are to count as punctuation? 

12:Remove punctuation from input text file? 

13:What character is to function as a delimiter between a word and the tag    attached to it (default = underscore) 

14:What character is to function as a word delimiter when lemmatising (either at    the beginning or the end of a word). This is the character used in the lemma    definition file. 

15:Ignore COCOA-style comments?    These are comments enclosed between occurrences of left angular bracket and    right angular bracket, "<" and ">" and are used for editorial purposes in many    concordances. 

16:Ignore Helsinki Corpus comments?    If you specify that these should be ignored then any text enclosed within a left    square bracket plus caret and a caret plus right square bracket, i.e. "[" and "]",    will be ignored during analysis. 

17:Save text with line numbering added? 

II.	Information referring to the lemmatisation of a text file

1: Name of lemma definition file 

2: Name of lemmatised output file 3: Name of manual tag file 

4:    Name of Alt macro file 

III.	Information concerning the conversion of a text to a database

1: Name of delimited text file (to be read into database system)    Note. The extension for this file must be .TXT! 

2: Remove punctuation when generating delimited file? 

3: Deposit reverse order spelling of each token in text file? 

4: Ignore case when generating database? 

5: What character is to function as a field delimiter? 

IV.	Information concerning the generation of frequency lists

1: Name of token density file 

2: Name of type density file 

V.	Information concerning the generation of a concordance

1: Name of concordance output file 

2:	Column at which keyword is to be aligned in KWIC file 

3: Only generate a concordance for a selection of word forms 

4: Name of text file in which these forms are specified 

VI.	Information necessary for operating Lexa in the batch mode

1: Generate a lemmatised output file? 2: Extension to be used for lemmatised output file (up to 3 characters) 

3: Extension to be used for lemma definition file (up to 3 characters) 

4: Use the same definition file during a batch (otherwise Lexa derives a new    name from the input file template by adding the definition file extension). 

5: Tag each file using several lemma definition files (i.e. make several runs on    each input text file)? For this option to function correctly you must also specify a file which in its turn consists of a list of the lemma definition files. Lexa then attempts tagging each file with the information in each of these files in the order in which they occur in the list file. 

6: Text file with list of lemma definition files 

7: Generate a type profile file? 

8: Extension to be used for type profile file (up to 3 characters) 

9: Generate a token profile file? 

10:Extension to be used for token profile file (up to 3 characters) 

11:Generate a KWIC concordance file? 

12:Extension to be used for KWIC concordance file (up to 3 characters) 

13:Generate a KWOC concordance file? 

14:Extension to be used for KWOC concordance file (up to 3 characters) 

15:Generate a delimited text file?    Note This file must have the extension .txt. The name is derived    from the input file template (Item 1 in the initialization file). 

16:	Generate a database file?    Note This file must have the extension .dbf. The name is derived    from the input file template (Item 1 in an initialization file). 

VII.	Information used when handling very large files

1: Process a large text in slices? 

2: Append each slice to the previous one when storing to disk? If you do not    choose the append mode here then each slice is stored to disk with the name    of the input file and a numerical extension beginning at .001 and continues until    all slices have been processed or the figure of 256 has been reached. 

3:	Number of lines per slice 

   Any number can be entered here as Lexa does not know in advance how    long each line is and consequently how large an entire file is. Basically you    should keep to files of not more than 100K maximum (per slice) when    lemmatising. 

VIII.	User’s text editor and database manager

1:	Name of user’s text editor 

2:	Name of user’s database manager 

1.6.1.	Sample initialization file

The following is a print out of the supplied initialization file lexa.ini. It is a normal ASCII text file which you can edit with any text editor (such Lexa Text). 

LEXA.INI 
;----------------------------------------------------------------------; 
; 
Information referring to the INPUT text for an analysis 
; 
1: Name of directory to be used for system input files 
;   (Leave empty if you wish to use the Lexa home directory) 
; D:\SRC\LINGUA\LEXA 
; 
2: Name of directory to be used for text input files 
; (Leave empty if you wish to use the current DOS directory)
; D:\SRC\LINGUA\LEXA 
; 
3: Name of default input file 
;
; Note: You may enter a so-called file template here; this is a partial 
; file specification e.g. *.txt, my_*.doc, etc. However, if more than 
; a single file is found which matches the template then a second one is 
; only processed if LEXA is loaded in the batch mode, otherwise the 
; first file found is examined and all other potential input ignored. 
; 
; Pay attention to the fact that if LEXA is called in the batch mode 
; then all file names (i.e. those for lemmatised texts, frequency lists, 
; databases, etc.) are derived from the following entry by appending the 
; appropriate file extension (see section VI of the present file). 

; CHAUCER.TXT 
;
; 4: Character which marks a comment line 
; 
\
; 
; 
; 5: Character which marks a comment to the end of the current line 
; 
|
;
; 6: The line of the input text at which analysis is to begin 
;
0 
; 
; 7: The line of the input text at which analysis is to end 
; 
; Note: Here you either enter an actual value or 0 if you wish LEXA 
; to process any input file until the end of the file is reached. 
; Legal values range from 1 to 1000000. 
; 
0 
; 
; 8: Name of the stop words file to be used (leave this line 
;    empty if you do not want any to be used) 
; STOP.LST 
; 
; 9: Type of string used when creating a concordance and when searching 
;    current text in memory; the value can be changed on the desktop 
;    by striking the F6 key 
; 
;     Options: 1 = Only examine entire words 
;                    0 = Examine parts of words 
1 
;
; 10: Specify whether case differences in source file(s) are to be ignored 
;
 yes 
; 
; 11: What characters are to count as punctuation? 
; 
\;:’",.!? 
; 
; 12: Remove punctuation from input text file? 
; no 
; 
; 13: What character is to function as a delimiter between a word and 
;     the tag attached to it (default = underscore) 
; 
_ 
; 
; 14: What character is to function as a word delimiter when lemmatising 
;     (either at the beginning or the end of a word). This is the 
;    character used in the lemma definition file 
;
# 
; 
; 15: Ignore COCOA-style comments? 
; 
yes 
; 
; 16: Ignore Helsinki Corpus comments? 
; 
yes 
; 
; 17: Save text with line numbering 
; 
yes 
; 
; 
;---------------------------------------------------------------------
; 
; (II) Information referring to the LEMMATISATION of a text file 
; 
; 1: Name of lemma definition file 
; 
_LEXA.DEF 
; 
; 2: Name of lemmatised output file 
;
OUTPUT.LEM 
; 
; 3: Name of manual tag file 
; 
LOB.TAG 
; 
; 4: Name of Alt macro file 
; 
LEXA.ALT 
; 
; 
;----------------------------------------------------------------------; 
; (III) Information concerning the CONVERSION of a text to a DATABASE 
; 
; 1: Name of delimited text file (to be read into database system) 
;    N.B. The extension for this file must be .TXT! 
; 
LEXA_DB.TXT 
;
; 2: Remove punctuation when generating delimited file? 
; 
yes 
; 
; 3: Deposit reverse order spelling of each token in text file/database? 
; 
yes 
; 
; 4: Ignore case differences when generating lexical database? 
; 
yes 
; 
; 5: What character is to function as a field delimiter? 
;
|
; 
;----------------------------------------------------------------------; 
; (IV) Information concerning the generation of FREQUENCY LISTS 
; 
; 1: Name of token density file 
; 
TOKEN.OUT 
; 
; 2: Name of type density file 
; 
TYPE.OUT 
; 
; 
;----------------------------------------------------------------------; 
; (V) Information concerning the generation of a CONCORDANCE 
; 
; 1: Name of concordance output file 
;
OUTPUT 
; 
; 2: Line column at which to insert keyword in context (KWIC) 
; 
40 
; 
; 3: Only use a selection of forms for concordance? 
; 
yes 
; 
; 4: Name of file with list of forms for concordance
; 
EXCERPT.WDS 
; 
; 
;----------------------------------------------------------------------; 
; (VI) Information necessary for operating LEXA in the BATCH mode 
; 
; 1: Generate a lemmatised output file? 
; 
yes 
; 
; 2: Extension to be used for lemmatised output file (up to 3 
;    characters) 
; 
LEM 
; 
; 3: Extension to be used for lemma definition file (up to 3 characters) 
; 
DEF 
;
; 4: Use the same definition file during a batch (otherwise Lexa derives 
;     a new name from the input file template (above) by adding the
;    definition file extension) 
; 
yes 
; 
; 5: Tag each file using several lemma definition files (i.e. make 
;    several runs on each input text file)? 
;
;   Note: For this option to function correctly you must also specify a 
;          file which in its turn consists of a list of the lemma 
;          definition files. Lexa then attempts tagging each file with 
;          the information in each of these files in the order in which 
;          they occur in the list file. 
; 
yes 
; 
; 6: Text file with list of lemma definition files 
; 
LEM_DEF.LST 
;
; 7: Generate a type profile file? 
; 
yes 
; 
; 8: Extension to be used for type profile file (up to 3 characters) 
; 
TYP 
; 
; 9: Generate a token profile file? 
;
yes 
; 
; 10: Extension to be used for token profile file (up to 3 characters) 
; 
TOK 
; 
; 11: Generate a concordance file? 
; 
yes 
; 
; 12: Extension to be used for KWIC file (up to 3 characters) 
; 
KWI 
; 
; 13: Generate a concordance file? 
; 
yes 
; 
; 14: Extension to be used for KWOC file (up to 3 characters) 
; 
KWO 
; 
; 
15: Generate a delimited text file? 
; 
; N.B. This file MUST have the extension TXT. The name is derived from 
; the input file template (Item 1 in an initialization file) 
; 
yes 
; 
; 16: Generate a database file? 
;
; N.B. This file MUST have the extension DBF. The name is derived from ; the input file template (Item 1 in an initialization file) 
; 
yes 
; 
; 
;----------------------------------------------------------------------;
; (VII) Information used when handling very large files 
;
; 1: Process a large text in slices? yes 
; 
; 2: Append each slice to the previous one when storing to disk? 
;    Note: If you do not choose the append mode here then each slice is 
;    stored to disk with the name of the input file and a numerical
;    extension beginning at .001 and continues until all slices have been
;    processed or the figure of 256 has been  reached. 
;
yes 
; 
; 3: Number of lines per slice 
;   Note: Any number can be entered here as Lexa does not know in 
;          advance how long each line is and consequently how large an 
;          entire file is. Basically you should keep to files of about 
;          100K maximum (per slice) when lemmatising. 100 
; 
;----------------------------------------------------------------------
; 
; (VIII) User’s text editor and database manager 
;
;  1: Name of user’s text editor 
; 
LTEXT
; 
;
2: Name of user’s database manager 
;
DBS 
; 
; 
End of LEXA setup file 

1.7.	Starting Lexa in the batch mode

The basic idea behind a batch mode for Lexa is that the user does not have to be present during the operation of the programme. If you specify the necessary information then all that is required is that you start the programme; the rest is taken care of automatically by Lexa. User input is neither necessary nor possible in the batch mode. No overwriting of files is allowed as the user cannot be asked to confirm overwriting a file. As user presence is superfluous, the processing of very large files or group of files is no longer a consideration. Set up everything correctly (in an initialization file) and start Lexa; when you come back, the work will have been done. 

The extensions for files created by Lexa are all derived (in the batch mode) from the name of the input file or files. Say for instance you specify an input file _LX_TST1.INP then the lemmatised version of this file which Lexa writes to disk will be _LX_TST1 plus the user-specified extension for a lemmatised file (this is indicated in an initialization file). If you specified the extension .lem then the lemmatised output file would be _LX_TST1.lem. Again bear in mind that this file may not exist in the current directory (as Lexa will not overwrite a file when called in the batch mode) and also that if there is a conflict among files to create, for example if you specified the same extension for two different types of output file, then Lexa will abort when it comes to the second file as there will already be one with this name on disk, namely that created during the first operation. 
	A corollary of the above is that if a file template is used as an input specification to Lexa in an initialization file then the files which match it must differ in the name (up to the dot) and not in the extension as the latter is removed and replaced by specific extensions for certain Lexa operations. Thus the file template _LX_INP.* would be pointless as there can only be one file which matches _LX_INP; on the other hand a template such as _LX_TST?.INP would be quite sensible as there can be up to ten matches for _LX_TST?, namely _LX_TST0 - _LX_TST9. 
	In all, seven types of operation can be executed when Lexa is called in the batch mode: 

			File generated			Suggested extension

	(1)		A token profile list	.TOK 
	(2)		A type profile list		.TYP 
	(3)		A KWIC concordance		.KWI 
	(4)		A KWOC concordance		.KWO 
	(5)		A lemmatised text		.LEM 

									Automatic extension

	(6)		A delimited text		.TXT 
	(7)		A database file			.DBF 

1.7.1.	Using multiple lemma definition files

When running Lexa in the batch mode you can also use the file slice technique to deal with very large files. In addition you may specify a number of lemma definition files to be consulted in order to tag a particular input text file. Shipped on the distribution diskettes is a list file LEM_DEF.LST which contains the names of three small definition files LEM_DEF.001-3 which can be used to test out tagging with multiple lemma files. 
	When the lemma definitions are to be extracted from a list of files there is no adjustment of the extension of each lemma definition file, i.e. the list file with the names of the lemma definition files can contain files names with user-specified extensions (again see supplied file LEM_DEF.LST). 

1.8.	System limitations

All parameters which can be specified by users have by their very nature certain limits. The reaction of Lexa in situations where users try to exceed these limits is to ignore everything which goes beyond them. For your information the limitations of the main parameters are listed below. 

								No. of characters

	Max. length of a line in a text file	255
	Max. length of a single word			32

	Max. length of a file path				48
	Max. length of user input				48

	Max. length of a lemma					16
	Max. length of manual tag				12

									No. of items

	Max. no. of types (lemmas/word classes)	160
	Max. no. of tokens per type				32
	Max. no. of manual tags					160
	Max. no. of alpha macros				26

	Max. no. of words per line				32
	Max. no. of stop words					255
	Max. no. of unique words per text		6,000
	Max. no. of lines in an input text		1,000,000

	Max. no. of files in directory listing		256

1.9.	Using the file slice mode

Handling large files Users of personal computers will be aware that there is a limit on the size of system memory when running programmes under MS-DOS. One of the immediate consequences of this is that any files to be processed will only fit in their entirety into memory if they do not exceed a certain size. The actual size limit depends on the amount of memory already occupied by the operating system, the programme which is used to process the files in question and any further resident software. No matter how compactly a programme is designed, there will be always be a limit. 
	The solution to this quandary is to load any file to be processed in sections. Any good word processor will offer such a facility and furthermore in such a manner that the user does not notice it. For Lexa a similar procedure has been chosen by the present author, albeit with the active consent of the user, so to speak. The method of processing files too large for system memory works as follows. 
	Towards the end of a setup file (recall that this is lexa.ini by default) there are three parameters which can be specified by the user. The first is whether any input file or files should be processed in slices. Should you set this parameter to "yes" then Lexa requires appropriate information for the following two as well. The next refers to the manner in which the output of a tagging operation is to be stored on disk. There are two possibilities. Either a new file is created each time a slice of an input file is saved to disk or each slice is appended to the preceding one. With the latter method, the first slice is deposited in a new file if none with the name of the input file and the specified output file extension already exists in the current text input directory. Should a file with the relevant name and extension be located by Lexa then the first slice and all others are appended to this file. 
	If you do not choose to append slices to an existing file, then each slice is stored as a separate file, the name of which is that of the input file with the extension being a number from .001 to .256, depending on the position of the current file slice in the series being presently processed by Lexa. 
	The third parameter refers to the number of lines per slice, this can be any value from 1 to 10,000. Of course if you choose a large value for this parameter and the lines of the file are long and intensive tagging is to be carried out, then system memory might run out within a single slice. Whether this is likely can be determined by trying out a file with a certain size and judging if system memory can cope with it. 

Note If you specify in the setup file you are using that line numbers be inserted before each line on outputting text to disk, then the lines are those of the input file, i.e. for any given slice, irrespective of the mode in which it is saved to disk, the first line will be the number of the slice multiplied by its position in the current series, e.g. in a fourth slice with a size of 1,000 lines per slice, the first line will be 4,000 and the last 4,999 assuming that the end of the file is not reached within this slice. 

1.10.	Command typology in Lexa

The programme level at which you enter Lexa is known in computer jargon as a desktop. From here all the major operations of the programme can be carried out. Once an operation is completed you are normally returned to this level and proceed with some other option or return to DOS by pressing Alt-F4 or F7. The key settings on the desktop conform largely to the IBM SAA specification (system application architecture): each set of options can be activated by moving the mouse cursor to the text of the option and clicking the left button or by pressing the Alt key and the highlighted letter of the option simultaneously. The same holds for the options within a set. The right mouse button and the Escape key both serve to cancel any initiated operation or to hide a window or menu just opened. The symbol in the top left-hand corner can be used to terminate Lexa via the mouse (clicking this is functionally equivalent to pressing Alt-F4). 

In addition to the options offered in the picklist system, the Lexa desktop evinces a number of function key settings. These can be gleaned from the present manual or from the online help texts. However, by far and away the easiest method of activating a key setting is to press Shift-Tab (or use to the mouse appropriately) and then choose an option from the menu which appears on the right of the screen. As always, Escape hides the window without executing any command. The function key picklist is available irrespective of which group of options, if any, is currently open. 

1.11.	Troubleshooting with Lexa

File directories and initialization

Difficulties with system and text files Bear in mind that different directories are used (i) for all your input text files and those text files which Lexa generates during its operation and (ii) for system files which it requires at various stages during processing, e.g. the setup file, lemma definition file, macro, manual tag and stopword files, etc. If not otherwise specified, the Lexa home directory is used for system files and the current DOS directory for text files (see section 1.1.1. System and text input directories above). 

Initialization file does not appear to work An initialization file for Lexa requires parameters in a very definite order. If you alter the contents of such a file, this order might be disturbed. Study the supplied initialization file and keep strictly to its format. 
	Even with a correctly ordered initialization file you may have specified invalid information, e.g. the name of a directory for auxiliary files which does not exist or an out-of-range number for a certain parameter. In this case go back over the file and check its contents carefully. 

File processing

Exceeding various size restrictions You must keep to the limits set by Lexa for a variety of input parameters. These have been set generously so that no difficulties should arise in normal circumstances. Even you find that some parameter will not fit your present need then split the file you wish to process into sections and re-process it. Check on size restrictions in section 1.8. System limitations above. 

You can read a file from, but not save it to disk Probably the file in question is read-only or you do not have the necessary rights in a network; maybe your disk is full (most likely when working with a diskette). 

Changes made to a file are lost on exiting Lexa You should take extreme caution when exiting Lexa with the reminder about modified text. If you answer "no" here and leave the programme then all alterations to the presently loaded text are lost. 
	To be on the careful side, save an altered text by moving the hightlight bar to the relevant option in the Lemmatise menu or by pressing F10; you must confirm overwriting an existing disk file. When the memory text has been written to a file, Lexa notifies you of this and it is then safe to exit to DOS. 

Online text editing

F3 (= Store/Retrieve line) does not appear to work

Remember that this key works in two ways: you either store or retrieve a line. If there is nothing in the internal line buffer then obviously nothing is retrieved into the current line. You can press F3 just to look at what in is the line buffer and then press Escape (which aborts the operation). F3 always copies the section of a line from the current cursor position to the end of the line. 

Alpha Macro or Manual Tag does not reflect changes made within Lexa You forgot to save the contents of the alpha macros or the manual tag list by pressing F10 while editing them (via Shift-F2). The maximum number of alpha macros is 26, i.e. Alt-A to Alt-Z. The limit for a manual tag file is 160 items. However, no limit holds for the number of files which can be kept on disk. NoteThe contents of the clipboard cannot be saved to a user-specified file as this is just a temporary memory buffer. 

Find (and exchange) strings does not appear to work There are two possibilities here: (i) you used case-sensitive search and there was no exact match for the string you entered or (ii) there is no occurrence of the search string from your current position in the text to the end (or the beginning). 

Directory listing

Files in directory listing are unexpected (i) Bear in mind that the listing offered here is always that of the current text file directory as determined by an initialization file (if found on loading Lexa). (ii) Check on the file template (change with Shift-F4); maybe no files match the currently active file template. If you have changed files in the current listing, then it is advisable to re-read the current directory with Shift-F5. 

Data processing

1.	Lexa Text

Syntax:	1)	ltext [file_name] [search_string] [/s] 
		2)	ltext [/i(-ini_file)] 
		3)	ltext /p 
		4)	ltext /b 

1.0.	Introduction

In the Lexa package a text editor has been included to allow users to edit (ASCII) texts used in connection with the main programme. The editor keeps all texts which are being edited in system memory so that the space for editing depends on the amount of free memory available. Running Lexa Text on a computer without any other resident programme should leave you with well in excess of 400K of free system memory for texts. 
	Apart from the obvious reason of including an editor for occasional editing tasks, other considerations for providing Lexa Text have played a role here. Most computer users process texts with a so-called word processor which apart from the actual text also stores its own formatting information in text files. This information refers to such features as page layout, font attributes, printer drivers, etc. However, all the texts which are to be manipulated with the programmes of the Lexa set have to be so-called ASCII files, i.e. they must consist of pure text without any formatting information whatsoever. A text is then defined as a series of lines, each terminated by a carriage return and a line feed (i.e. ending in the ASCII characters $13 and $10 respectively). A line in a text may not exceed 256 characters. Any texts which you create with Lexa Textare stored in this form and thus suitable for manipulation with the programmes of the Lexa package. You may of course use a text editor of your own to create ASCII text files. If you insist on using a word processor then be certain that you store the texts to disk without formatting information (there is always a special option for this in a word processor). 
	Two further features of Lexa Text facilitate the processing of linguistically relevant data, particularly for users of the Lexa set. The first of these concerns the maintainance of lemma definition files for the main programme Lexa. This is greatly simplified when using Lexa Text which allows you to import forms from any text you are presently processing with Lexa into the lemma definition file which you are using to analyse the current text, without unloading Lexa. 
	The second feature has to do with the database interface which is inbuilt in Lexa Text. It permit you to import data from a database into the current text, using a report form as you do so. By these means you can transfer information from a lexical database to the current text without having to exit Lexa Text and to load a database manager to do so. Lexa Text is a normal MS DOS executable file about 192K in size; when loaded into system memory it occupies something over 200K; depending on the size of the text file(s) you edit the amount of available system memory is decremented. 

1.1		Startup options

(Ia) Automatic file selection on loading. The text editor can be started by simply typing ltext or by adding a file name after this on the command line as in: 

	ltext my_file.txt

which loads Lexa Text and automatically fills the first text area with a file called my_file.txt assuming that this is present in the current directory. You may also specify the name of a drive and or directory before the command line file name as follows: 

	ltext \lexa\my_file.txt 
	ltext d:\lexa\my_file.txt 

(Ib) Starting with automatic search for string To start an automatic search through a file which is loaded from the command line, one should enter a search string after the file name as indicated in the second syntax option above. Assuming that the file referred to by file_name is loaded correctly, Lexa Textnow starts looking for the first occurrence of search_string and, if found, repositions the cursor at the beginning of this string. With the switch /s one can force a case sensitive search for search_string. 

	ltext chaucer.txt hadde /s 

The automatic start option is useful when loading Lexa Text from a batch file. You could then include a search string in the batch file as a replaceable parameter (e.g. as %1, %2, etc., consult your DOS documentation on how these work). In addition if you specify Lexa Text as user editor in Lexa Sweep then an automatic search can be initiated by the latter programme if required (see description below). 

(II) Starting with automatic initialization Instead of entering the name of a file on the command line you can use the initialization switch to force Lexa Text to read an initialization file and use the information to set itself up. Should you wish to have the programme read an initialization file which is not called ltext.ini (the default name) then you must specify this as part of the initialization switch as in the second example below. 

	ltext /i 
	ltext /i-special.ini 

In order for this to work the initialization file (default or user-specified) must be present in either (i) the current directory or (ii) some further directory which is accessible to Lexa Text via the entry for the DOS path variable (see your DOS documentation if you do not quite understand this). 
	For the details of initialization files, see the relevant remarks below.

(III) Starting with automatic cursor positioning The third syntax variant for LexaText as indicated above enables you to load the last file you were using again and jump automatically to the line in the text file where the cursor was positioned on exiting. Lexa Text will load any other previous files into their respective text areas as well, i.e. you are not restricted to one previous file. Note furthermore that when you start Lexa Text in the batch mode (see below) then the log file is used for re-entrying Lexa Text with all previous text files loaded. 
	The information on the last file(s) edited and the cursor position is stored in a file ltext.log which is deposited in the home directory of Lexa Text; to successfully use this function Lexa Text must be able to find this file on re-starting (it always assumes that the log file is to be found in the Lexa Text home directory; as this is known to Lexa Text there should be no difficulty in locating the log file). 

(IV) Starting in batch mode This start options allows you to load Lexa Text and have the programme release all system memory when you execute a DOS command via Shift-F1, see discussion of this mode below. 

1.2.	Screen layout

Assuming that you have successfully loaded a file the screen of Lexa Text you can move up and down in your text and change it at will. If you wish to have lines which are wider than the screen then the text is shifted to the left 40 characters at a time (horizontal scrolling). By comparing the cursor position with the column counter on the top line of the screen you can tell just how far out on a line you are to the right. There is a limit of 4096 characters per line. If the text you load has lines longer than this then they are wrapped round to a new line and the down arrow symbol (_) appears at the end of the line. On storing a file back to disk, this symbol is removed to give the original length of the line in the disk version. 

1.2.1.	Processing several texts with Lexa Text

Lexa Text allows you to process up to four texts simultaneously. Each text is independent of the next. However, you can copy lines or blocks of text from one to the other. You may delete text in one text and undo the deletion in a further text. Macros can be activated in any text. 
	From the point of view of user interface, Lexa Text presents the 20 possible text areas as windows numbered from 1 to 20. When you start LexaText you are automatically positioned in the first text area and can move to any one of the further text areas and back again by means of the following keys: 

	Alt-1  Move to text area one
	Alt-2  Move to text area two
	Alt-3  Move to text area three
	Alt-4  Move to text area four, etc.

If there is no text currently open in the area which you choose with the Alt key plus number then the file manager is invoked and you are prompted to either (i) select a text to process from the directory listing offered in the file window or (ii) press Esc to indicate that you wish to start a new text. 

Note You can tell what text area you are in by looking at the top right of the screen where the word Text followed by the current work area is to be seen. 

1.2.2.	Split screen

It is frequently convenient to view part of two texts simultaneously (say you are translating a text, you could have the original in one part of the screen and your translation in another). To allow for this Lexa Text has a special command for splitting the screen: Alt-F7. 
	After doing this you have ten lines of text visible in each text area (as opposed to the 22 lines in the full-screen mode). The areas you can see are always Text 1 or Text 3 on the upper half of the screen and Text 2 or Text 4 on the lower half. You can tell which half of the screen is active by checking where the cursor is. All commands apply to the split-screen mode which are legal in the full-screen mode. 
	The split-screen command is a toggle: it reverses the currently active mode and so can be used to switch back and forth between modes. 
	Note Because Lexa Text loads files into memory in their entirety you may arrive at the point where there is no system memory left. If you try to load a text too large for system memory you get an error message and only as much of the file is loaded as still fits into memory. In this case you are strongly advised not to edit the file in question. 

There is no inherent limit on file size; if you choose to edit just a single file then, on a system with 640K of memory, you should have about 400K of working space, assuming that you have not loaded any resident software, apart from a mouse and keyboard driver (you will have correspondingly more memory if you are running version 5 of MS-DOS). At any point in Lexa Text you can check on the amount of memory left by pressing F9 for Environment Information. 
	Bear in mind that Lexa Text loads a file entirely into memory. While processing very large texts which are just under the memory limit you may, if you enter too much new text, get the error message ‘out of memory’. There is nothing you can do here except save the file to disk, split it into more manageable sections and edit each of these individually. 

1.2.3.	Command execution via picklists

There are two basic means of activating commands within Lexa Text. The first is that which has been discussed so far: the user presses a function key or combination of keys to start a command. The advantage of this method is one of speed, the disadvantage should be equally obvious: it is necessary to learn a large number of key combinations by heart. What the beginner needs is a means of activating commands without knowing what keys are required. The solution to this dilemma is provided by a set of inbuilt picklists which are activated by a single keystroke. The user does not even have to remember what this is as it is continually prompted on the bottom of the screen. Either of the following keystrokes will do here. 

Picklist activation keystrokes:   Alt-Return,  Shift-Tab

Once pressed a window will appear as above; this is one of eleven which can be selected by using the LeftArrow and RightArrow keys. To move within a window use the Up Arrow or DownArrow keys (or PageUp, Page Down for the beginning or end of a list. 
	Each window contains the text of a command and before this the key combination which has the same effect (with time, you will not need the picklists any more as you will remember the necessary key strokes for a command offhand). Bear in mind that any picklist option can be activated with the mouse by moving the cursor to the text of an option and clicking the left button. 
	If a right arrowhead appears before an option in a picklist then this indicates that there is a further window which can be opened by choosing this option. 
	A special picklist is activated by pressing either Alt-Return or F1 when marking a block of text. This contains the command options available on this level. 

On the file manager level there is a system of picklists for easy execution of commands which is analogous to that on the text editing level. It is activated like the other system by pressing Shift-Tab or Alt-Return. Bear in mind that the last key combination only works if you are using a Lexa keyboard (either LKEYB.EXE or another derived from this via the keyboard editor Lexa Setkey). 

1.3.	Summary of commands

Preamble Not least of all to facilitate power users, Lexa Text is strongly function key oriented. This means that for all commands apart from text editing and navigation, one of the ten function keys (or a combination of one of these with either the Shift, Control or Alt key) is used. 
	All commands which are accessed via a function key or combination can be activated just as easily with the mouse (see remarks on mouse support below) or via the picklists (see previous section). 

1.3.1.	Text editing options

1.3.1.1.	Navigation keys

	End  			End of current line 
	Home  		Beginning of current line 
	PageUp  		Top of current screen 
	PageDown 		Bottom of current screen 
	Shift-PgUp		Up a text page 
	Shift-PgDn  		Down a text page 
	GreyPlus		Down half a screen 
	GreyMinus		Up half a screen 
	Ctrl-PgUp		Beginning of entire text
	Ctrl-PgDn  		End of entire text
	Ctrl-RightArrow	Move right a word
	Ctrl-LeftArrow	Move left a word 

	Up,Down,Left,Right Arrow	(Expected cursor movements)

Ctrl-Home  Goto to line # In addition to the obvious cursor movements just listed you can jump to a particular line with the present command. 

1.3.1.2.	Deletion operations

	Del  		Delete current character (no shift) 
	Backspace	Delete character (shift to left) 
	Ctrl-L		Delete current line 
	Ctrl-End	Delete from cursor to end of current line 
	Ctrl-R		Delete word to right of cursor 

Note All deletion operations result in the deleted characters being stored in the undo buffers for later retrieval if this is desired. The undo deletion buffers are realized as reserved areas of memory and each have a maximum size of 4,000 bytes. 

F6  Undo Delete Any stretch of text which has been deleted by means of any one of the deletion operations (see above) can be retrieved from a series of 4 internal buffers in which Lexa Text stores deleted text. The screen changes on pressing F6. 

The initial 23 lines of the first buffer are shown and you have three keystrokes at your disposal: (i) SpaceBar to page through the deleted text buffers, (ii) Return to retrieve the contents of a buffer and (iii) Escape to return to the current text without any change. 
	Note that once all four buffers have been filled with text the next deletion leads to the first buffer being re-filled and so on in a circular fashion. 

1.3.1.3.	Find and exchange operations

Ctrl-F  Find search string This operation always begins from the current cursor position, so to find the first occurrence of a string in a text move to the top by pressing Ctrl-PgUp (or search backwards). A search or exchange string can be up to 48 characters in length. 

As indicated on the top of the window which opens on pressing Ctrl-F, search is by default case insensitive. Press F3 to make it sensitive to case (this is echoed on the top line of the input window). With the F5 key you can determine which direction Lexa Text is to search in, either from the current cursor position towards the top or the bottom of the text. A small blinking arrow on the righthand edge of the dialogue box shows the currently chosen direction. Press Return to begin searching, Esc to cancel the operation. 

Ctrl-N  Next search string find This continues the search from the current cursor position without the necessity of re-entering the search string. You may continue until no further find is found in the text (a message to this effect appears in the first line of the screen). 

Ctrl-B  Backwards search This is essentially the same as the previous command with the obvious difference that searching is done from the current cursor position backwards to the beginning of the text. If a search string has not already being specified, the relevant dialogue box is opened. 

Ctrl-D  Display search string Simply shows you the current search string on the first line of the screen in curly brackets. 

Ctrl-E  Exchange strings To initiate the "find and exchange" operation you press Ctrl-E on which a dialogue similar to that for a string search is opened; it is somewhat more complex because more information is needed and more options are available. 
	First of all you specify the string to find; press Return. The second input line becomes active and you enter the string to exchange the find string with; press Return to terminate and begin the operation. 
	While specifying either search or exchange string you can press any of the following three function keys to determine the mode of operation: 

	F3  Toggle case sensitivity for find and exchange
	F4  Toggle confirmation of exchanging strings
	F5  Toggle direction in which search is to be made

Notes If you begin the search by pressing Ctrl-Return then Lexa Textautomatically repositions the cursor on the line from which the search starts when (i) the search (and exchange) is finished or (ii) you terminate the operation by pressing Esc. 
	If you choose confirmation of exchange, then on each find Lexa Text stops and this prompt appears on the top the screen:  Exchange [ y | n | Esc ]?  You may now choose one of the three possibilities indicated. During any search or exchange operation pressing the Escape key leads to the operation being aborted. The cursor remains placed at the point at which the user pressed Escape. 

1.3.1.4.	Miscellaneous

Ins / Over  Insert or overwrite mode Note in addition to the above commands that you can toggle input modes with the Ins key (from the Insert to the Typeover mode and back again). 

Ctrl-Return  Page break Begins a new page; the page break is indicated by two parallel lines across the width of the screen. 

Ctrl-X  Do word count Simply totals the number of words in current text. The same command can be used to count the words within a marked block. 

F3  Store/Retrieve Line This command stores the contents of the current line; by pressing F3 again you can copy the stored line into a new line. 
	Before Lexa Text proceeds the user must specify whether he/she wishes to store the line the cursor is currently resting on or to retrieve the contents of the line buffer (assuming that something was copied into it earlier). Note that the tab ruler in the second line of the screen is replaced by a special prompt. 
	Use either the LeftArrow, RightArrow or the Tab, ShiftTab keys to choose the desired action (as always, Escape aborts the action). If the line buffer has already been filled then its contents are displayed on the second line of the screen. 

Note F3 causes the current line from the present cursor position to the end of the line to be stored. If you wish to have the entire line copied then you must move to the beginning by pressing the Home key. 
	If you choose "Retrieve", the contents of the buffer are inserted into the current line at the cursor position. The remainder of the line remains intact. 

Shift-F6  Copy Previous Line Assuming that the previous line has a length greater than one, pressing the present key combination leads to the previous line being copied into the present one. Note that only that section is copied from the cursor position to the end of the previous line (to duplicate the entire line, move the cursor to the beginning of the current line with Home). The section is then inserted into the present line, i.e. if there is text to the right of the cursor in the current line then this is shifted to the right by the appropriate amount. 

Ctrl-F8  Insert Time Inserts the system time at the current cursor position. 

Ctrl-F10  Insert Date Writes the current system date at the present cursor position. The default is the American format, i.e. MM/DD/YYYY. 

1.3.2.	Text appearence

Ctrl-T  Set tab width The default number of spaces to which a tab character is resolved is 8. You can change this value manually by pressing Ctrl-T and entering a new value in the dialogue box which opens; the legal range of values is from 2 to 12. If you wish to see the tab characters and the spaces which derive from them then press Ctrl-F3 (= Show formatting). 

Notes The tab positions can also be seen in the ruler on the second line of the screen in the main text area. 
	When you have entered a value for the width of a tab you are asked if you wish to resolve tabs to spaces on saving a text. Toggle this value with the F5 key (the current state is indicated before the text of the option). Note carefully that if you save a text to disk with tabs resolved to spaces then the tabs are irrecoverably lost as they are replaced by the number of spaces they are indicated by on screen. 

Ctrl-F3  Show formatting This is a toggle which alternatively turns the display of line ends and tabs on or off. 
	The initial state is ‘off’. Turning the formatting display on is especially useful with files which make heavy use of tabs and where the latter may vary in the number of spaces they resolve to. Note that line ends are indicated by the symbol ¶ while the spaces used to resolve tab characters are indicated by a dot and the beginning of each new tab position is shown by the broke vertical bar, |; normal spaces are displayed as small dots. 

Alt-F3  Show codes The present key combination is a toggle: it switches from the display of printer control codes to a display as bright lettering and back again. The principle in Lexa Text is as follows: all printer control codes (on these, see following comments on Alt-F8 Choose font) are embedded in texts as a two byte sequence, ASCII $5 followed by a number from 1 to 8. If the show codes switch is on, then these are to be seen for what they are. If the switch is off, any piece of text between any two control codes is displayed in high video, i.e. as bright lettering. The value of the show codes switch is that it allows one to check retrospectively on what codes are embedded in the current text. 

Alt-F8  Choose font A limited of amount text formatting is permitted within Lexa Text. The user can choose from eight font types and thus embed a generic font marker into the current text at the current cursor position. 
	A font marker consists of two bytes, ASCII $5 followed by a number from 1 to 8, signalling the number of the font to be activated at that point in the text. Font markers are initially generic which means that there do not refer to a specific printer type. 

Note There are various font macros built into Lexa Text: Ctrl-H Highlight (= Bold type); Ctrl-I Italics; Ctrl-U Underline. If you activate any one of the first three the remainder of the current line is displayed in a particular screen attribute (usually a particular colour). Move the cursor to the point where you wish to have the particular attribute terminate. 
	You are free to associate whatever strings you like with whatever font numbers. However the picklist you are presented with has settings for the first four fonts as these are those which you are most likely to require when text editing. 
	Once you choose a font via Alt-F8 then this remains active until the end of the current line. Turn a font off again by choosing the Base Font option. 
	There is no provision for carrying over a font characteristic into a following line when typing text. You must re-specify the font for the new line. What you can do, however, is to mark a block with F4 and then specify a certain font for the entire block by using one of the four formatting macros (see remarks above). 

Note The printer command files must be located in the current Auxiliary FileDirectory. 

Ctrl-Q  Toggle colours for text display

1.3.3.	Block processing

F1 Set of block options The normal help key opens a picklist with the set of options for block marking from which you can choose one by pressing Returnor hide the window by striking Escape. 

F2  Sort lines in block An ascending alphabetical sort of the lines in the currently marked block is executed on striking the current key. 

Shift-F2  Number lines in block This option will insert lines numbers at the beginning of each line in the currently marked block. The numbering starts at the beginning of the block counting from ‘1’ and continues to the last line of the block. The line numbering is independent of the numerical position of the marked lines vis à vis the entire text. 

F3 Uppercase conversion Converts all letters between ‘a’ and ‘z’ to the corresponding uppercase ones, i.e. makes capital letters of small ones. 

Shift-F3 Lowercase conversion The reverse of the previous option: all capital letters are converted into their equivalent small letters. 

F4  Mark/Copy Block This keypress activates the block processing function in Lexa Text. When you press F4 you note that in the first line of the screen a message appears "Press Esc to cancel marking". You may now use any one of the following four keys to mark a stretch of text: UpArrow, Down Arrow; Page Up, PageDown. 
	Once you are satisfied with the section of text you have marked you can perform one of several functions on this stretch of text. Here are the legal keypresses. 

	F1  		Block processing help
	F2		Sort lines
	Shift-F2	Number marked lines
	F3		Uppercase conversion
	Shift-F3	Lowercase conversion
	F4  		Copy current block
	Shift-F4	Format current block
	Ctrl-F4  	Move current block
	F5		Calculation options
	F8		Print current block
	Del  		Erase current block
	F10		Save block to disk
	Ctrl-E		Exchange strings within block
	Ctrl-X		Count number of words in block

Notes There is no pre-determined limit on the size of a block you can mark. The section of the current text which is defined as a block is saved to a temporary disk file if the concluding key for the marking operation implies the retrieval of this section of text at some later point (e.g. F4). If the marked stretch of text is deleted then it is available for undeletion immediately (for details see comments on F6 above). 
	To retrieve the text in a block buffer, press Shift-F10. You may view the block buffers by pressing Alt-F4. 

Shift-F4 Format Block Pressing this key combination while a section of text is marked leads to a pop-up window appearing in the upper right of the screen. This is a picklist with a set of four options which relate to text formatting. 
	After choosing an option the marked block is displayed in the manner chosen in the picklist. Note that you may block justify a marked section of text during processing or specify in the print menu that an entire text should appear as block justified on being outputted on the printer, on the latter see remarks below. 

Ctrl-F4  Move Block Deletes the mark section of text at its present position and allows you to insert it at some other point either in the same or another text via Shift-F10. 

Alt-F4  View Block Buffers On pressing this key combination you are shown the contents, if any, of the block buffers. The screen looks like that presented when you press F6 and you can page in the block buffers with SpaceBar. 

F5  Calculation options Once you have marked a block you can carry out one of four calculations on the numbers contained in the block, for details see 1.3.5. Online calculation below. 

F8  Print Block This option dumps the current section of marked text onto the printer. Note that it uses the printer configuration which is currently selected. Check on this by pressing F8 for the printer control level when not block marking text. 

F10  Save Block Writes the presently marked section of the current text to disk. To change the name of the file (and possibly specify a different drive and directory) edit the input line which is activated immediately on pressing F10. 

Shift-F10  Retrieve a Block There are 4 possible block buffers available within Lexa Text (just as there are four undo deletion buffers). On pressing Shift-F10 a picklist appears and you can choose a buffer to retrieve. With Space you can view the contents of the buffer the highlight bar is currently resting on. 

Remember (i) that the buffer contents are copied into the current text starting at the present cursor position and (ii) that you are not bound to the same text when storing and retrieving text from one of the block buffers. 

Del  Erase current block Deletes the currently marked block after confirmation by the user. The deleted section is placed in the Undo Delete buffer and can be viewed and/or retrieved via F6. Bear in mind that only the first 16K of the marked block is retained for further retrieval. 

Ctrl-E  Exchange strings within block Identical to the general exchange function but only affects strings found within the currently marked block. 

Ctrl-X  Count number of words in block Does a word count on the currently marked block (otherwise on the entire text). 

1.3.4.	Printing options

F8  Print Control Level Lexa Text allows for relatively flexible printing of texts. To achieve this you are presented, on striking F8, with a screen on which various picklists are displayed. To set up printer features either use the options on this level or specify the necessary parameters in an initialization file and call this on starting Lexa Text. Most of the features on the printer control level are self-explanatory. However, a few require further comment. 

(i)  Print current page Page breaks can be entered during text editing by pressing Ctrl-Return. On doing this a row of double lines appears on the screen to mark the break. On printing via the present option, Lexa Text sends all text between two such page breaks to the printer. Note that if you have not entered any page break the entire text will be printed. 

(ii)  Select printer If you choose either the laser or dot matrix printers then these are initialized with commands typical for each type. The "Standard" printer is distinguished by the previous two in that no initialization sequence is sent to the printer; use this type if you have some kind of printer not catered for in Lexa Text. 

(iii)  Set line width This parameter is only used when formatting text (justifying or centring lines) either during text editing (after marking a section of text and pressing Shift-F4) or when outputting text on the printer. 

(iv)  Set left margin The number entered here refers to the number of spaces in the currently chosen pitch which are issued before the actual line is printed. A margin of 10 with a pitch Line Courier 16.6 will result in a left margin of somewhat more than half an inch. 

(v)  Set page length The value entered here refers to the total number of lines printed per page including any possible header and footer. Do not forget to consider the latter to work out how many lines of actual text will be printed on each page. When the value for page length is reached Lexa Text sends a form feed (ASCII $12) to the printer. Note If the value you enter here is greater than the longest possible page for your printer then what will happen is that a full page is printed and a part of a second page. The number of lines on this latter page is the value here for "Page Length" less the maximum number of lines per page as dictated by the hardware of your printer. 

(vi)  Set line spacing Line spacing is measured in the conventional as "lines per inch". When you choose the present option you can toggle with the SpaceBarthe values in the middle window; the legal range is from 1 to 12 with steps of 2 from 4 upwards. 

(vii)  Print line numbers Something for programmers who wish to have the lines of source files numbered. The numbering appears on the left-hand margin of each page. 

(viii)  Print page header / Print page footer To print a header or footer Lexa Textchecks to see if there is a file with the extension .hdr or .ftr respectively in either (i) the Auxiliary File Directory  or, if this is not set, in the Lexa Text home directory (which is always reachable as otherwise Lexa Text would not have started in the first place). The default names for the header and footer files are ltext.hdr and ltext.ftr respectively; these can be overridden by specifying the name for header and footer file. Note that, if user-specified, both header and footer file must have the same name; the extensions just outlined are provided by Lexa Text automatically. 
	At the beginning of each page Lexa Text now prints the contents of each of these files (if you specify that both a header and a footer file are required). What each file contains is irrelevant to the printing process. The only restriction is that header and footer together not be greater in length that the number of lines to be printed on each page. 
	Both the header and the footer files can contain certain combinations of characters which are interpreted in a specific manner by Lexa Text. These are so-called command sequences which are used to encode instructions to the programme. 

Command sequences in header and footer files:

	$4 1 :   Name of current text
	$4 2 :   Size of current file
	$4 3 :   Current date
	$4 4 :   Current time
	$4 5 :   Current page number (calculated by Lexa Text)
	$4 6 :   Total number of pages to print
	$4 7 :   Current page number as defined in text

To enter these sequences in a header or footer file, press the Alt key and type the number "4" on the numeric block on the right of the keyboard; then enter the appropriate number immediately after it, the latter must be typed from the number row at the top of the alphanumeric block of the keyboard (needless to say, without press the Alt key). The ASCII $4 character is a diamond shape; if you edit the header and footer files with Lexa Text itself you will see this form on pressing Alt + "4". Should you use a different editor you may find that instead the programme displays "D" which is a shorthand for "Control-D", another manner of referring to the character with the numerical value 4 in the ASCII character set. 

Note For examples of a header and footer file, take a look at the supplied files on the Lexa distribution diskettes. 

(ix)  Block justify text By activating this option you can ensure that text is block justified when it is printed. Note that the justification is done during the actual printing and has no effect on the appearence of the text as you edit it. A few points in this connection should be noted by users. 

1)	You must specify a line width to which each line is stretched during 
	justification (unless you accept the default value of 72 characters per line.
	This must be below the maximum line width of 256 characters.

2)	Any text line longer than the line width will jut out on the right beyond the 
	justified block; if the particular text line is longer than the maximum line
	length allowed by your printer, then it is truncated (this is done by the
	printer).

3)	Only those lines whose length is at least 80% of the specified line width are 
	block justified. Assuming the default line length of 80, only those text lines
	which are 64 characters and over in length will be justified on printing.

4)	If a text line contains one or more tab characters then it is not justified. The 
	reason for this is to avoid block justifying text which has been deliberately
	positioned somewhere on a line via tabs (e.g. right justifying your address
	in the head of a letter).To test the block justify function you should print a
	text to file, load the file ltext.prt into an empty text area and see what the
	effect of justification is like by comparing this output with the original text
	file.

(x)  Use character map This is an advanced option which enables you to have any of the characters in a file translated to any other values on printing. In addition you can specify what command sequence is to be sent to the printer before and after each character which is translated. The primary use for such a feature is to activate a download font in a printer and deactivate it again, thus allowing you to switch between a standard and a customized font when printing. 
	The following are the command sequences for download on and off (this applies to dot matrix printers complying with the Epson LQ standard): 

	On:   27 38 01  (hex: 1B 26 01)
	Off:  27 38 00  (hex: 1B 26 00)

Character map file The default name for the character map file is ltext.tbl. Press Return to leave this unchanged or edit it as you wish. A different name for the character map file and different sequences from the default values can be specified in an initialization file (see below). 
	The map file contains a set of substitutions which are observed when Lexa Text prints a text. A sample contents of character map file might be: 

		230	102
		228	101
		233	105

In this simple case all instances of ASCII $230 are replaced by ASCII $102, all those of $228 by $101 and those of $233 by $105. Technically this works as follows. 
	The file character map file is read into memory into a character translation table. This can hold up to 256 entries at any one time. On printing Lexa Textcompares each outgoing character with the substitutions which it has read into the character translation table. If there is a match then the particular byte to be printed is translated into the substitution byte in the character translation table and sent to the printer flanked by the command sequence for download on and download off if these sequences have been specified. 
	The character map file must have a definite format. It is an ASCII file with one substitution per line. First comes the number (in decimal!) of an input byte value then comes a tab or at least a space to separate the input byte from the output byte which now follows, it also being given in decimal form. The file should contain as many lines as desired substitutions. 

(xi)  Number of first page This option is useful if you have split up a file into two parts but wish to have a continuous print out: specify the number after the last page of the first text as the number of the first page of the second text. 

(xii)  Print text to file With this option you can choose to have the result of the print operation redirected to a file. On choosing this item Lexa Text offers you the opportunity of altering the default name for the output file ltext.prt. By simply pressing Return you accept this; to change it, edit the input line on the top of the screen. Bear in mind that there is no confirmation of overwriting an existing file when printer output is redirected to disk. 

Notes When an option is chosen, a tick appears to the left of the text line referring to it in the leftmost window. Options with only two possible values are toggles, i.e. pressing Return either turns the option on or off depending on its previous state. 
	The fonts which are available in the window on the right of the screen are dependent on the printer chosen. To avail of Times Roman and Helvetica typefaces on laser beam printers, the necessary soft fonts must have been previously loaded into the printer (you can do this without leavingy Lexa Text by either issuing a DOS command via Shift-F1 or exiting temporarily to DOS via Ctrl-F1). 
	If you wish to use a certain combination of printer options repeatedly then specify the values in an initialization and load this on starting Lexa Text (see below for details). 
	Any file needed during printing, such as the header and footer files or the character map table, must be located in the current Auxiliary File Directory

1.3.4.1.	Printer drivers and Lexa Text

F4  Printer Driver The user can at any point specify the printer driver to be used on printing. By default Lexa Text chooses LASER.PCF for laser printers and DMP.PCF for dot matrix printers (these printer drivers are supplied with Lexa Text). However, users may specify their own printer driver via the F4 key on the printing level. Lexa Text checks if it can read the specified file successfully. If not, an error message is issued. For good printer output, the commands contained in a printer driver file must be appropriate to the printer being used. Bear in mind that a printer driver file is a normal ASCII text and can be edited with Lexa Text itself. Comments can be included in such a file by starting a line with a semi-colon as usual. 

Type of printer selected

The type of printer to be user for a particular print job is specified on the print control level via F4 or in an initialization file (see below). When printing, LexaText replaces the font markers by the command strings which are contained in the printer command file (assuming that it is accessible) for the type of printer you have chosen (incidentally, the programme Lexa Print functions in exactly the same way). 
	Supplied with the Lexa set are a couple of files with the extension .pcf. These are so-called printer command files. They contain 8 commands, each consisting of a string which is to be sent to the printer when a font marker with the same number is encountered in the text which Lexa Text is printing. 
	The structure of a printer command file is quite simple. You enter the command string on a single line (any line beginning with a semi-colon is interpreted as a comment and ignored. If you type at least one space (or tab) after this then you can use the rest of the line as a comment as in the following cases: 

LASER.PCF

Esc(1XEsc&d@	| LGothic Normal     	| 
Esc(2X			| LGothic Bold       	| 
Esc(3X			| LGothic Italic	|       
Esc(4X			| LGothic Small Caps 	| 
Esc(5X			| LGothic User Font   	| 
Esc(6X			| LGothic Underline   	| 
Esc(7X			| LGothic Tiny Font  	| 
Esc(8X			| LGothic Bold Caps  	| 
Esc(9X			| Helv  8 Pt Normal  	| 
Esc(10X		| Superscript LGoth. 	| 
Esc(11X		| Subscript LGothic  	| 
Esc(12X		| Helv 12 Pt Normal  	|	ROMAN_8.TBL 
Esc(13X		| Helv 12 Pt Bold    	|	ROMAN_8.TBL 
Esc(14X		| Helv 12 Pt Italic 	|	ROMAN_8.TBL 
Esc(15X		| Helv 14 Pt Bold    	|	ROMAN_8.TBL 
Esc(16X		| Helv 18 Pt Bold    	|	ROMAN_8.TBL
;
; The following is a list of assignments. The fonts which are activated by 
; Ctrl-1 through 4 while editing can be assigned to a font specified above. 
; This means that the string on the right will be sent to the printer when the 
; character activated by the CTRL+digit combination is encountered in a text 
; which is being printed. 
; 
CTRL_1	Esc(16X 
CTRL_2	Esc(15X 
CTRL_3	Esc(12X 
CTRL_4	Esc(2X 
; 
; How is an endnote number reference in text to be printed? 
; Font is assigned here which is used on printing. 
; 
Esc(10X		Use Superscript Gothic 
; 
; End of File 

Note The control sequences for the laser printer consist simply of identification numbers for different soft fonts; this obviates the necessity of specifying all the formal features of each font when activating it. However, it assumes that there are fonts in the memory of the laser printer which have these identification numbers. The font types given in the righthand column of the above table are those which the present author selects when printing texts during corpus processing. Other users of Lexa Text will have to (i) load a set of soft fonts into their laser printer and (ii) decide on what ID numbers to use with which of these fonts. This procedure requires that users acquaint themselves with the technicalities of soft font management on laser printers and is something which may take some time, and above all patience, to realize. It represents, however, a very flexible method of activating a customized set of fonts for personalized printout. 
	There is appropriate software available from the manufacturers of the main type of laser printer, Hewlett Packard, which renders the task of constructing customized sets of fonts and loading these with suitable ID numbers quite easy and definitely within the reach of less technically inclined computer users. 

Embedding printer commands in a text file

Any line of text which begins with ‘##’ is taken to be an encoded printer command for which the following format is expected: 

	First two characters: ##
	Next character a number from 1 to 9 with the following code obtaining:
	1 = Number of printer type 
	2 = Name of printer command file
	3 = Font type
	4 = Line width
	5 = Left margin
	6 = Page length
	7 = Lines per inch
	8 = Block justify
	9 = Port to be used

Notes Spaces may separate ‘##’ and the command number and the latter from the ensuing command. Consult the initialization file ltext.ini to see what values are legal for the above parameters. Printer command lines can be embedded anywhere in a text but are only read once on loading a text. They are not themselves printed and are thus treated like lines beginning with @@. 
	The Hewlett Packard Deskjet printer can be used with the laser.pcf printer driver. If you wish you may specify the driver inkjet.pcf which is supplied with Lexa Text. This operates with the fonts of the Deskjet printer. 

Word wrap and Autoindent

Although Lexa Text is a text editor and not a word processor it does contain two features which are usually associated only with word processors. The first of these is word wrap. The algorithm used in Lexa Text is deliberately simple. It allows you to continuously type in text without the necessity of having the press Return at the end of each line. To a limited degree, Lexa Text is capable of reformatting text when you type something into the middle of a line. However as the programme does not distinguish between line breaks and paragraph breaks (both use the combination of Carriage Return and Line Feed), Lexa Textwill not produce exactly the effect which you would expect of a word processor, i.e. to reformat text neatly to the end of the current paragraph. For word wrap to work the current line length should not be more than 80 characters. Note the command for word wrapping a paragraph: Ctrl-F7. 
	The second feature included here is autoindent. By this is meant that on starting a new line (i.e. on pressing Return) the cursor jumps to the first column which in the previous line is filled by non-white space (any character, except blanks and tabs). This is useful when indenting text, e.g. for a quotation, or when constructing tables. 

Prohibiting the printing of lines

Any line in a text which begins with two ‘at’-symbols, i.e. @@ will not be printed by Lexa Text. You can avail of this to add comments to a text which are then ignored on printing. 

1.3.5.	Online calculation

F5  Calculate.  This is a function which can be used to perform some calculation on the numbers in any marked lines of text. To start with you mark the lines which contain the numbers for the calculation. Then press F5; a small picklist appears in the top righthand corner of the screen and you may choose from four options. Move the highlight bar in the popup window accordingly and press Return. The calculation is carried out, and the result is inserted into the text and the marking of the stretch of text disappears. The word representing the type of calculation is written before the result, e.g. Total: 4216968.951 for the result of the example illustrated on the following screen print-out: 

Note Users should be aware of the means used by Lexa Text to locate the numbers on lines of text: each line of marked text is examined, starting at the current cursor position immediately before pressing F4 to mark a section, for the first occurrence of (i) a digit or (ii) a sign, - or +. A dot is regarded as a decimal point if, and only if, it is immediately followed by at least one digit. Lexa Text now reads the lines until the first non-digit occurs; numbers do nothave to be delimited from surrounding text by spaces or tabs. Bear in mind that this means any further numbers in a line will be ignored if they are separated from the first by a non-digit (in the example above, on the second line, only 2.0 is considered for the ensuing calculation). A line without a number is obviously not considered. Each calculation is performed to four decimal places. Shift-F8Calculator The need frequently arises during text editing to perform some calculation or other. The simplest means to do this is to use the calculate option when you have marked a stretch of text via F4. For more complicated cases you should avail of the internal desktop calculator. 
	The calculator activated by means of the current key combination. The centre of the screen is filled by the calculator; an input line is automatically opened and you may now enter operands and operators for a calculation. The types of operations which are possible within the calculator are indicated in the box on the top left of the screen. They are indicated in such a way that once you get used to the calculator you will hopefully recognize them easily. 

While working with the calculator the result of any single expression is displayed in the result box on the top right of the screen. All calculations are accurate to four decimal places. If you force calculations which go beyond 16 places before the decimal point the results are unpredictable, usually you get an error message or a series of nines as calculation result. Furthermore the calculator can detect certain illegal expressions such as an attempted divide by zero or a calculation with values which are clearly out of range, e.g. 239669 to the power of 4156. 
	The data and the operators for a calculation are entered on a single line (technically called an expression). An example would be the following line: 

	(234 + 56.78) / (4.77 * 1.39) - 604

After entering this line you press the Return key and the expression is evaluated. Expressions can be formed at will, bearing in mind that brackets are necessary in many cases to make sure that operator precedence does not cross with your intentions for a particular calculation. After a calculation has been carried out the result is displayed and the data prompt line is filled with the result as well to enable you to use this for a further calculation. You may of course retrieve a previous line by using the UpArrow, DownArrow keys. This is convenient if you wish to carry out a calculation similar to a former one: just make the changes and evaluate the line again. Bear in mind that the calculator can store up to 16 lines of data. If you exceed this the DownArrow key will lead you to the first line, i.e. entries are kept in a circular queue. 
	The expression line can be edited in a flexible manner by using the various keys of the User Input Editor, see relevant appendix below. 
	Expressions are only possible with operators which take more than one operand. These are the basic four functions +, - , *, / along with % (percent), (power) and m (modulo). Unary operators such as l (natural logarithm) are placed after a single constant (number) and then evaluated as in: 34 l Return. The set of possible operators is as follows: 

		1)	+	Addition
		2)	-	Substraction
		3)	*	Multiplication
		4)	/	Division
		5)	%	Percentage
		6)		Power
		7)	e	Exponent
		8)		Square root
		9)	m	Modulo
		10)	l	Natural logarithm
		11)	l10	Logarithm base 10

Note the following points in connection with the use of any of the above: 

1)	Operands and operators must be separated by a blank (this does not apply 
	to bracketing used to indicate operator precedence).

2)	An operand can be up to 12 digits long. 

3)	An illegal expression is recognized by the system and the computer beeps. 
	By means of the UpArrow key you can retrieve the defective expression
	and correct it.

4)	Calculations are made to 16 places before and 4 after a decimal point. If 
	you try to calculate a number beyond 16 digits some or all of the decimal
	points are lost. If the number calculated has more than 21 places before the
	decimal point then the right-most of these are lost.

Importing Numbers into Calculator When you call the desktop calculator the first thing Lexa Text does is to see if there is a number on the line scanning from the cursor position to the end of the line. If there is, the first number from the cursor position rightwards on the current text line is adopted into the input line of the calculator from where you can use it for some computation. The means used by Lexa Text for finding numbers in a line are the same as those outlined above in the remarks on the calculate option during block processing. Notes To export the result of a calculation back into the current text, simply exit the calculator by pressing Ctrl-Return. If you wish to compute a calculation before exporting it back into the text, press Return to calculate and if you are satisfied with the result, re-calculate it this time using Ctrl-Return to ensure that the result is inserted into the text. 
	The internal calculator in Lexa Text requires the external programme _calc.exe (which is contained on the Lexa Text distribution diskette). This is loaded after the user presses Shift-F8 and unloaded automatically once you have finished using the calculator. Ensure that _calc.exe can be reached via the DOS path variable otherwise nothing will happen when you press Shift-F8. 

1.3.6.	File retrieval

F5  New File Allows you to stop editing one text and open another. Before you do so you are asked if you wish to save the text before loading a new one. Furthermore Lexa Text tells you whether the current text has been altered or not. 
	To choose a new file to edit the file manager is called, you then move the highlight bar to the text you wish to process and press F5 to retrieve it. 

Shift-F5  Insert File A similar command to F5 with the difference that with this the current text remains in memory and the new text is inserted at the present cursor position in the old text. You do not have to confirm insertion of a new text so be careful when doing so. 

1.3.6.1.	File information

Ctrl-F6  Macro File Settings Shows all three types of macro files. See section on Text database and macro facilities below for details.

Alt-F6  Show loaded files Here you are offered an overview of what files are currently occupying what areas. The size, date and time of the files (as gained from the directory entries on disk) are shown as well. Note that if the files have been edited intensively there may well be a discrepancy between memory and disk size. 

1.3.7.	System facilities / saving texts

F1  On-line help  The help system for Lexa Text is present in file form. The file necessary to obtain online help is ltext.hlp. This is the data file with the help texts. A precondition for the successful loading of the help file is that the file just mentioned be accessible via the DOS path variable, otherwise an error message is issued. The help system file is a normal ASCII text. Do not be tempted to alter it in any way. If you do it will not function correctly and display of texts will be erractic. 

Shift-F1  DOS Command  This command allows you to execute a command or programme which is carried out by DOS before you are returned to Lexa Text. 

Ctrl-F1  DOS Call.  With this command DOS is loaded temporarily and you can carry out any commands as if you were in DOS normally with the restriction that some of your system memory is now taken up by Lexa Text which is in the background. If you load a further programme when you enter DOS avoid making  another DOS call from within this programme as this may lead to difficulties. When finished working in DOS, type exit to return to Lexa Text. The screen is restored just as you left it. 

F7  Exit to DOS This is the command to unload Lexa Text and return to the operating system. Before doing this you are presented with a window in which you are informed as to which of the four possible texts have been altered. 
	There are three courses of action available here: press n to exit to DOS without saving any files; press y to save the current text; press Esc to cancel the exit command sequence and continue editing the current text. 

Notes Should there be no file loaded in a particular text area then a broken line indicates this in the pop-up window which appears on pressing F7. 
	When you opt to save any altered text Lexa Text moves to the first one and asks you to provide a name under which to store it. It then moves to the next altered text and so until all modified texts have been saved (or deliberately rejected by the user). 

Shift-F7  Exit with directory change If you exit with this key combination then no return is made to the directory from which you started Lexa Text. 

F9  Show Environment This command presents you with a window in which some essential information on the environment you are working in is presented. The first three items refer to the current text (this may be different depending on which text area you are in). 
	The next three items should be noted carefully by the user. The first refers to the directory from which one started Lexa Text; the second to the directory in which one is currently located. This may be different from the first for one of two reasons: 

1)	The user moved to a different directory when choosing a file to retrieve on 
	the file manager level.

2)	The user changed directory during a DOS call (via Ctrl-F1). 

F10  Save Text Writes the current text to disk. To change the name of the file (and possible specify a different drive and directory) edit the input line which is activated immediately on pressing F10. 
	When you either load a new file or quit Lexa Text you are asked if you wish to save the current text. Here as with the save command you are given the opportunity of entering a name for the text. By pressing Return you can accept the prompt. 
	When asked if you wish to overwrite a file which already exists on disk then only pressing the y key will cause Lexa Text to continue (to prevent unwanted action due to the user accidentally pressing some other key). As always you may abort the entire command by pressing Escape. 

Ctrl-Y  Display ASCII chart A simple option to show you the characters of the extended ASCII character set, i.e. those symbols which you have at your disposal on a personal computer, on a separate screen. 

1.4.	Macro facilities

In order to avoid repetitive entry of recurring text a number of macro options have been included in Lexa Text. 
	First and foremost among these options is the text database feature. This allows users to create databases out of text files (you simply insert record markers into an existing text and index it with the programme Corpus Manager) and then, at a press of the proverbial button, choose a text record from a picklist window and import this directly into the current text at the cursor position. You can create as many text databases as you like, change database during processing, have up to 1000 records per database without any pre-set limit on record size. 
	The second option permits what is termed discontinuous marking of text. Here you can mark various lines of a text, which do not have to be contiguous, and then import them into the current text you are editing. This works as follows. You declare a certain text to be a lines file (by designating it as such via Ctrl-F5, having given it the extension .lin beforehand). Then you press Shift-F3and can now mark any lines in the text you like and on pressing F10 just those lines you marked are imported into the current text in Lexa Text. 
	The last option is an internal text macro function in Lexa Text. With it you can assign strings of up to 64 letters to any key from A to Z and then, in combination with the Alt key, insert any of these strings into your text at the current cursor position. The settings for the alphabetic keys can be stored to file and you can load any group of settings via Ctrl-F2. 
	There follows a summary of the workings of the various function key combinations which are associated with the different macro facilities of LexaText. 

1.4.1.	Alpha macros

Shift-F2  Alpha Macros This key combination opens a large window in the centre of the screen with the first 12 of the 26 alpha macros which are available when editing with Lext Text. 

You may move vertically in the list by using the Up, Down Arrow keys or PgUp, PgDn to jump to the beginning or end of the list. 
	On the left of the screen the letter which a text line is associated with is to be seen. Press Return to edit a particular alpha macro. To save the line press Return again, or Esc to reject changes. In order to write the set of alpha macros to disk you must use the F10 key, striking Esc simply returns you to your current text. 
	If you changed the text line for any letter then the altered stretch of text is now available by pressing the Alt key along with the relevant letter, i.e. it is not necessary to save the alpha macros to disk before this applies. Note You may copy a line of the current text into an Alt macro by simply storing the line via F3, opening the macro window with Shift-F2, moving to the letter you want and retrieving the line via F3 again. You will see that the contents of the text line are immediately inserted as macro text for the letter in question. In this connection bear in mind that there is a limit of 64 characters per stretch of text with Alt macros. If the line you store via F3 is longer than this then only the first 64 characters are transferred to the macro. 

Ctrl-F2  New Alt File Several alpha macro files can be created and used at will within Lext Text. By default the programme expects a file called ltext.alt. To specify that a different file be used, you may choose one from the directory listing you are presented with on pressing Ctrl-F2. 

Note An alpha macro file in Lexa Text must have the extension .alt. For this reason only those files in the current directory with this extension are listed when you activate the present command. 

1.4.2.	File lines macros

Shift-F3  Get File Lines You use this keypress to open a picklist window from which to import lines into your current text from the file which you have designated Lines File. This works as follows: you declare some file to be a text lines file (via the Ctrl-F5 key combination), simply by ensuring that it has the extension .lin (the default name is ltext.lin). When you press Shift-F3, LexaText locates this file and reads the first 24 letters of each line of the file and presents these contents in a picklist window which now pops up on the right of the screen. You may mark lines in the file by moving the highlight bar and pressing Return or Shift-DownArrow. If a line is not already marked then it is now marked; if it is marked the marking is removed. You can see whether a line is marked by the tick ( which appears to the left of the line number. To copy marked lines into your current text, simply press F10; striking Esc causes the window to disappear, however, the marking remains and can be used later. To remove all the marking from the lines of the file, press Del while in the file lines window. 

When the command to copy lines is given, Lexa Text consults the lines file and going on the lines marked in the pop-up window it now copies the entire contents of each line in the disk file which has been marked in Lexa Text by the user. 
	The advantage of this method of copying pieces of text from an external file into the current text is that (i) you do not need to load the file into LexaText to start with and, most importantly, (ii) you can mark separate lines in a lines file, so-called discontinuous marking. 

Note A lines file can have a maximum of 1000 lines; to access stretches of text from larger files, create a text database with Lexa Chain and then access sections of this from within Lexa Text via Shift-F9. 

Ctrl-F5  New Lines File You use this keypress to choose a new file from which to import lines into your current text via Shift-F3. The file manager is activated and you select a file in the usual manner. Only those files in the current directory which have the extension .lin are shown in the directory listing. 

Ctrl-F6  Macro File Settings All three types of macro files are expected by LexaText to be located in a single directory (the so-called Auxiliary File Directory) which is the one in which Lexa Text itself resides (unless you have specified a different directory in an initialization file). You can check on this directory, and the name of the various macro files, with the present command. 

Note Remember that it is possible to change the active Auxiliary File Directorywhen on the file manager level by pressing Alt-F9. 

1.4.3.	Text databases

Shift-F9  Get Text Record Of the many text macro functions in Lexa Text this is the one which is likely to convince users of the value of the programme. It enables you to import sections from a text database by simply highlighting the name of a record in a pop-up window. The mechanics of this are as follows. 

You first of all create a text file (with Lexa Text if you like) which you structure by planting markers at strategic points in the text. Take the following snippet from the supplied text database ltext.tdb which explains briefly the idea behind this function. 

About_Text_Databases_1 

A text database is an ASCII text file which has been prepared for operation with Lexa Text. The file contains markers for the beginning of each record ($176) and the end ($176 + $27). The stretch of text lying between these two symbols is regarded by Lexa Text as constituting a single record and is imported into the current text when you move the highlight bar to it in the pop-up window, activated via Shift-F9, and press F10 (or Return). 

There may be up to 1000 records per text database. Each record can be of any length and you can maintain as many text databases as you like. To change databases, press Ctrl-F9 and choose a file with the extension ".TDB" from the current Auxiliary File Directory (this in turn can be set via Alt-F9). 

A text database can of course be created using Lexa Text itself. Should your text no longer fit in memory then try editing it with Lexa Text Small (or TinyText for huge text files). 

The most convenient and manageable means of dealing with large text databases is to create and later edit them in chunks, using the supplied utility Lexa Chain to link up several files to a single text database file. With the corresponding unlink utility, Lexa UnChain, you can unravel the member files of a composite text database. 

For details of text databases and for the operational details of Lexa Text in general, please consult the Vol.2 of the Lexa documentation. 

Esc About_Text_Databases_2 

In order for Lexa Text to locate the text of a record instantaneously it is necessary to index each text database. To achieve this you load the programme Corpus Manager and select your text database as the current one. Then you re-index it. Once this is completed you can exit Corpus Manager. 

The index file generated by Corpus Manager has the same name as the database but the extension ".IND". Should you later modify the database do not forget to re-index it as otherwise the information contained in the index is no longer up-to-date and importing records from the text database will be inaccurate. 

Now load Lexa Text and choose the newly indexed text database via Ctrl-F9. Once you do this you are offered a list of the records of the text database in a pop-up window. Note that immediately after the beginning marker of the record its name is written. It is this which is used when Lexa Text builds the picklist offered in the pop-up window (generally available via Shift-F9). 

The rest of this text database contains a number of programming functions which are just included to give users an idea of how one can easily import information from a text database into the text one is currently processing. 

The above illustrates two "records" in a text database file. A text record is created by entering ASCII $176 followed by a name (up to 24 characters in length without any intervening blanks). Then comes the text which is to form the contents of the record. The end is marked by entering ASCII $176 + ASCII $27 [. You repeat the procedure for as many records as you wish to have in your text database. 
	Before you can have access to the text records in a database file you must index the text file. It is this index which Lexa Text uses (i) to display the names of the functions in the picklist window and (ii) to locate the chosen record in the text file. For the details of indexing, see remarks on Corpus Manager in Vol.2 of the present documentation. 
	Once you have chosen a function by pressing Return or F10 the stretch of text which it comprises is inserted into the current text at the present cursor position. 
	You can view the first page of a text record by pressing F5 or Space, a renewed press of Space returns you to the text record window. 
	Needless to say, this facility in Lexa Text can be used for any purpose: You could store text building blocks which you frequently need when creating new texts. It is up to your imagination to make the most of this facility. 

Ctrl-F9  Text Database It is possible to change the text database file during text processing via this key combination. There is no limit on the number of database files which you may store in any directory. 

Note A text database file in Lexa Text must have the extension .tdb. For this reason only those files in the current directory with this extension are listed when you activate the present command. 

1.4.4.	Using word lists

The fourth type of text macro option available in Lexa Text involves word lists. The idea behind this is quite simple. Take the case where a user is writing a text on different terms and needs to have the names of these in a list from which he/she can draw at will. Create a list of the terms you are using (such a list is provided for with ltext.wds which is a small of different languages). Then activate the word list function with Ctrl-G. 

To begin with you must choose a file which is the disk source for the word list about to be used. Lexa Text now reads the file and deposits the contents in an internal array which is displayed in a window on the right of the screen just as with the other macro facilities. You may now move a highlight bar up and down and choose a word from the list. To locate an item swiftly, type the first letter or two and the highlight bar jumps to the next match in the list. Pressing Returnimports the current word into the current text at the present cursor position. A new word list can be loaded at any point with the F5 key. 

Note Lexa Text expects any word list files to carry the extension .wds (= words) and to be located in the current Auxiliary File Directory. Check on this via F9 if you are uncertain of its present value. A word list file can be specified in an initialization file (see below). 

1.5.	Importing data from an external database

It is possible to import the contents of a record from an external, dBASEcompatible database into a Lexa Text text at any time during editing. The idea behind this is to allow users access to data which is contained in a database without the necessity of unloading Lexa Text and starting a database manager specially for this task. A database can be called as often as you like from within Lexa Text. You can use different databases and different report forms during the same work session if you wish. 

Alt-F1  Choose database This key combination allows you to determine the name of the database which will be loaded by Lexa Text. You do this by selecting a database from the file manager in just the same manner as you would choose a text to edit. 

Alt-F2  Choose external report form Here the procedure is the same as for selecting a database except that you now choose a report form. 
	Note that a report form is not essential, though advisable. Be careful that the report form you select matches the database you wish to use. 
	For more information on report forms, please consult the detailed treatment in Vol.2 of the present documentation of the report form generator Report Db, repdb.exe. Indeed you must use this programme to create a report form in the first place. 

Alt-F5  Show database and report form settings For your information you can check on the current settings for both the database and the report form which is to be passed to _db_mod.exe by pressing Alt-F5. If either is missing a series of dashes is displayed instead of a filename in the window which opens. 

1.5.1.	Using the database viewer

The commands of the database module are to be seen on the bottom line of the screen. In addition one can open a window with further commands by pressing F1 for help. These commands are commented on briefly below. 
	It is assumed that users are acquainted with the basics of database management. Indeed this must be the case as to use the database viewer one must have databases in the dBASE format at one’s disposal which means that one will probably have created them at some earlier point in time. To refresh one’s knowledge of database management it is recommended that you consult the section on the database manager DbTxt in Vol.2 of the present documentation where a detailed discussion of this area of data processing is to be found. 

1.5.2.	Navigation in database

Page Up  Scroll backwards   Moves backwards one record in database file. 

Page Down  Scroll forwards   Moves forwards one record in database file. 

Ctrl-PageUp  Beginning of database   Jumps to beginning of database file. 

Ctrl-PageDown  End of database   Jumps to end of database file. 

Ctrl-G  Goto record Leads to a prompt for a record number to which the programme then jumps and the contents of which are displayed. If the value is beyond the range of the database, the last record is displayed. 

F5  Browse view database The browse mode in database editing is one in which a single record occupies one line (as opposed to the full-screen mode in which one record fills a single screen). It has the advantage that it allows the user to survey a series of records at once by showing you the first 24 characters of the first 3 fields of the current database on the editing level when you press F5. A highlight bar can be moved on the screen which appears. By means of this one can navigate to a record which one would like to jump to (press Return to move the record pointer or Escape to leave it unchanged). 
	Paging on the browse screen is done in the normal manner with _, _, [Ctrl-] PgUp, [Ctrl-]PgDn. 

1.5.3.	System information

F6  Report form settings Any report form you use with the database viewer will have been created with the report form generator Report Db from the Lexa set. There is no option for either choosing or altering a report form in the database viewer. However, you can check on the parameters of the currently chosen report form by pressing F6. Bear in mind also that if you change your mind and do not wish to export records to text, then simply exit the database viewer with Alt-F12 or Alt-F1 and nothing happens. 

F9 Database statistics The window which appears on the pressing the current key offers a set of general statistics on the currently loaded database. Note that you are also shown here how many records have been marked for export to text. 

1.5.4.	Locating field contents

Ctrl-L  Determine field for letter search Letter search is a facility included in the database viewer with which you can search for the contents of a given field. The special feature of letter search is that it begins to comb through the current database from the first letter you type, jumping to any record which may show that letter in a certain field. Just what field is to be examined for letter search is determined via the present key combination. 

Space  Start letter search Pressing the SpaceBar activates the letter search command. This is the most effective and rapid means of finding a record. The principle is as follows. You type a single letter. _db_mod.exe finds the next record in which this letter is the first letter of the key field (chosen via Ctrl-L, see description of previous command). Type a second letter. The next record with both the first and second letters as the initial two letters of the index keyfield is found and displayed. Carry on until you have found the record you want. 
	If there is more than one record with the string you have just typed, press Return to continue to the next find with these initial letters. 
	The record pointer is only re-positioned if you terminate the letter search command with Ctrl-Return. Pressing Escape leaves you at the record from which you activated the command. Activating letter search before you have chosen a field for search leads to the field picklist appearing from which you can select a key field. 

Ctrl-F  Find field contents   This is the option which you choose if you wish to comb through a specific field of the records of a database for a search string. It corresponds to the locate command in the dBASE environment. 

On pressing Ctrl-F a picklist with the fields of the current database appears on the right of the screen. You choose a field for the search operation and press Return. Then an input window opens where you enter the contents of the particular field which you wish to locate. Again terminate this by pressing Return(pressing Escape at any point leads to the entire operation being cancelled). 

Ctrl-R  Repeat search The idea here is that a search is repeated with the same values for (i) the field to be searched through and (ii) the string to be found, without the necessity of entering the string and specifying the field again. The search continues from the present record. After you specify a string and choose a field with Ctrl-F, pressing Ctrl-R repeatedly will then show you all the finds for the string in the current database. 

1.5.5.	Marking and exporting records

Alt-E  Tag record for export Simply marks the current record for export. Note that in the top righthand corner of the screen the reference Exp. appears when you mark a record (or move to a record which is already marked). The current key combination is a toggle, pressing it when a record is marked leads to the marking being removed. 

Ctrl-E  Mark all records for export After confirmation by the user, this key marks all records for export to a text file. Be careful with this command in combination with large databases as the text file subsequently generated might be too large for import into the current text in Lexa Text. 

Ctrl-Z  Clear marking for export Assuming that you have marked at least one record in the current database for export, the present key combination clears the marking. You must confirm the erasure (as you may have gone to considerable trouble to mark records). 

Alt-F3  Generate output text This is the most important command of all. It initiates a process whereby each record in the current database is examined. If it is marked then the contents of the record are deposited in the output text, according to the specifications of a report form which has been passed to the database viewer (see above). 
	Not all fields are necessarily exported, a field can be exported more than once and any amount of extraneous text can be exported alongside the contents of the fields of a record. All this depends on what the chosen report form is like. 
	The output of this command is a stretch of text which is present in the current text area at the current cursor position when you return to the text editing level. 

Note With the Lexa package there are various databases in the STATDATA directory, some with matching report forms (with the extension .REP) which serve as an illustration of the use to which one can put the external database viewer. 

1.6.		File management

1.6.0.	Introduction

When you start Lexa Text without entering a file name on the command line or without choosing automatic initialization via a file then you are presented with the internal file manager. This has two essential functions: (i) to allow you to choose a file to retrieve for editing, (ii) to put a range of file management facilities at your disposal. By means of the latter you can carry out all housekeeping operations such as copying, renaming, moving, viewing, deleting files without having to exit Lexa Text. 

F2  Activate file manager There are occasions when one might wish to obtain a file listing for some other purpose other than retrieving a file. By using the present key you may activate the internal file manager of Lexa Text without either choosing a new file or unloading the file in the current text area. You return to the text you were editing by pressing Escape. 

When the file manager is activated a directory window opens to the left of the input line and the first 16 files of the current directory are shown with a highlight bar located on the first. Furthermore the total number of files in the chosen directory which match the file template (both still to be seen on the input line to the right) and their total size are displayed on the bottom border of the directory window box. In addition two lines appear below the input line to show how many files are selected (e.g. for copying) and what their total size is. Initially these lines naturally contain no information. 
	To mark files in the directory listing window, press Return. This key is a toggle so that pressing Return on a marked file leads to it being unmarked again. You can globally tag files with F3 and globally untag them with Shift-F3, see below. Files can be repeatedly marked and unmarked by using the Shift-Down Arrow and Shift-Up Arrow keys. The number and size of files change according to how many you select or de-select. The set of commands at your disposal in a directory listing are discussed below. 
	If you have called the file manager via F2 from within a text file then the only keystroke which will lead you back to your file is Esc. In all other cases you can either select the presently highlighted file with Return, F5 (usually for retrieval, but also to choose a macro file, for example) or abandon file selection (and open an empty file) by pressing Esc. 

1.6.1.	Directory lister commands

F1  Help screen Activates the help system assuming that the necessary files can be reached, see remarks on F1 above. 

Shift-F1  DOS Command Here you are presented with an input line within a popup window and can enter anything you like. Lexa Text then tries to load your entry externally by passing it on to DOS so that for the successful execution of this command you must have entered (i) a DOS command or the name of an external startup file which is either in the current directory or accessible via the DOS path. 

Ctrl-F1  DOS Call.  With this command DOS is loaded temporarily and you can carry out any commands as if you were in DOS normally with the restriction that some of your system memory is now taken up by Lexa Text which is in the background. If you load a further programme when you enter DOS avoid making another DOS call from within this programme as this may lead to difficulties. When finished working in DOS, type exit to return to Lexa Text. The screen is restored just as you left it. 

Alt-F1  DOS Services Menu The idea here is to offer users a windowful of DOS functions which they are likely to need when involved in file management. 

On pressing Alt-F1 a window opens with a series of options. Most of these lead to a further window from which one can specify a drive. At any stage in this series of options you can hide the window and cancel any commenced operation by pressing Escape. Note that none of the options can be executed if the user chooses the presently logged in drive (by mistake presumably). 

F2  View file To take a look at a file move the highlight bar to it and press F2. This calls the utility Lexa View with the name of the currently highlighted file passed to it as a command line parameter. If LVIEW.EXE cannot be accessed then nothing happens. Note If the currently highlighted file has the extension .dbf then Lexa Text assumes that it is a database and the database manager DbLookis called with the name of the current file in the directory listing passed to it. 

Ctrl-F2  Hexedit file This command is similar to the previous one except that Lexa Hex is called instead of the file viewer. 

F3  Mark all files Tags all the files in the current directory listing. 

Shift-F3  Unmark all files Untags all the files in the current directory listing. 

F4  Log in new drive Use this option if you wish to change the current drive. A window appears in which the logical drives of the current system are listed. Choose the required drive using the arrow keys and press Return; the display is refreshed showing the contents of the current directory for the newly chosen drive. 

Shift-F4  New directory mask To have just those files displayed which correspond to a certain file template, e.g. *.TXT, you use the present option. To view all files you enter *.* as you would in DOS. 

Shift-F5  Re-read directory.  This simply forces Lexa Text to re-read the current directory. This might be useful if, for instance, you rename a file in the directory listing and would like to have it alphabetically sorted afterwards. 

F6  Delete files Here one is dealing with file deletion; this requires user confirmation and can be interrupted by pressing any key during the deletion operation. 

Shift-F6  Confirm delete In this version of the delete command the user must confirm the deletion of each file. If he/she answers ‘no’ (by pressing the n key) then the particular file is skipped and Lexa Text moves to the next. 

Ctrl-F6  Rename file With the present option you can rename a file which is contained in the present directory listing window. Lexa Text automatically activates the second input line (below the current directory and file template line) as only one file can be renamed at a time; you now enter the new name for the file the highlight bar is resting on. 

F8  Disk Tree Whenever you are in the file manager you can change the current directory via a disk tree which is activated via F8. For this Lexa Text must have access to the disk structure file adirs.fil in the root directory of the current drive (exactly the same as in Lexa File or Lexa Browse). 

Move the highlight bar to the directory you require and press Return. The screen reverts to that of the file manager but with the files of the newly chosen directory now displayed in the file box. Pressing the Escape causes Lexa Text to ignore the current operation and not change directory. To re-read the current drive, press Alt-F8. This is advisable if you suspect that the structure you are offered does not correspond to the actual structure of the disk. Such a situation arises if you create (or delete or rename) a directory with some other programme not from the Lexa set. 

Shift-F8  Pattern search When on the file management level it is possible to search for strings in the file which are displayed in the directory window. To initiate such a pattern search, press the current key combination. You are now prompted to enter a string, for which Lexa Text assumes that case is to be ignored (toggle this with F3 as you do when searching for strings on the text level). 
	The files to be searched through are those which match the currently active template. Because of this you can force Lexa Text to examine only a subset of the files of the current directory when executing the pattern match. 
	The search is carried out by calling the programme Lexa Search (see below) in the batch mode with the string just entered by the user passed to it. The programme performs the search, writes the results automatically to the file LSEARCH.$$$ which is then read by Lexa Text and the files listed in it are entered into the array for the directory listing on the left of the screen which is refreshed. 
	Needless to say, for the pattern search option to work Lexa Search must be accessible via the DOS path variable. 

Ctrl-F8  Global template The file template which may have active prior to a pattern search via Shift-F8 is suspended by Lexa Text and only the files which match the pattern are displayed in the directory listing. This is true even if you return to the text level and return to the file manager level again. By these means you can retain the list of matches on the file manager level for as long as you want. 
	In order to arrive at a global listing of all files, and thereafter possibly have a renewed selection of files which match a specified file template, you must press the current key combination. 

F9  Show Environment This command is similar to that which is available on the text editing level in each area. When involved in file management it is useful for checking on the amount of total and free space on the currently logged in disk. 

Ctrl-F9  Standard Directory Normally when you call the file manager from the text editing level the directory listing shows you the files in the current directory (i.e. in that from which you retrieved the text you are presently editing). When in the file manager you may move from directory to directory by locating the highlight bar on the name of a directory and pressing Return. After doing this you might like to keep the new directory permanently logged in. To achieve this press Ctrl-F9. A brief message is issued in the bottom line of the screen. If you leave the file manager and enter it again then you will find that the directory you specified as standard via the current key combination will still be logged in. 

Alt-F9  Auxiliary File Directory If you press this key combination then the currently logged in drive and directory are noted by Lexa Text and used in future as the so-called Auxiliary File Directory in which the various macro files and certain files used when printing (on both, see above) are expected. 

F10  Copy files To execute the copy operation, press F10. Now a further input line appears to the right and you are prompted to enter the name of the target drive and directory. You can either accept the default prompt of A:\ or enter your own value and then press Return. Lexa Text offers you considerable flexibility in copying files. You have the option at this stage not only of entering the target for the copy operation manually but of selecting a target directory and, if necessary, a new drive as follows: 
	Press F8 for a disk tree to choose target directory.
	Press F4 for a new drive (you are then automatically presented with a disk tree from which to choose the target directory on the new drive). 
	The file manager now starts copying the files to the target (assuming that there are no difficulties such as too little diskspace, a wrong path entered, etc.). Pressing Escape aborts the copy operation. When this is completed you are returned to the directory listing. The marking of the files remains so that you can repeat the operation, or delete the files or whatever: simply press the relevant function key or key combination. 

Shift-F10  Copy with confirmation This command is identical to the previous one with the additional feature that you must confirm overwriting any file which is marked for copying in the source drive/directory and which already exists in the target drive/directory. 

Ctrl-F10  Copy and unmark This is the third variant of the copy command. In this instance the marking in the directory listing is removed if a file is successfully copied to target. The advantage of this with diskettes is obvious: you can mark as many files as you wish, when the target diskette is full, LexaText stops copying and you can place an empty diskette in the relevant drive and continue copying the remainder of the marked files from the directory listing. 

Alt-F10  Duplicate file This option simply make a duplicate of the currently highlighted file after the user has specified a name. You may enter a full path, i.e. a drive and a directory before the file name if you wish. 

Enter  Mark/unmark a file The Enter key has the function of marking and unmarking files (assuming that the load key toggle is not currently set to Enter). This can also be achieved by using the Shift-DownArrow or Shift-UpArrow keys to mark / unmark repeatedly. 

Esc 1) Cancel directory listing This simply cancels the entire directory listing, hides the window and allows you to continue with some other command. 2) Open new file By this means you can start a new file. The file manager is closed and you are presented with an empty screen. You may now enter text into the new file. 

Note The name of a new file is always ltext.tmp. Rename this as quickly as possible to avoid losing valuable data (save the file via F10 and specify the new name in the process). 

SpaceBar, Alt-V  View File This is functionally equivalent to pressing F2, i.e. it allows you to view the contents (but not alter them) of the presently highlighted file. The difference is that with SpaceBar, Alt-V the internal file viewer of Lexa Text is activated. This is quicker than loading the external Lexa View. You may however want the latter on occasions as with it you can search for and count strings or you may wish to view WordPerfect or Microsoft Word files in a more readable manner (without formatting information). In these cases call Lexa View via F2. 

Tab  Toggle Load Key This simply changes the current value for the load key from F5 to Return and back again. The setting is echoed in the retrieve box on the mid right of the screen. 

	Legal keystrokes when file viewing

	DownArrow		Move down in text a line at a time
	UpArrow		Move up in text a line at a time
	PageDown		Move down in text a screenful at a time
	PageUp		Move up in text a screenful at a time
	Ctrl-PgUp		Beginning of text
	Ctrl-PgDn		End of text
	Escape		Exit file viewing

Letter Search  By means of this feature you can locate a file quickly in a directory listing if you type the first letters of the file name. 

Navigation in Directory Listing  UpArrow, DownArrow; PageUp, PageDown move the highlight bar vertically in the window display; Ctrl-Page Up, Ctrl-PageDown move it to the beginning or end of the window display. 

Shift-UpArrow, Shift-DownArrow  Repeatedly mark / unmark files. 

Ctrl-Return  Executes the programme the highlight bar is resting on. Assumes that the programme has the extension .com, .exe or .bat. 

Notes. The file manager is suspended during the execution of many options. In each case an automatic return is made. Where a DOS command is executed you can abort this by pressing Ctrl-C and return to working within Lexa Text. 
	When you are in a directory window you will notice that at the end of the listing subdirectory names appear; if you are already in a subdirectory then there will be an entry Parent Directory. Pressing the Return key when the highlight bar is resting on a directory name causes Lexa Text to leave the current directory and read all the files from this other directory and display them. By these means you can move around your hard disk effortlessly. If you are in a subdirectory, press the highlight bar when it is resting on Parent Directory. Assuming you are one level down from the root directory, this will not be displayed. Go to the end of the listing with Ctrl-PageDown and you will find all the subdirectories on the first level listed. Move the highlight bar to one you wish to view and press Return. Observe also that the full path name of the directory currently displayed in the listing window is echoed in the input line on the right of the screen (i.e. the path name of the source directory for the current set of operations). 

1.7.	Initialization files

As indicated in the call syntax for Lexa Text above, it is possible to use an initialization file in which a large number of parameters can receive values which otherwise would have to be entered manually. There are a largel number of specifiable parameters (over 120 in all); you need not specify values for each of these if you do not want to: any line in the initialization file which is left empty will lead to the default value being assumed for the variable in question. 
	The initialization file is an ASCII text file and can be edited with Lexa Textitself. The best way to start using such a file is to take the supplied ltext.ini and alter this to suit your own needs. Remember that if you start Lexa Text with just the initialization switch, /i, then it looks through the directories in the DOS path variable for the file ltext.ini. To use another initialization file, edit the supplied one and save it under a different name and then enter this name after the /i switch with a dash before it. Assuming you have a file called my_own.ini you could use it by calling Lexa Text as follows: 

		ltext /i-my_own

It is not necessary to enter the extension .ini as this is supplied automatically by Lexa Text. 
	When editing your own initialization file a few points must be borne in mind to ensure that this is processed correctly by Lexa Text. 

1) Any line whose first character is a semi-colon (;) is regarded as a comment and skipped. 

2) There is a definite order of occurrence (to be gleaned from ltext.ini) for the values in the initialization file which are to be assigned to certain parameters. 

3) Any file name may be preceded by a path specifier as in the following example for the lines file: 

	D:\SOURCE\C_FILES\SPECIAL.LIN

However, only enter the bare name of a file if you have also specified an Auxiliary File Directory (Item 3 below). A file name can be up to 64 characters, a numerical value 4 digits, in length. 

Sample initialisation file

; This is the initialization file for Lexa Text. It is a normal ASCII text 
; file which you can edit with Lexa Text itself or any other text editor.
; Note that the programme only reads information from those
; lines which do NOT begin with a semi-colon.
;
; If you change any parameters then be very careful to keep
; to the pre-determined format as outlined in the comments below.
;
; Any file name may be preceded by a path specifier as in:
; D:\SOURCE\C_FILES\SPECIAL.LIN for the lines file. However, only enter
; the bare name of a file if you have also specified a File Directory
; (Item 3 below). A file name can be up to 40 characters, a numerical 
; value 4 digits, in length.
;
;----------------------------------------------------------------------------;
; Item 1: Name of Standard Directory to be used

;
;----------------------------------------------------------------------------;
; Item 2: File template to be use for directory listing initially:
*.*
;
;----------------------------------------------------------------------------;
; Item 3: Name of File Directory where the following auxiliary files are 

;
;----------------------------------------------------------------------------;
; Item 4: Name of file to be loaded into Text Area 1

;
;----------------------------------------------------------------------------;
; Item 5: Name of file to be loaded into Text Area 2

;
;----------------------------------------------------------------------------;
; Item 6: Name of file to be loaded into Text Area 3

;
;----------------------------------------------------------------------------;
; Item 7: Name of file to be loaded into Text Area 4

;
;----------------------------------------------------------------------------;
; Item 8: Name of file to be loaded into Text Area 5

;
;----------------------------------------------------------------------------;
; Item 9: Name of file to be loaded into Text Area 6

;
;----------------------------------------------------------------------------;
; Item 10: Name of file to be loaded into Text Area 7

;
;----------------------------------------------------------------------------;
; Item 11: Name of file to be loaded into Text Area 8

;
;----------------------------------------------------------------------------;
; Item 12: Name of Text Database to be consulted via Shift-F9:
LTEXT.TDB
;
;----------------------------------------------------------------------------;
; Item 13: Name of Lines File to be consulted via Shift-F3:
LTEXT.LIN
;
;----------------------------------------------------------------------------;
; Item 14: Name of Macro File to be read to supply settings for Alt+Letter:
LTEXT.ALT
;
;----------------------------------------------------------------------------;
; Item 15: Name of Word List File to be consulted via Ctrl-G:
LTEXT.WDS
;
;----------------------------------------------------------------------------;
; Item 16: Line to begin display at (goto line # function)

;
;----------------------------------------------------------------------------;
; Item 17: Number of spaces per tab
4
;
;----------------------------------------------------------------------------;
; Item 18: Resolve tabs to spaces when storing file to disk?
0
;
;----------------------------------------------------------------------------;
; Item 19: Show formatting automatically (tabs and line ends)
0
;
;----------------------------------------------------------------------------;
; Item 20: Which port to be used.
0
;
;----------------------------------------------------------------------------;
; Item 21: Which printer to be used.
0
;
;----------------------------------------------------------------------------;
; Item 22: Name of printer command file
12_ROMAN.PCF
;
;----------------------------------------------------------------------------;
; Item 23: Which font is to be used (depends on printer).
1
;
;----------------------------------------------------------------------------;
; Item 24: Print line numbers on left of page?
0
;
;----------------------------------------------------------------------------;
; Item 25: Print header on top of page?
0
;
;----------------------------------------------------------------------------;
; Item 26: Print header on first page?
0
;
;----------------------------------------------------------------------------;
; Item 27: Print footer on bottom of page?
0
;
;----------------------------------------------------------------------------;
; Item 28: Name of header/footer file
; Enter XXX here to use the default header (see Item 105 below)
;
XXX
;
;----------------------------------------------------------------------------;
; Item 29: Use two different headers?
no
;----------------------------------------------------------------------------;
; Item 30: Length of printed text page in lines
9999
;----------------------------------------------------------------------------;
; Item 31: Number of printed lines per inch on page
; Note that a value of 45 means 4.5 and of 55 means 5.5
5
;----------------------------------------------------------------------------;
; Item 32: Block justify text on printing?
1
;----------------------------------------------------------------------------;
; Item 33: Width of printed line (chars. or tenths of an inch, used if
;          word wrap in ON and BASE FONT is proportional)
53
;
;----------------------------------------------------------------------------;
; Item 34: Size of top margin in lines (actual size depends on spacing)
8
;
;----------------------------------------------------------------------------;
; Item 35: Width of left margin
; # = no. of columns
;
11
;
;----------------------------------------------------------------------------;
; Item 36: String for selecting download font in printer:
;
; (N.B. String must be entered as ASCII numbers, each separated a single blank,
;  Maximum number of encoded bytes: 24!)
;
; 27 38 01
;

;
;----------------------------------------------------------------------------;
; Item 37: String for de-selecting download font in printer:
;
; (N.B. String must be entered as ASCII numbers, each separated a single blank,
;  Maximum number of encoded bytes: 24!)
;
; 27 38 00
;

;
;----------------------------------------------------------------------------;
; Item 38: Initial string to be sent to printer before print job
;
; (N.B. String must be entered as ASCII numbers, each separated a single blank,
;  Maximum number of encoded bytes: 24!)
;
;
05 49
;
;----------------------------------------------------------------------------;
; Item 39: Initial page number (default is 1)
;
1
;
;----------------------------------------------------------------------------;
; Item 40: Redirect printer output ? (enter name of disk file!)
;
; (Leave this line empty if you do not want such redirection):
;

;
;----------------------------------------------------------------------------;
; Item 41: Required national date format
;
; Key:
;     0  =  American   (MM/DD/YYY)
;     1  =  British    (DD/MM/YYY)
;     2  =  German     (DD.MM.YYY)
;     3  =  AlphaMonth (1 January 1995)
;
3
;
;----------------------------------------------------------------------------;
; Item 42: Word wrap text lines
;
1
;
;----------------------------------------------------------------------------;
; Item 43: Autoindent new lines
;
0
;
;----------------------------------------------------------------------------;
; Item 44: Split screen (View two texts simultaneously)
;
;	0 = Full screen (no split)
;	1 = Horizontal split
;	2 = Vertical
0
;
;----------------------------------------------------------------------------;
; Item 45: Name of external database
;

;
;----------------------------------------------------------------------------;
; Item 46: Name of report form file to use with above database
;

;
;----------------------------------------------------------------------------;
; Item 47: Use <Return> as file load key (instead of <F5>)
; 1 = Yes; 0 = No
;
1
;
;----------------------------------------------------------------------------;
; Item 48: Use Black on Grey for text display (instead of Grey on Blue)
; 1 = Yes; 0 = No
;
1
;
;----------------------------------------------------------------------------;
; Item 49: The interval in minutes at which loaded texts are to be saved (a
; text is only saved if it has been altered; the files are deposited in the
; Lexa Text home directory)
;

;
;----------------------------------------------------------------------------;
; Item 50: Number of files to automatically save. The legal values here are
; 1 - 20 (total number of files). If you specify 1 then only the text in area
; 1 is automatically saved. If you specify 2 then the first two are saved and
; so on.
;
1
;
;----------------------------------------------------------------------------;
; Item 51: Erase backup file(s) on exiting Lexa Text?
;
yes
;
;----------------------------------------------------------------------------;
; Item 52: No. for user font activation. This parameter has to do with VGA
; adapters which differ in certain respects. There are some which require
; 8 for the activation of a user font in an internal register and some which
; demand the figure 32. Try these two out. I'm afraid that if neither of these
; works, there is not much you can do. There may be the odd VGA adapter which
; is not 100% compatible with the industry standard and which does not support
; user defined fonts.
;
32
;
;----------------------------------------------------------------------------;
; Item 53: Name of font file with User Character Set
LTXT_CHR.VGA
;
;----------------------------------------------------------------------------;
; Item 54: For VGA 50-line 80 column display mode, type `1'
;          For VGA 30-line 80 column display mode, type `2' (for some laptops)
;          For VGA 30-line 90 column display mode, type `3'
;          For default 25 lines by 80 columns, type `0'
3
;
;----------------------------------------------------------------------------;
; Item 55: File to be imported directly on pressing Ctrl-Tab
;
MY_TEXT.IMP
;
;----------------------------------------------------------------------------;
; Item 56: Call batch file on loading? (leave empty for none)
;
;GER_KEYB.BAT

;
;----------------------------------------------------------------------------;
; Item 57: Name of text file to be loaded into WORD clipboard
;
MY_TEXT.WCL
;
;----------------------------------------------------------------------------;
; Item 58: Name of text file to be loaded into LINE clipboard
;
MY_TEXT.LCL
;
;----------------------------------------------------------------------------;
; Item 59: Name of programme to be loaded on pressing Alt-GreyMinus
;      60: Is this a Lexa Group file?
;
DBTXT /I
yes
;
;----------------------------------------------------------------------------;
; Item 61: Name of programme to be loaded on pressing Alt-GreyPlus
;      62: Is this a Lexa Group file?
;
LF /I
yes
;
;----------------------------------------------------------------------------;
; Item 63: Name of sorting and search file (.CEF file)
;
;HELSINKI.CEF

;
;----------------------------------------------------------------------------;
; Item 64: Use monochrome display irrespective of video hardware?
;
no
;
;----------------------------------------------------------------------------;
; Item 65: Use single codes for formatting attributes? (saying 'no' will
; cause Lexa Text to use double codes; for user markup codes, specify a
; User Markup Codes file as the last item below).
;
yes
;
;----------------------------------------------------------------------------;
; Item 66: Name of user font chart (activated with Alt-Space)
;
LTXT_CHR.CHT
;
;----------------------------------------------------------------------------;
; Item 67: Use screen saver when computer is idling?
;
; Note: A value of 0 means 'no'; a number represents the time interval after
; which the screen saver is to be activated
; This screen saver is a large-dimensional clock with current date
;
10
;
;----------------------------------------------------------------------------;
; Item 68: Name of programme used as screen saver
; Note: Entering _INT_SS will cause the internal screen saver to be used
; (no disk access required then, saves battery on a laptop)
;
_INT_SS
;
;----------------------------------------------------------------------------;
; Item 69: Number of Base Font when printing with proportional fonts
;
1
;
;----------------------------------------------------------------------------;
; Item 70: Number of Line Draw Font when printing with proportional fonts
;
8
;
;----------------------------------------------------------------------------;
; Item 71: Name of file with spacing info for proportional printing
;
12_TBLS.LST
;
;----------------------------------------------------------------------------;
; Item 72: Initialize printer with default values at beginning of job?
;
no
;
;----------------------------------------------------------------------------;
; Item 73: Adopt VGA colours from INI-file on loading?
;
yes
;
;----------------------------------------------------------------------------;
; Item 74: Display clock in upper left corner? (default = yes)
;
;yes

;
;----------------------------------------------------------------------------;
; Item 75: Name of User Markup Codes File?
;
; Note. This option requires the presence of a file, a Lexa Text Markup File,
; in which the codes are specified which are to be used instead of the inbuilt
; codes of Lexa Text (see sample file). If you leave this line empty, it is
; assumed that you wish to use the default codes.
;
;RTF.MRK

;
;----------------------------------------------------------------------------;
; Item 76: Automatically load standard font for normal display?
;
yes
;
;----------------------------------------------------------------------------;
; Item 77: Name of standard font for 25-line display
;
SANSERIF.VGA
;
;----------------------------------------------------------------------------;
; Item 78: Name of standard font for 50-line display
;
SANS_8X8.VGA
;
;----------------------------------------------------------------------------;
; Item 79: Show file bar on bottom of screen constantly?
;
yes
;
;----------------------------------------------------------------------------;
; Item 80: Show less information on text screen?
;
no
;
;----------------------------------------------------------------------------;
; Item 81: Use Shift + Vertical Arrows to mark text (rather than lines)
;
yes
;
;----------------------------------------------------------------------------;
; Item 82: Name of batch file to load fonts to printer before printing text
;
_ROMAN
;
;----------------------------------------------------------------------------;
; Item 83: Show line numbering on left of screen?
;
no
;
;----------------------------------------------------------------------------;
; Item 84: Name of address database shown on pressing Shift-Back
;
F:\DBS\ADDRESS\MY_ADDRS.DBF
;
;----------------------------------------------------------------------------;
; Item 85: Use large cursor form (change interactively with Alt-[)
;
yes
;
;----------------------------------------------------------------------------;
; Item 86: Name of table with conversions for RTF format
;
MAKE_RTF.TBL
;
;----------------------------------------------------------------------------;
; Item 87: Name of table with conversions for RTF format
;
MAKE_HTM.TBL
;
;----------------------------------------------------------------------------;
; Item 87: Date format for directory listing 
; (can be different from that for date insertion)
;
2
;
;----------------------------------------------------------------------------;
; Item 88: Show words buffer instead of tab ruler on top of screen?
;
;yes

;
;----------------------------------------------------------------------------;
; Item 89: Name of second user font file
;
EXT_FONT.VGA
;
;----------------------------------------------------------------------------;
; Item 90: Name of second user font chart (activated with Alt-Tilde)
;
EXT_FONT.CHT
;
;----------------------------------------------------------------------------;
; Item 91: Use ASCII symbol as mouse cursor, enter number of symbol
;   	   0 = just reverse colour block
27
;
;----------------------------------------------------------------------------;
; Item 92: Use inverse colour for mouse cursor?
;
no
;
;----------------------------------------------------------------------------;
; Item 93: Use bright display background (useful on laptops)?
;
no
;
;----------------------------------------------------------------------------;
; Item 94: Name of programme to act as dictionary viewer
; (leave empty for default: DV.EXE)
;
DV
;
;----------------------------------------------------------------------------;
; Item 95: Name of dictionary file to use with dictionary viewer DV.EXE
;
LINGUA.DIC
;
;----------------------------------------------------------------------------;
; Item 96: Name of batch file list displayed on pressing <Alt-Tab>
;
LEXA.BFG
;
;----------------------------------------------------------------------------;
; Item 97: Character which signals a comment line for any loadable file 
;          (such as this initialisation file) and a line which will NOT
;          be searched through in any retrieval operation. This character
;          must be the first one in a comment line. Note that you must enter
;          a backslash first and then the character itself. The character
;          can be specified interactively by pressing Ctrl-F, then F8, F4.
;          The default comment character is always a semi-colon.
;
\;		ASCII 59	i.e. semi-colon
;
;----------------------------------------------------------------------------;
; Item 98: Name of repository file for automatic storage of a text block
;          Do not enter directory or drive here but with next parameter
;
LEXA.HLD
;
;----------------------------------------------------------------------------;
; Item 99: Name of directory where repository file is stored
;
C:\
;
;----------------------------------------------------------------------------;
; Item 100: Display full information on Table of Contents caption?
;
no
;
;----------------------------------------------------------------------------;
; Item 101: Use CAPITALS for display of level 1 in Table of Contents
;
yes
;
;----------------------------------------------------------------------------;
; Item 102: Show how many levels in Table of Contents (legal values: 1-5)
;
4
;
;----------------------------------------------------------------------------;
; Item 103: Use colour display for how many levels? (legal values: 1-5)
;
4
;
;----------------------------------------------------------------------------;
; Item 104: Sound a short click with each keystroke?
;
no
;
;----------------------------------------------------------------------------;
; Item 105: Display file column on right edge of screen?
;
yes
;
;----------------------------------------------------------------------------;
; Item 106: Use Ramdrive as repository for screen fonts and charts?
;           If you enter a letter here, it is taken as that of the Ramdrive
;           and Lexa Text will look for Items 53, 64, 75, 76, 87, 88 
;           in the root directory of this drive.
;

;
;----------------------------------------------------------------------------;
; Item 107: Name of standard header to be used is none other is specified
;           This file is expected in the Auxiliary File Directory
;
DEFAULT.HDR
;
;----------------------------------------------------------------------------;
; Item 108: Stuff a keystroke (Escape) into keyboard? This should stop a 
;           laptop from turning itself off if the time-out mechanism of
;           your machine is determined by the keyboard buffer of DOS.
;           Unfortunately this may not work for all laptop computers.
;
no
;
;----------------------------------------------------------------------------;
; Item 109: How often (in mins.) is a keyboard stuff necessary? Values
;           between 1 and 30 are legal.
;
0
;
;----------------------------------------------------------------------------;
; Item 110: Name of file with correct spellings of various key words
;           (consulted on pressing Ctrl-Alt-R).
;
LINGUA.SPL
;
;----------------------------------------------------------------------------;
; Item 111: Print orientation
;
;	0 = Portrait mode (default setting)
;	1 = 2 columns per portrait page (newspaper style)
;	2 = Print sideways (landscape mode)
;	3 = Print half text on left, half on right (landscape mode)
;	4 = Switch left to right and right to left on alternate sheets
0
;
;----------------------------------------------------------------------------;
; Item 112: Print divider between two columns
;
yes
;
;----------------------------------------------------------------------------;
; Item 113: Print two pages per sheet (only in conjuction with landscape) 
;
no
;
;----------------------------------------------------------------------------;
; Item 114: Binding offset on right page with double-page sheet?
;
no
;
;----------------------------------------------------------------------------;
; Item 115: Use graphics mode, if so what width of screen?
;
;	0 = Non-graphics mode
;	1 = 90 columns per line
;	2 = 106 columns per line
0
;
;----------------------------------------------------------------------------;
; Item 116: Use `screen frame'-type display?
;
no
;
;----------------------------------------------------------------------------;
; Item 117: Show information on file when saving?
;
yes
;
;----------------------------------------------------------------------------;
; Item 118: Use a number of spaces for a tab character?
;
no
;
;----------------------------------------------------------------------------;
; Item 119: Confirm the deletion of a marked block?
;
yes
;
;----------------------------------------------------------------------------;
; Item 120: Allow Windows-style keystrokes (only applies to keypresses, NOT
; to menu selections)
;
;   Windows    Kwik Text            Function
;
;   Ctrl-S  =  Ctrl-F12          =  Save text
;
;   Ctrl-A  =  F4, Ctrl-PgDn     =  Select entire text
;
;   Ctrl-C  =  Return, F4        =  Copy text TO buffer
;   Ctrl-X  =  Bkspace, Ctrl-F4  =  Move text TO buffer
;   Ctrl-V  =  Alt-F12, Ctrl-X   =  Copy text FROM buffer
;
;   Ctrl-Z  =  F6                =  Retrieve deleted text
;
;   Ctrl-G  =  Ctrl-Home         =  Goto line
;
;   Note that Ctrl-F is always activates the command for `Find string'
;
yes
;
;----------------------------------------------------------------------------;
; Item 121: Name for data entry database
; (This is assumed to be in the programme directory if no path if given)
;
STANDARD.DBF
;
;----------------------------------------------------------------------------;
; Item 122: Use X-Card display when browse viewing records?
;
yes
;
;----------------------------------------------------------------------------;
; Item 121: Show Win-Menu constantly?
;
no
;
;----------------------------------------------------------------------------;
; Item 122: Name of file with information on RTF font conversion
;
RTF_FONT.CFG
;
;----------------------------------------------------------------------------;
; Item 123: Do you want to block the filtering of specific Kwik codes?
;
;	0 = Filter all Kwik codes 
;		(default state, all formatting will be shown)
;	1 = Only filter below no.32 
;		(partial filter, allows all font and word attributes)
;	2 = Do not filter any codes 
;		(no specific Kwik attributes can be shown)
;
0
;
;----------------------------------------------------------------------------;
; P.S. Remember that the default name for the initialization file is
; LTEXT.INI. If you edit the present file and save it under a different
; name then you must specify this name on the command line when starting
; Lexa Text with initialization as in:
;
;          ltext /i-special.ini
;
; This loads Lexa Text and initializes it with the values contained in the
; file "special.ini".
;
; Do not worry if you forget to enter the extension ".ini"; Lexa Text will
; supply it if it is not present.
;
; P.S. If you want to speed up the initialization procedure in Lexa Text,
; then remove all the comments (or at least reduce them) in the current file. 
; This will save Lexa Text from reading these lines and then discarding them 
; as they only represent comment.
;
; End of File
;^Z

2.	Lexa Bat

Syntax:  lbat 

2.0.	Introduction

The aim of the present programme is to offer users a comfortable desktop from which to choose, edit and then execute DOS batch files. The programme consists of a directory lister from which one chooses a batch file (in the usual manner for a file listing), deciding by keystroke whether to (i) edit the file or (ii) execute it. 

2.1.	Summary of commands

F1  Offers a window of online help. 

F7  Exits Lexa Bat to DOS. 

F4  Allows you to log in a new drive from a list of the logical drives on your computer system. 

Shift-F4  Permits the specification of a file template for the directory listing. Note that if you set this to *.* (the default is *.bat) then you can access any file and edit it if you so wish. 

Return  Edit the currently highlighted file. Remember that editing is done entirely in memory so that the file must be large enough to fit, i.e. under 400K in size. This is of course of no relevance to batch files. 

Control-Return  Execute the currently highlighted file. Before execution you are given the opportunity of entering any DOS command line parameters for the batch file. If none are required, just press Return immediately. An automatic return to Lexa Bat is made once the batch file has been carried out. 

Escape  Start a new file (i.e. not one chosen from the directory listing). When on the text editing level you can save this new file (which has the default name noname.tmp) to disk under a name of your choice. 

The text editing commands at your disposal in Lexa Bat are a subset of those available in Lexa Text (see discussion above); notably block processing, undo deletion and macro facilities are not offered in the current programme. 

3.	Lexa Form

Syntax:  lform (form_file_name) 

3.0.	Introduction

A form editor is a kind of data entry template. It provides you with a page layout in which you may position text (captions, headings) and furthermore mark the points on the page where the user can later enter text of his/her own. Such a programme can be seen as a tool for designing templates like those you have with mail order forms, registration forms of various types, etc. 
	By availing of the potential of computers form editing becomes more flexible than one might imagine from such day-to-day examples just quoted. Here are a few of the extras involved in form editing with Lexa Form: you can have forms which extend over several pages if you like, you can include headers and footers on forms. A database interface is supplied for importing information from database fields into the fields of a form. Extraneous text can be inserted on a form and you can even specify that an entirely different file is to be printed at a certain point on a form. And of course one should not forget the chief advantage of a form editor in the first place: you can create a form once and use it as many times as you like, customizing it by filling it in with data of your own. 
	The most important part of the present form editor is the initialization file (the .frm file which you load from disk (see below). This contains all the information necessary for Lexa Form to display the form correctly on screen and to allow the user to enter data at specified points. To help users to become acquainted with the present form editor a few files have been supplied on the Lexa distribution diskettes, including the initialization file master.frm which is discussed below. 

3.1.	The structure of a form initialization file

A form initialization file is a pure ASCII text, i.e. it contains no formatting information specific to a word processor. It can be edited with Lexa Text (or any other text editor for that matter). 
	Any line in a form file which begins with a semi-colon is interpreted as a comment by Lexa Form and skipped. Be careful not to have any empty lines in a form file (unless explicitly advised to do so) as this leads to confusion. Any given line is either (i) a comment or (ii) an item of information for the current form. 

3.1.1.	Items in a form

A form to be edited is divided into items. An item consists of (i) a title and (ii) a field. It is not obligatory to have both a title and a field together. If you wish to have just a title, declare the field length to be 0 and vice versa to suppress a title. Nine pieces of information are necessary for each item, these are: 

		(1)	Title length
		(2) 	Title name
		(3) 	Title start row
		(4) 	Title start column
		(5) 	Field length
		(6) 	Field window width
		(7) 	Field contents
		(8) 	Field start row
		(9) 	Field start column

The items for a form should be arranged in an ascending order from left to right and from top to bottom. The order in which items appear in an initialization file is that in which they are displayed on screen. 
	In order for a form to be printed successfully, each field must have a row coordinate which is greater than the previous one. Equally column coordinates must be in ascending numerical order. The reason for this is that one cannot assume that printers can move backwards during the printing process. If a field row coordinate is smaller than its predecessor then Lexa Form takes the latter value and adds 1 to it (i.e. prints the current field on the next line). Columns with smaller values than a previous one are simply incremented by 1 in a similar fashion. 
	Remember that the row and column positions which you specify for a given field refer to the page coordinates. You may scroll horizontally in any form which is longer than a single screen. Fields do not have to be on consecutive lines. A title does not have to be on the same line as the field to which it belongs (it may be above or below it). 
	You may scroll horizontally in any field input line by specifying a FieldWindow Width which is smaller than the Field Length. 
	The field of any item can be edited with the commands of the User InputEditor, see the relevant appendix below. 
	When specifying the use of a header and/or footer bear in mind that the page length (specified in the print menu or in the form initialization file) refers to the length of the printed page without headers or footers. For example if your printer can print 60 lines in a given typeface and you have a header of 3 lines and a footer of 2 then the maximum page length is 55 lines. The latter includes titles, fields (and any empty lines between them) along with the lines of a possible file printed as part of the form as a result of a title consisting of a file name in double angular brackets. 
	If a title or a field exceeds the legal maximum then it is truncated to this. Note the following limits: 

	Maximum length of title:  64 characters
	Maximum length of field:  128 characters
	Maximum length of text title:  64 characters
	Maximum length of text line:   160 characters
	Maximum number of text lines:  12
	Maximum number of fields per form: 160

Note that a form is not restricted to a single page. If the number of fields, any additional files to be printed on the form and a possible header or footer result in a length greater than one page (determined by the value for page length, see print menu) then the form will be continued on the next and so on until all the data of which the form consists has been printed. Equally there is no restriction on the size of a printed page. Normal forms will fit on A4 size paper, A3 can be used for forms with wides lines and many rows. 
	The style and/or typeface to be used for both titles and field contents depends on the command which is to be found in the Printer Command File. The latter file is identical to that used by Lexa Print so that you do not have to re-define an existing printer command file. Consult the section in Vol.3 of the present documentation on Lexa Print for details. 

Note To reduce the size of a form file you may remove all the comments as these are of no relevance to the acceptance of the file by Lexa Form (compare master.frm and no_comm.frm). This can be done by simply saving the file without comments from the form editing level when returning to the desktop. 

3.1.2.	Prototyping forms

When developing a prototype of a form you should first of all design a master form with all the comments necessary for you to recognize its structure easily (at some later stage). You can take the file master.frm as a starting point for convenience sake. During the test phase it is recommended outputting the form to disk (this saves time and paper). Once the form has reached its final shape you can remove the comments (see last paragraph) and duplicate as necessary for each new set of data. 

3.2.	Lexa Form desktop

When you start Lexa Form you land on a desktop which is similar to that in many programmes of the Lexa group. A directory lister is automatically activated from which you can choose a form file to edit. Bear in mind that only the files with the extension .frm are listed (this is the extension which is always used by Lexa Form). 

Note If you specify the name of a valid form file on the DOS command line then the desktop is skipped and you automatically enter the form editing mode. On leaving this you are returned to the desktop as if you had started without any parameters having been passed. 

3.2.1.	Commands on desktop

Return  Edit the form file the bar is currently resting on. 

F1  Display online help

F4  Log in new drive Presents you with a list of the logical drives on your system from which you can choose a new one to log in. 

F7  Exit to DOS Unloads Lexa Form and returns you to DOS (in the directory from which you started). 

Alt-F10  Duplicate form This is the command which you will need most frequently. Once you have successfully developed a form prototype (and stored it in a commentless version) then you can duplicate it for each particular set of data for which you require just this form. 

3.3.	Editing a form

Once you have chosen a form to edit the screen changes and you are presented with the contents of the file. The titles of each item are displayed in bright lettering and the fields are shown in normal lettering. By using the vertical arrow keys you can move the inverse video bar (which is positioned on the first item with field contents in the form to start with) up and down the screen. When the bottom of the screen is reached the entire screen scrolls to make more of the form visible. With Page Up and PageDown you can jump to the beginning or end of the form respectively. 

Any item which lacks a component will only appear partially. For instance the fields "Section 1" and "Section 2" in the file master.frm have no field (only a title). The next item (no. 12) has a title which is enclosed in double angular brackets in the form initialization file (and displayed as such on screen). This means that at the row and column coordinates of this item the file whose name is enclosed in brackets (master.txt) will be printed. 

Bear in mind that you may scroll horizontally when you are editing any field for which the window width is less than the field length. 

3.3.1.	Function key settings

F6  Edit text Opens a window with a text (if one is specified in the form initialization file) which can then be edited (see below). 

Alt-F7, Esc  Exit to desktop Exits the editing mode. The first thing you must do is decide on whether to save the form or not. After that you are returned to the desktop and can choose a further form to edit. 

F8  Print menu Conveys the user to the printing level (see below). 

Ctrl-F8  Insert time Puts the current system time into the field of the item where you are currently positioned. 

Ctrl-F10  Insert date Puts the current system date into the field of the item where you are currently positioned. 

3.4.	Additional text in a form

Up to 12 lines of extraneous text (each up to 160 characters long) can be included on a form (this is separate from the inclusion of the contents of a file specified in double angular brackets, see above). On pressing F6 a window opens and you can start editing the text, line by line. With Return you enter the edit mode for the current line, with Return again or Escape you either accept or reject the changes made to the line. 

With F2 you can alter the title for the stretch of text. F3 allows you to store or retrieve a line of text. This is convenient if you wish to move a text line to another position. 

3.5.	Printing facilities

The printing menu (activated via F8 from the form editing mode) is almost identical to that in DbTxt or in its options to the printing facilities in LexaPrint. All the options listed here, but two, are discussed in the section of the present documentation on Lexa Print (see Vol.3 Utility Library). 

Two items of information are unique to Lexa Form. These refer to the way in which the titles and fields of items are to be printed. You may choose a print style from a picklist which is the same as that offered in Lexa Text when selecting font attributes via Alt-F8 during text editing. To alter the current settings choose the second or third option in the main print picklist on the left of the screen. The values chosen for titles or fields apply to all the titles or fields on a form. 

4.	Lexa Browse

Syntax:  lbrowse [(drive)file_spec] 

4.0.	Introduction

The idea behind Lexa Browse is to offer users the possibility of surveying the files of an entire disk and their contents in a leisurely fashion. This is useful if you want to complete your picture of just what is on your disk or if you are looking for a particular file but cannot remember from the name what is in it. Lexa Browse shows you the first half page of each file on the right of the screen as you browse through a list of the files of a particular directory on the left. You can change directory by moving the highlight bar to an entry enclosed in either square brackets (the name of a subdirectory) or to that with the words Parent Dir. and pressing GreyPlus. Lexa Browse can be used with any storage medium including CD-ROM drives where it is useful is gaining an overview with large numbers of files. 
	The screen you are presented with when Lexa Browse is loaded should look something like the following. Note the division of the screen into areas. 

The first line contains the name of the current directory, the number of files it contains and the total size of these files. Below the directory and file windows is a line in which the number of the current file and the extended information on that file is shown (i.e. its size, date and time of lasting saving to disk). The penultimate line is a prompt which leads to a prominent feature of command structure in Lexa Browse. 
	A different drive from the present one can be logged in by pressing F4 and a file template for the directory listing can be specified via Shift-F4 (these are the standard keystrokes in the Lexa set for these functions). In addition you can specify either a drive or a template on the command line when you first call Lexa Browse as in the following examples: 

	1)	lbrowse *.txt
	2)	lbrowse d:
	3)	lbrowse c:*.doc

If you wish to specify both a drive and a file template then you must do it as in example 3 (i.e. in the same manner as with other Lexa programmes which take DOS command line parameters). 

4.1.	Function key settings

F1  On-line help.  This offers you a help text on the desktop, notably containing the function key settings active in Lexa Browse. 

F2  View file Allows you to view the file the highlight bar is resting on. Calls Lexa View. Will work with any type of file; an automatic return to Lexa Browseis made. 

Shift-F2  Edit file Allows you to edit the file the highlight bar is resting on. Calls Lexa Text. Return to Lexa Browse is automatic. 

Ctrl-F2  Hexedit file Allows you to hexedit the file the highlight bar is resting on. Calls Lexa Hex. Will work with any type of file; an automatic return to LexaBrowse is made. 

F4  Log in new drive Allows you to change the current drive by choosing a driver letter from the window of the drives on your system which now appears in the centre of the screen. 

Shift-F4  File template With this command you can filter out unwanted files and view only those which fit a user specification, e.g. *.doc. 

F5  Full-screen file viewing The window to the right of the screen when you start Lexa Browse is simply intended to give you a glimpse of the contents of the current file. By pressing F5 you can change to a full-screen mode where you can page forwards and backwards in the current file. The commands on this level are exactly the same as those for Lexa View (see description below) except that you cannot load a new file via F5. To do this, leave the full-screen file viewing mode with Escape, move the highlight bar to another file and press F5 once again. 

Note The slide bar on the right of the screen in the full-screen file viewing mode is intended to indicate your present position in the current file. The further down the bar is positioned the nearer you are to the end of the file and vice versa. 

Shift-F5  Re-read current directory.  This command simply forces Lexa Browse to re-read the present current directory and refresh display. Such a move might be desirable if you have edited one or more files in a directory (or created one, for example) and wish to have the internal display in Lexa Browse reflect the current state of the present directory. 

F7, Alt-F4  Exit Lexa Browse.  Unloads Lexa Browse returning you to DOS. 

Shift-F7  Exit Lexa Browse with directory change.  The same as the previous command but with a change to the current directory if this is different from that from which one started Lexa Browse. 

F8  Directory tree Displays the directories on the current disk in tree form and allows you to change directory easily and swiftly. 

Note At this point Lexa Browse reads the file adirs.fil (the disk structure file used by many programmes of the Lexa group). If this is not found the directories of the disk are read and the tree then displayed. You can as always force a re-read by pressing Alt-F8. 

F9  Show Environment Displays some relevant information about the environment you are working in such as the current and original path, the total and presently free disk space, the amount of system memory left, the current date and time, etc. Note the following points in this connection. There are three directories which Lexa Browse keeps track of internally. 

	1)	DOS Path
	2)	Current File Directory
	3)	Original Path

Of these the third is the simplest: it is the (drive+)directory (i.e. path) where you started Lexa Browse from and where you are returned to when you exit with F7, Alt-F4. 

The second is the (drive+)directory which is currently active in the directory listing on the left of the screen. You may have changed this via F4 to log in a new drive and/or by using GreyPlus to move to another directory. It is this directory to which Lexa Browse changes if you exit with Shift-F7. 
	The first path is the (drive+)directory which is currently active for DOS. You could, say by entering cd \new_dir on the DOS command line, change to a directory which is different from that shown in the directory window. The latter no longer refers to the current DOS directory. If you want to force it to do so, then re-read the current DOS directory via Shift-F5. 
	The main thing to be careful about here is that the current directory used for file display and the currently active DOS directory are the same or if they are not, that you are quite conscious of this. 

Shift-F9  Show File Type.  Like Lexa View (see description below), Lexa Browsecan recognize various kinds of standard software file types. Pressing the present key combination shows you which type Lexa Browse considers the current file to be. There are five types: (i) WordPerfect file, (ii) Microsoft Word file, (iii) dBASE database, (iv) ASCII text file and (v) unknown binary. Admittedly the last kind covers a multitude of sins as it the type Lexa Browse assumes if it cannot determine the current file as being one of the previous types. 

Ctrl-F9  Call Programme and File The idea behind this command is that you can call a programme of your choice with the file the highlight bar is currently resting on passed to it as a command line parameter. A practical example: say you wish to edit a file with your own text editor / word processor (and not LexaText which is provided for via Shift-F2) then choose this option. You are prompted to enter the name of the programme you wish to call and LexaBrowse loads the latter with the current file in the directory listing window passed to it. 

4.2.	General key settings

Enter  Execute DOS command line. 

Escape  Clear DOS command line. 

GreyPlus  Change window directory via the highlight bar; assumes that the bar is resting on an entry with either Parent Dir. or the name of a subdirectory enclosed in square brackets. 

Shift-Home, Shift-End  Retrieve previous DOS commands from internal queue. 

Navigation in Directory Listing  UpArrow, DownArrow; PageUp, PageDown move the highlight bar vertically in the directory window; Ctrl-Page Up, Ctrl-PageDown move it to the beginning or end. 

Shift-UpArrow, Shift-DownArrow  Repeatedly mark / unmark files in directory window. 

Ctrl-Enter  Executes the programme the highlight bar is resting on. Assumes that the programme has the extension .com, .exe or .bat. 

5.	Lexa View

Syntax:  lview [file_name] [search_string] [/i] 

To check the contents of a file it is sometimes convenient to view it without going to the trouble of loading it with a word processor, particularly if one is already within another programme and one just wishes to confirm a file’s contents briefly. 

The present programme provides such a file view function. You can start the programme with the name of the file to be viewed passed as a command line parameter as in: lview mytext.doc or simply type lview in which case you are presented with the internal directory lister in Lexa View from where you can choose a file with or without changing drive/directory beforehand. 
	You can page in the file you are viewing with UpArrow, DownArrow, PageUp, PageDown (a screenful at a time) and Ctrl-PageUp (beginning of file) Ctrl-PageDown (end of file). The size of the file and your present position are shown in the top of the screen. 

5.1.	Function key settings

F1  On-line help.  A brief help text is offered here in window form. 

Ctrl-F3  Display formatting.  In the display of text all tabs found are resolved to 8 spaces. If you have set tabs in a text to less or more than that then a text may look slightly displaced in a line with tab stops. Use the present option to display the actual tab characters (|) and the spaces used to expand them. 
	A line which is longer than a screen row is broken and the remainder is shown on the next row unless word wrap is active. 

F5  File load Activates the directory lister to allow you to choose a new file to load. Escape returns you to the file you were viewing without any change. 

Shift-F6  Search for string Any search string can be entered here (but wild cards are not allowed, for this use the Lexa Pat pattern matcher). Alternative keystroke: Ctrl-F. 

Lexa View starts combing through the text from the current offset and halts at the first find or the end of the text if there is no match for the string. When a match is found pressing any key leads to Lexa View continuing the search. Matches are displayed in inverse video. 

Ctrl-F6  Continue search  Using a string entered previously the search is continued from the current offset. Alternative keystrokes: Ctrl-N, Ctrl-R. 

Alt-F6  Count occurrences of string.  Counts the matches for a particular search string. The count starts at the current offset and continues until the end of the text. To count all occurrences in a file, press Ctrl-PageUp to jump to the beginning of the file. Alternative keystroke: Ctrl-X. 

F7  Exit Lexa View.  Returns you without confirmation to DOS. 

Shift-F9  Type of file.  There is no restriction on the type of file which can be viewed, i.e. files do not need to be ASCII files. In addition to this Lexa View can recognize certain common types of file and display them properly, e.g. those generated by WordPerfect and Microsoft Word. Note that with WordPerfect files paging may be slowed down considerably by the amount of formatting in a text (this has to be filtered out by Lexa View before the plain text is shown). 

Tab Toggle Line Wrap When you load Lexa View all lines of text which are longer than the screen is wide will be wrapped around to the following line. By pressing Tab, however, you can force the programme to display just the first 78 characters of each line thus giving an unbroken appearence to any text with lines longer than the computer screen. Note that in this mode some options are no longer available, such as searching for strings. The current mode can be seen in the top left-hand corner of the screen where the bracket stands for line wrap and a double line for no wrap. 

5.2.	Command line parameters

Lexa View can be started from the command line. Indeed this is a requirement of its use by other programmes, e.g. Lexa Search which calls Lexa View with certain parameters to display the finds for strings in files which it combs through. The parameters which can be passed to Lexa View from the command line are: 

	1)		File name
	2)		Search string
	3)		The switch /i which forces case insensitive searching

If just a file name is passed, this file is loaded assuming it can be found; otherwise the internal directory lister is activated and you can choose a file from the listing. 
	A search string, if passed to Lexa View, causes the programme to start searching for this immediately, i.e. without the user having to enter anything via Shift-F6. Nonetheless Lexa View behaves as if you had typed in a search string: you may continue the search by pressing any key or interrupt the search with Escape. 

6.	Lexa Hex

Syntax:  lhex [file_name] 

If you have a non-text file you wish to view for some reason or other, then you can do this with Lexa Hex (you can also view text files in this form, should this be desired). The file to be displayed is either specified on the command line as a parameter or chosen from the internal directory lister which is activated if you simply enter lhex from the command line. Having selected or passed a file you will be presented with a screen like the following. 

There are three columnar divisions of the screen here. The left-most column shows the file offset for the rows displayed on screen. The centre division shows the current file in hexadecimal format and the right division shows the equivalent section as unfiltered text, i.e. control codes are displayed as such. The size of the file and the present position of the file pointer are given on the penultimate line of the screen. As you can see from the last line, the PageUpand PageDown keys can be used to page in the file; Ctrl-PageUp and Ctrl-PageDown move to the beginning and end of the file respectively. 
	If at any point in a file you wish to edit it, press Return. You will notice that the first characters in both the hex and the ASCII windows are displayed in inverse. In the hex window two characters are displayed as each byte requires two hexadecimal characters for its representation. You can move the inverse display from character to character with any of the arrow keys or jump to the beginning or end of the window with PageUp and PageDown respectively. 
	Additionally you will notice that a cursor is blinking inside the inverse display of the current character in either the hex window or the ASCII window (to begin with the cursor is in the hex window). This indicates that if you wish to alter a byte then you must enter it in the form corresponding to the window in which the cursor is located. If in the hex window then you must enter the hexadecimal value of a byte you wish to change. Say for instance you wish to change the current byte in the hex window from its value of $4e to $20. To do so you must type in "1" and "4" as decimal 20 is hex 14. If you wished to change the current value to $251 then you would enter "f" and "b" (case is irrelevant for letters which are part of hex numbers) as decimal 251 is hex FB. If you wish to edit the current section of the file you are viewing in ASCII form then press the Tab key. The cursor now shifts to the corresponding position in the ASCII window. To enter $251 in this window you press the Alt key and while holding it down, type in 251 on the numerical keypad to the right of the keyboard. 
	After you have changed the current section of the file you can choose to either save the changes or reject them. Press F10 to save and Escape to abandon changes. When the window is saved a brief message to this effect is issued and you can continue paging in the file. 

6.1.	Function key settings

F1  On-line Help. 

 F5  New File.  Activates the internal directory lister to allow you to choose a new file to hexedit. 

F7  Exit Lexa Hex.  Returns you immediately to DOS. 

Ctrl-F7  Colours.  Pages through the 7 colour combinations available on EGA/VGA systems. 

F10  Save window.  Stores the current window to disk. If you have changed anything then the changes are now permanent. 

7.	Lexa Info

Syntax:  linfo 

There are a variety of situations in which one wants to obtain statistics on a text file, e.g. if one has to keep to a certain number of words in an article. The purpose of Lexa Info is to provide some useful statistics on the syntactic composition of text files. Lexa Info works from a desktop where a directory listing window is displayed. You can move in this freely. 

F1  More Online Help.  Leads to a screen change with a brief explanation of the purpose of Lexa Info. 

Shift-F1  DOS Command Allows the execution of any DOS command from the desktop. To this end an input window opens in which the user can enter the particular command. 

Ctrl-F1  Move to DOS.  Loads DOS temporarily. The screen changes and you are presented with the familiar DOS prompt, this time with a hint about the fact that you have only exited Lexa Info temporarily. 

F4  Log in New Drive.  By entering a single drive letter you can change the present drive. The directory which is currently active in the new drive is now shown in the directory listing window. 

Shift-F4  File template With this command you can filter out unwanted files and view only those which fit a user specification, e.g. *.txt. 

F5  Display File Info Causes Lexa Info to examine the file the highlight bar is resting on and either (i) show the results on screen or (ii) write them to file depending on how you specify file information output (see setting for F10). 

Lexa Info returns the size of the file and attempts to count the number of words, lines and sentences as well as three statistical calculations on each of these parameters. I would emphasize "attempts" here. The difficulty with determining words, lines and sentences is that one must use formal criteria, i.e. a word is a textual unit which is delimited by spaces on both sides. A line is a textual unit delimited by a newline character, a sentence is a unit which ends in a full stop, a question or exclamation mark followed by either a space or a newline character. You can now grasp the problems involved here. If you have an abbreviation in a text followed by a full stop (and a space) then the programme interprets this as the end of a sentence. Equally if you have a stretch of text like the following: "the numbers 1, 2, 3" then the programme counts five words as there are five spaces separated by non-space characters. Despite these obvious difficulties I hope that Lexa Info is of use in estimating values for the parameters word, line and sentence in a given text. 

Note As Lexa Info only works with ASCII text files, the first thing it does after F5 is pressed is to see whether the chosen file is of the correct type. If it is not then an error message is issued and nothing happens. 
	For a file to be recognized as an ASCII text its first line must not be longer than 256 characters and must be terminated by a carriage return and line feed. 

(Shift-)F7  End Lexa Info.  Exits from Lexa Info to DOS and, if Shift-F7 was pressed, remains in the current directory going on the directory listing window. If the drive was changed since starting Lexa Info then you remain on this drive. 

F9  Show Environment.  The usual function which you know from all the major programmes of the Lexa group. A window with some data relevant to your system is displayed and with a keypress it is hidden again. 

F10  Specify Output.  Two items of information can be specified here. (i) whether you want an output file with file information to be generated by Lexa Info and (ii) if so, the name of this file. The default name for the output file is linfo.txt which you change as you like. 

Note With the arrow keys, the PgUp and PgDn keys (in combination with the control key or not) you can move in the directory listing window. 
	Pressing a letter leads to the highlight bar jumping to the next file with that letter, up to a maximum of 8 letters (full file name, without extension). 

8.	Lexa Comp

Syntax:  lcomp 

Assuming that one has a series of text files and wishes to determine if any two are identical or in what respects they differ one can use the present programme. Note here to start with that only text files which are broken into lines terminated by a newline character (a carriage return and line feed) can serve as appropriate input for Lexa Comp. The programme works from a desktop where a directory listing window is displayed. You can move in this freely. 

F1  More Online Help.  Leads to a screen change with a brief explanation of the purpose of Lexa Comp. 

Shift-F1  DOS Command Allows the execution of any DOS command from the desktop. To this end an input window opens in which the user can enter the particular command. 

Ctrl-F1  Move to DOS.  Loads DOS temporarily. The screen changes and you are presented with the familiar DOS prompt, this time with a hint about the fact that you have only exited Lexa Comp temporarily. 

F4  Log in New Drive.  By entering a single drive letter you can change the present drive. The directory which is currently active in the new drive is now shown in the directory listing window. 

Shift-F4  File template With this command you can filter out unwanted files and view only those which fit a user specification, e.g. *.txt. 

F5  Compare Files With this key one can activate the central function of LexaComp. For this to occur you must, however, have chosen two ASCII text files. The first time you press F5, Lexa Comp notes the currently highlighted file as file one (and echoes this in the top of the screen). The second time it actually begins the comparison as there are now two files to be compared. 

Lexa Comp will report differences even if two files are similar but have different line numbering as it compares on a line by line basis and so would register displaced lines as different. The programme is best suited for comparing two versions of a single text file, say an older and a newer version of a file, to determine if they are identical and if not what the differences are. 

As Lexa Comp only works with ASCII text files, the first thing it does after F5 is pressed is to see whether the chosen file is of the correct type. If it is not then an error message is issued and nothing happens. 
	For a file to be recognized as an ASCII text its first line must not be longer than 256 characters and be terminated by a carriage return and line feed. 

F6  Clear file one It may happen that after choosing a first file you regret having done this. Normally you would have to choose another, go through the process of comparison and wait for a return to the desktop in order for the files to be cleared (visible on the top line of the screen). To avoid this chore, you can backtrack on a choice for file one by simply pressing F6. 

(Shift-)F7  End Lexa Comp.  Exits from Lexa Comp to DOS and, if Shift-F7was pressed, remains in the current directory going on the directory listing window. If the drive was changed since starting Lexa Comp then you remain on this drive. 

F9  Show Environment.  The usual function which you know from all the major programmes of the Lexa group. A window with some data relevant to your system is displayed and with a keypress it is hidden again. 

F10  Specify Output.  Here you simply specify the name of the output file to be used. Note that in contradistinction to Lexa Info, Lexa Comp always uses an output file to write differences between input files to. 

Note With the arrow keys, the PgUp and PgDn keys (in combination with the Control key or not) you can move in the directory listing window. 
	Pressing a letter leads to the highlight bar jumping to the next file with that letter, up to a maximum of 8 letters (full file name, without extension). 

Information Retrieval

1.	Lexa Pat

Syntax:  lpat [setup_file] [/b] 

1.0.	Introduction

Information retrieval is one of the major areas of data processing for practically all computer users. Indeed its importance is increasing proportionately with the increase in the amount of data which one can handle on any one computer system. For users of text corpora retrieval operations occupy a large portion of processing time and so the software with which one accomplishes such tasks is critical. 
	The main criterion when judging the effectiveness of retrieval software is the flexibility allowed when specifying searches and the accuracy of the returns made by the programme used. An additional factor which should not be underestimated, especially by those for whom data processing is not a central part of their profession, is the command structure and putative user-friendliness of retrieval software. Take the case of pattern matchers for instance. These programmes form a subgroup within the area of retrieval software and are intended to find sections of text within files going on information for a search which is specified by the user. Various pattern matchers emphasize terseness and compactness in size. Everything must be done via the command line and very little information is conveyed back to the user. In the Lexa set ease-of-use and comfort have highest priority. This applies to Lexa Pat, the main pattern matcher, as much as to any of the other programmes. The trade-off of this is that the programmes tend to be somewhat larger than many counterparts from other quarters which perform similar functions. I take it though that this does not disturb the majority of users. 
	Essential features of all the retrieval software of the Lexa set is that one can specify all parameters from a desktop and then save these to disk, using them again at a later stage, thus obviating the need of having the re-specify information which was entered previously. In addition Lexa retrieval software allows one to process the kind of file which the software operates on: Lexa Pat has an on-line text editor with which one can edit text files with the returns of a search; Lexa DbPat has an inbuilt database viewer with which one can examine databases one might wish to comb through during a search. 

To start Lexa Pat you just enter lpat and press Return. You arrive at a desktop which is similar to that used with the other major programmes of the Lexa set such as Lexa Sweep, Lexa Print, etc.  The desktop contains three menu groups available in the form of windows which the user can open, then move a highlight bar to and simply press Return to activate a particular option. The first menu group is labelled Configuration and is the most important as it is here that the user specifies what is to be searched for, through what files and with what switch values (more on these below). 
	The very first thing you must do when you are on the desktop is to specify the parameters needed for a search. These are (i) a search string and (ii) a file template for the files to be searched through. In addition you can specify an output file to be used to store the results of the search for later viewing/editing. Most important at this point is that users appreciate what switches are. When you choose the first option of the first menu you will be presented with a window in which you can set a number of switches ‘on’ or ‘off’ in order to refine the search undertaken by Lexa Pat. 

Note Instead of using a file template with DOS wild cards, Lexa Pat can take the names of those files to be examined from a so-called list file which is simply an ASCII text with the name of a separate file on each line. Lexa Pat then combs through each of the files listed for matches. The advantage of this simple alternative is that is allows you to use a set of file names which do not share some similarity in their DOS name but for instance in the Cocoa-style parameter values which they show in their header. For suggestions on what use the latter option can be put to, see the description of the utility cocoa.exe in Vol.3 of the present documentation. 
	When using a list file, you enter the name of this file name instead of a DOS file template at the appropriate option. 

1.1.	Search switches and configuration

Initially each switch is set to ‘off’. It is up to the user to alter these if he/she so wishes. When the switch window is opened you can move vertically within it with the UpArrow and DownArrow keys. To toggle the value of a particular switch use the SpaceBar. You notice this as the words ‘Yes’ and ‘No’ change at the end of the line on which the particular switch is to be found. To terminate the editing of the switches press Return. 

The switches can either be edited when you first enter the search parameters or can be accessed separately via the third option in the first menu. Controlling the operation of Lexa Pat has the additional advantage that the user can repeat a search as often as he/she wishes. Say for example you are looking for a string in a series of texts. You do not find it the first time; try editing the switches and repeating the search. It may well be that by setting some particular switch to ‘on’(or ‘off’) that you are now successful in your find. 
	If you are uncertain just what files would be matched by a file template you enter when specifying the search parameter, you can list the matching files with the fourth option. This calls Lexa List and gives you a listing of all matches in the current directory. Of course if you extend the search scope of Lexa Pat to cover more than the present directory, then you will not, from within Lexa List, see any other files outside of the current directory which might match the file template. You can call Lexa List with the F3 function key on the desktop if you wish. 
	The present configuration of Lexa Pat can be viewed from the desktop in case you wish to check on just what values the various parameters have. 
	Note that on the top of the screen a reference to a setup file is to be seen. This is because in Lexa Pat you can save the configuration of all parameters to disk if you wish. Not doing so will lead to default values being assumed when you start Lexa Pat again. The setup is not automatically saved each time LexaPat terminates and you exit to DOS. Instead you must deliberately write the configuration to disk with the appropriate option. If Lexa Pat finds the setup file lpat.ini somewhere on your disk on starting (in the current directory or in another accessible via the DOS path variable) then it notes this and saves the configuration to this file again, overwriting its previous contents. Pay attention to the full path given along with the name of the setup file. 

From the first menu it is also possible to view the last set of search statistics. Obviously this only works if you have made at least one search since starting. 

These statistics are only sensible if you are aware of what the search string and what the files searched through were. However it often occurs that one searches a file or files several times in order to locate a string with some precision by editing switches; in such a case the result of a search can produce slightly different statistics each time. 
	Finally you can start the search from the first menu group. Should some information be missing which is necessary an error message is issued and the configuration is displayed. From this you can see what information still has to be provided. 

1.2.	Sample searches

Before looking at some practical examples, take note of the essential switches which effect the type of finds which Lexa Pat might return. 

	1)	Search for whole words only
	2)	Disregard case during search
	3)	Restrict search to beginning of line
	4)	Restrict search to end of line
	5)	Forbid spaces in search string

If you have not changed the values of the above switches then they are all set to ‘off’. Here is an example of a simple type of search: 

	Search String:  linguistics   File Template:  my_art.txt

In this case Lexa Pat looks for the string "linguistics" in the file called my_art.txt. You could vary this in a number of ways. Say for instance you wanted to comb through a number of files you might enter 

	Search String:  linguistics   File Template:  *.txt

Here Lexa Pat searches the present directory for any files which end in .txt. If it finds some these are then combed through for tokens of "linguistics". Another variation would be: 

	Search String:  ling   File Template:  my_art.txt

The search string in this example is quite short but enough to delimit the word "linguistics" from others which might be found beginning with the four letters "ling". 

Now consider the list of switches within Lexa Pat. In the three examples just given it is assumed that the default values are active. In effect this means that Lexa Pat would search 

	1)	For any string (not just whole words)
	2)	With attention paid to case
	3)	Anywhere in a line
	4)	Allowing spaces in a find
	5)	Only in the current directory

Item 4) above only applies if you use a wild card in the search string. This is the next variation on a search theme. Consider the following example: 

	Search String:  l?ng   File Template:  my_art.txt

The question mark wild card will be known to users from DOS: it stands for one unspecified character. Lexa Pat now starts a search for any set of four letters in which the second is left open. It could return at least two different types of finds here: "ling" (as in "linguistics") and "lang" (as in "language"), as both "i" and "a" can occupy the second position in the above search string. If the text specified was of any size then finds such as "long" or "leng" (from "length") might also be returned. 
	The asterisk wild card, which you know from DOS as standing for more than one unspecified character, can also be used. Here is a typical example: 

	Search String:  m*ph   File Template:  *.txt

Now Lexa Pat searches all files with the extension .txt for any string which begins with "m" continues in some way and ends with "ph". This is a very much more general string. Assume a linguistics text and that the intention of the user of Lexa Pat is to find how often the word "morphology" occurs in the files with the extension .txt. In the form in which the search has just being given you might obtain finds like: 

	1)	... whereas morphology is concerned with ...
	2)	... for him phonetics is not really central ...
	3)	... defining a morph presents considerable ...

Obviously this result is unacceptable as the second find is not wanted. To avoid Lexa Pat crossing word boundaries during a search you forbid spaces in search string finds by setting switch (5) above to ‘on’. Run a search again and the second find above will no longer be returned. 
	Ignoring case is another desirable addition to a search command. For instance in the case above the word "morphology" might occur at the beginning of a sentence and so be written with a capital letter. Set switch (2) to ‘on’ (i.e. no attention paid to case) and you should get returns like: 

	... whereas morphology is concerned with ...
	... defining a morph presents considerable ...
	Morphology has gained in popularity ...

The next switch of interest is that which forces Lexa Pat to search for whole words only. Take the above material again and assume that you wish to find instances of the word "morph" (a structural unit in morphology) in a text but not "morphology". Set switch (1) to ‘on’ (i.e. search for whole words only). This should return just one find from the fictitious text my_art.txt: 

	... defining a morph presents considerable ...

Of course it is not necessary to forbid spaces when searching for whole words. 
	For a variety of analytical purposes (critically editing literary texts, for example) it is desirable to restrict searches to the beginning or end of a line. This can be achieved by setting the switches Restrict search to beginning of line or Restrict search to end of line on. These are mutually exclusive, if you happen to use both then the latter is active. 
	A few points should be noted at this stage. Firstly, a word is defined in Lexa Pat as any string which is bound on the left and right by one of the following: 

	1)	A line beginning or line end
	2)	A space (ASCII $32)
	3)	An item of punctuation, i.e. one of the following set:
			" ‘ , . : ; ? !
			(a dash or a bracket is not a word boundary for Lexa Pat)

Secondly, a line has a maximum length of 144 characters; no search is made in a section of a line longer than this. If you view the results of the search on the screen, i.e. you have not specified an output file, and a line is longer than the screen width it is automatically wrapped around to the following line. 
	Thirdly, Lexa Pat finds as many instances of a search in a line as occur (within the line length limit). A search string can be up to 50 characters in length. Anything beyond this will be truncated and Lexa Pat just searches for the first 50 characters. 
	Fourthly, a complex search string can be used. All you have to do is to enter a phrase when prompted on the desktop with the Enter search parametersoption. For instance, you could search for morphological analysis of English in the fictitious file my_art.txt mentioned above by simply entering the phrase as search string. 
	Obviously if you use the "forbid spaces" switch with a complex search string then no finds will result. 
	The question of spaces leads to a further aspect of Lexa Pat which demonstrates its flexibility in pattern matching. It is legal to start a search string with a wild card or to end with one. The following instances are permissible search strings: *ing, l*, ?abit, wha? 
	What effect this type of search has can be seen from the following examples:

1)	Search String:  *en		File Template:  grammar.txt
2)	Search String:  ?ad		File Template:  nonsense.txt
3)	Search String:  fore*		File Template:  poetry.txt
4)	Search String:  hel?		File Template:  sample.txt

The first case searches a fictitious grammar text for all words which end in "en" (past participles of strong verbs, for instance). The search string always starts at the beginning of a word, the asterisk allows any number of characters to follow and the letters "en" must then form the end of the word. If the "whole words" switch was not used finds might be returned in which "en" is not the end of a word, it would be enough that it occur somewhere after the beginning of the word. This might in fact be desirable, so consider the use of switches to refine your search command. 
	The second case looks for any words which end in "ad" and are only three letters long (recall that the question mark wild card stands for only one unspecified character). Returns might be "had", "sad", "bad", etc. 
	The third case searches for all words which begin in "fore". This might be sensible when searching for grammatical prefixes. Lexa Pat would then return such instances as "forewarn", "foretell", "forecast", "forehand", etc. 
	The fourth case would return all words starting in "hel" and ending in a single unspecified letter, e.g. "held", "help", etc. 
	There may be times when all one wants to do is count the number of instances of a pattern in a series of files. This can be achieved via the switch Only count the matches found. With this switch Lexa Pat combs through each file for every occurrence of the search pattern, contrast this with the behaviour of Lexa Patwhen the following switch is set. 
	If you wish just to list the files in which the pattern occurs then use the Only list files with string switch. It is sensible to use this switch only in combination with an output file as this would then contain the list of files which contain the search pattern. Note in this connection that the search statistics offered at the end of the search must be interpreted in the light of the present switch: once Lexa Pat finds a match for the pattern in a file it stops looking further in that file (after all with the present switch you just want to know if a string occurs in a particular file or not). The same file may contain further instances of the search pattern but these are not located and so the number of finds does not reflect the total number of tokens of the pattern in all the files searched but just the number of files which have (at least one occurrence) of the search pattern. 
	Should you want to find out what lines do not contain the pattern you specify, use the Report on non-matching lines switch. Use the last switch with caution: it can lead to huge listings, depending on the file specification you enter and the ratio of patterns to the total number of lines in a given file. 
	If you have not chosen to send the output of a search to a file, the screen is used instead. The lines on which finds are found are displayed and the search string is shown in inverse video so that it can be easily recognized. After each file in which a string is found you are prompted to press a key to continue, if you hit the Escape key, Lexa Pat terminates the search and you are returned to the desktop. This is useful if you have started a search which would take you through very large files and you want to terminate the search without having to wade through thousands of lines. 
	Once the search has been completed you press any key to obtain a series of statistics about the search. The screen should then look like the following: 

The first two statistics are obvious. Note here, however, that if Lexa Pat has searched through non-ASCII files then the line number total will be unpredictable depending on how the files combed through mark ends of lines (if at all). Lexa Pat works on the basis of single lines but if it cannot find these then the files are searched through by taking blocks of 144 bytes at a time. 
	Equally the line total statistic refers to the total number of lines in all the files combed through and is only correct if the files were ASCII files with a carriage return and line feed as line break. The percentage statistic refers to the ratio of lines on which the pattern was found to the total number of lines in all files searched. 
	For non-ASCII files the byte statistic is of more immediate relevance. It is the total size of all the files searched and the percentage is the ratio of the sum of all patterns found to the total size of all files searched in bytes. 

Note. If you choose to send the output of a search to a file (or just count the tokens of a pattern) then the values for the various switches will be displayed on the screen while Lexa Pat is carrying out the search. 

1.3.	Disk options

It is obviously desirable to allow a pattern matcher to have a scope which extends beyond the current directory. This is provided for within Lexa Pat; not only that, a variety of disk options are included to help users to maintain a clear picture of what is on the hard disk of their system. 
	One of the more common uses of a pattern matcher is to find something which one has lost on one’s hard disk. Say for instance you have written a letter to one John Smith but have forgotten where you stored the letter and what file name you gave it. Here Lexa Pat comes to the rescue as it allows you to search selectively through your hard disk. Consider to begin with the set of options in the second menu group. 

By means of the first option you can determine the scope of a search. This has nothing to do with the search for patterns but refers to what files will be searched through to start with. On choosing the present option a window opens and you can select one of three types of scope. 
	Say you decide for the scope Subs from Root Dir. then Lexa Pat will search through the entire disk for files which match the file template and then for a string within these files which matches what you specified. Take the fictitious case alluded to above. You are looking for a letter written to one John Smith; you know that it must be a file with the extension .doc. Enter the search string and file template, specify the appropriate scope from the present menu option and start the search. Lexa Pat will now go to the root directory and from there start searching through every directory for a string "John Smith" in all files with the extension .doc. You could of course enter *.* as the file specification. Then Lexa Pat would search every file on the hard disk, something which could take hours. If you know that the letter you are looking for has some typical characters in its file name then specify these to avoid searching through unnecessary files. 
	Note in this connection that Lexa Pat will search through all types of files. It is irrelevant what word processor the files have been processed with, whether they are databases or even programme files. A find is a find and will be faithfully reported. 
	With the next option in the present menu you can specify the current directory (which is echoed in the penultimate line of the screen). When doing so you can also specify a different drive if you wish. Assuming that both drive and directory are valid, Lexa Pat changes and current directory searches now refer to this new directory. On exiting Lexa Pat you are returned to the original drive and directory unless you exit with Shift-F7 in which case no return to the starting point is made. 
	The last option in the second menu allows you to specify whether you wish to have an output file generated by Lexa Pat during a search or not. Remember that with an output file you do not see the finds on screen as they are located. 

1.4.	File services

The third menu on the desktop contains a series of options which might be of value when involved in pattern searching. The first six simply call further programmes from the Lexa set. The word count and the file compare options call Lexa Info and Lexa Comp respectively, see description of these programmes above. 
	The seventh option allows you to specify the name of your text editor. This is noted by Lexa Pat and saved in the setup file. The default value for this is Lexa Text (the text editor of the Lexa set). Once you have set this to your own value Lexa Pat will call your editor with the name of the output file when you choose the last option in this menu. Of course the latter options are only available after at least one search has been carried out. 
	The eighth option allows you to determine whether the output file which you generate should be automatically overwritten each time you carry out a search. If you do not allow this then each time you begin a search you must confirm overwriting the output file. 

Note In an output file, each line on which a find is located is listed. The find for the search string is enclosed in curly brackets to facilitate easy recognition. 

1.5.	Function key settings

F1  Help screen This displays the on-line help screen of Lexa Pat. The command is only available on the desktop. 

Shift-F1 Execute DOS command Here you are presented with an empty input line and can enter anything you like. Lexa Pat then tries to load your entry externally by passing it on to DOS so that for the successful execution of this command you must have entered a DOS command or the name of an external startup file which is either in the current directory or accessible via the DOS path variable. 

Ctrl-F1  DOS Call With this command DOS is loaded temporarily and you can carry out any command as if you were in DOS normally with the restriction that some of your system memory is now taken up by Lexa Pat which is in the background. If you load a further programme when you enter DOS avoid making another DOS call from within this programme as this may lead to your system hanging. When finished working in DOS, type exit to return to Lexa Pat. The screen is restored just as you left it. The configuration for the current work session (e.g. the settings of switches) is not effected by calling DOS. 

F3  Call Lexa List Loads the Lexa utility Lexa List to give you a list of all files in the current directory. Not to be confused with the option in the first menu which only list those files which match the file template entered for a search. 

F5  Edit output file Included in Lexa Pat is an on-line text editor with which one can edit any text which will fit into the remaining system memory (see description below). This could be the output file from a pattern search or any other text you care to process. The text in the editor remains in Lexa Pat until you leave. It is up to you to save it before terminating a work session! 

F7  Exit Lexa Pat.  Returns you to DOS. No confirmation of exit needed. 

Shift-F7  Exit with directory change.  Between starting Lexa Pat and your present position you may have changed directory (via the Set current directory option in the second menu) and now wish to change to this and unload Lexa Pat. Pressing Shift-F7 will leave you in the directory last chosen as current. 

F9  Show Environment Displays some relevant information about the environment you are working in such as the current and original path, the total and presently free disk space, the amount of system memory left, the current date and time, etc. 

1.6.	Internal text editor

Lexa Pat contains an on-line text editor. When starting the editor from the desktop three keystrokes are of relevance here. 

	Alt-T 		Activate text editor from desktop
	Alt-Q, Alt-F7	Return from text editor to desktop
	F5		Activate text editor and load output file of search

All the remaining keystrokes are a subset of those for Lexa Text, the ASCII text editor in the Lexa set. Note in this connection that the text editor can only be called from the desktop (which is where you are located most of the time anyway). When you press Alt-T first the internal directory lister is activated and you can now either choose a file from the current directory or change the directory and/or drive and then load a file. 
	To start a new file just press Escape when in the directory lister. The latter then disappears you are presented with an empty screen and the default file noname.tmp is created. When saving this file (either when you finish work or when you change files) you can give it a different name. 
	However, assuming that you have indeed loaded a file via the directory lister the screen should look something like the following: 

You can now move up and down in your text and change it at will. If you wish to have lines which are wider than the screen then the text is shifted 40 characters to the left (horizontal scrolling). You can tell by comparing the cursor position with the column counter just how far out on a line you are to the right. There is a limit of 256 characters per line. If the text you load has lines longer than this they are wrapped round to a new line and the arrow down symbol (_) appears at the end of the line. On storing a file back to disk, this symbol is removed to give the original length of the line in the disk version. 
	Any text loaded remains in the editor until you either choose to load another via F5 (this activates the directory lister for this purpose) or exit LexaPat. You return to the desktop by striking Alt-Q; the text is left as it is; pressing Alt-T again will lead to the screen being restored just as you left it the last time you processed the text in the editor. The onus is on the user to save this text if he/she has altered it. 
	For those who only use word processors like WordPerfect or MicrosoftWord note here that the internal text editor does not allow for formatting information like font attributes, page layout, etc. This is an advantage when editing so-called ASCII files (see glossary for definition) as they should not contain any formatting information. DOS batch files and corpus texts, for example, are always ASCII text files. 
	The output file generated by Lexa Pat is always an ASCII file.

1.6.1.	Summary of commands

1.6.1.1.	Navigation keys

	End  		End of current line
	Home  	Beginning of current line

	GreyPlus 	Down 1/2 a screen
	GreyMinus	Up 1/2 a screen
	PageUp	Up a screenful
	PageDown	Down a screenful
	Ctrl-PgUp	Beginning of text
	Ctrl-PgDn	End of text

	Ctrl-Left/RightArrow	Left/right a word at a time
	Up,Down,Left,Right Arrow	(Expected cursor movements)

	Ctrl-Home	Goto to line #
	Ctrl-T  	Set tab width    (default = 8 spaces)

1.6.1.2.	Deletion operations

	Del		Delete current character (no shift)
	Backspace	Delete current character (shift to left)
	Ctrl-R  	Delete word to right
	Ctrl-L		Delete current line
	Ctrl-End	Delete from cursor to end of current line

In addition to the above commands that you can toggle input modes with the Ins key (from the Insert to the Typeover mode and back again). If the typeover mode is active the word "Over" blinks in the upper righthand corner of the screen. 

1.6.1.3.	Search operations

	Ctrl-F	Find search string
	Ctrl-N	Continue search
	Ctrl-E	Exchange strings

Notes 1)  A search operation always begins from the current cursor position. To search through an entire text, press Ctrl-PgUp (to jump to the beginning) and then start the search. 2)  You can toggle case sensitivity for a search and confirmation for an exchange with the SpaceBar key immediately before you enter the string(s). 3)  To abort the search at any point, press Escape. If the cursor has jumped to a match somewhere in the text then it remains there, i.e. pressing Escape does not relocate the cursor. 

1.6.1.4.	Function key settings

F1  On-line help.  Pressing the F1 key when processing a text (including block marking) leads to the following screen being displayed. Note that the help is quite cursory. For details read the sections under the following function key headings. 

F3  Store/retrieve line.  A facility for copying the contents of the line the cursor is presently located on into an internal buffer and retrieving these again. 

Use either the arrows keys or the (Shift-)Tab key to choose the mode you require. Obviously retrieval is only possible after a line has been stored at least once. The present buffer holds only a single line (to be seen after the word Retrieve on the second line of the screen). Each new store erases the previous contents of the buffer. 

Ctrl-F3  Show formatting Display line ends and the spaces to which tabs are resolved. The latter is dependent on the current setting for Tab width (use Ctrl-T to specify!) which can be gleaned from the ruler on the second line of the screen. This option is useful to check on how tabs are used to optically structure text. 

F5  Load new file.  Calls the directory lister to allow you to choose a new file. Before this you are prompted to save the current text. Pressing Escape aborts the operation and retains the text you were editing. 

Shift-F5  Insert file Here the directory lister is activated but this time to insert the contents of a file into the current file in the editor at the present cursor location. Pressing Escape returns you to your text without any file insertion taking place. 

Shift-F6  Copy previous line Assuming that the previous line has a length greater than one, pressing the present key combination leads to the previous line being copied into the present one. Note that only that section is copied from the cursor position to the end of the previous line (to duplicate the entire line, move the cursor to the beginning of the current line with Home). The section is then inserted into the present line, i.e. if there is text to the right of the cursor in the current line then this is shifted to the right by the appropriate amount. 

Alt-F7  Exit Editor.  Exits to the desktop. Bear in mind that you are not prompted to save the current text at this point. You must store it to disk via the F10 key. If you forget to save a text and exit Lexa Pat from the desktop to DOS then the text is lost! 

F9  Environment Here you are offered an overview of your current text and the system environment in which you are operating. Note that the information concerning file size is gained on loading the file. Thus the number of bytes is that which the current file had on disk. However, the number of lines is always the actual number of the file in system memory as Lexa Pat maintains this variable continually. 
	The environment window also informs you of how much system memory is left. This is useful in determining what size a file can be at maximum when loaded into the text editor. To avoid memory overflow the size of a file should not be more than 75% of the remaining system memory. 

Ctrl-F9  Alter standard directory When the directory lister is activated for the first time the files listed are those from the current directory. If you move to another directory and/or drive you may choose a file from the new directory but when you activate the lister once more (with F5 for new file) the listing is that of the original current directory. 
	The present key combination offers you the option of changing the default directory for the lister (termed here the Standard Directory). Simply press Ctrl-F9 when in the directory you want and a brief message is issued. The next time you call the lister this directory is used for the file listing. The Standard Directory can be changed as often as you like. 

F10  Save text.  This operation involves a couple of steps. First of these is the entry of a file name which may consist of (i) a drive, (ii) a directory and (iii) a file name. If you just enter a file name then the file will be stored in the current directory. If you just enter a drive name before the file name (e.g. d:my_file.txt) then this is saved to the current directory of that disk. The full path name can be up to 43 characters long. 
	You may leave the file name unchanged or alter it to some other value. If a file with the same name is found on disk then you must (i) confirm overwriting it, (ii) alter the name again, or (iii) abort the text saving operation altogether. 

Note If you enter a bare file name (without a path) then the text is saved under this name to the current directory (you may check on this with F9 Environment). 

1.7.	Starting Lexa Pat in the batch mode

You will have noticed that the command syntax for Lexa Pat includes two parameters which can be passed to the programme. The first is the name of a setup file. A different file from the default lpat.ini can be used if you specify its name on the command line. This must be a file which Lexa Pat itself generated when you saved the configuration information via the Disksave Configurationoption in the first window on the desktop. You do not have to enter the extension .ini as this is supplied automatically by Lexa Pat. 
	The batch mode is an enhancement to Lexa Pat which allows one to have the programme start itself, draw the configuration information from a setup file (which must be specified on the command line), execute the search, write the contents to file and automatically terminate. As always the advantage is that you can embed a call to Lexa Pat in a DOS batch file and include other commands after this as Lexa Pat makes an automatic return to DOS. 

Two major points must be borne in mind regarding the batch mode: 

1)	You must enter the name of a setup file and the switch /b on the DOS 
	command line.
2)	Lexa Pat always writes the output of a search in the batch mode to a file. 

1.8.	Retrieving Cocoa file information

With the information retrieval programmes Lexa Pat and Lexa Context it is possible to have the first four items of the Cocoa parameters written before the search finds, should these be present in the files successfully combed through for search strings. The advantage of this is that the user can recognize what kind of files have been examined. Specifically the four items of information are: 

		1:	<B = ‘name of text file’>
		2:	<Q = ‘text identifier’>
		3:	<N = ‘name of text’>
		4:	<A = ‘author’>

Such information is of relevance to the organization of many corpora such as the Helsinki corpus of diachronic English for which the present option was primarily (but not exclusively) designed. 

2.	Lexa DbPat

Syntax:  ldbpat [ini_file] [/b] 

2.0.	Introduction

Lexa DbPat is the equivalent of Lexa Pat for database pattern matching. It has an almost identical desktop and the user-specifiable search parameters are almost the same. Initialization files can be conveyed to the programme in the same manner as for Lexa Pat and it also has a batch mode for use in DOS batch files. 

A few general points can be noted in this connection. First of all the fourth option in the leftmost window shows you the databases in the current directory which which match a user-specified database template; here the extension must be .dbf. 

The Search Switches window is slightly different from that in Lexa Pat. With the last option you can specify if you wish to search through all fields of the database. The default value is ‘no’. Assuming that you leave it at this, you are now prompted to choose a field for Lexa DbPat to search through in the records of each database. 

Users should carefully note how Lexa DbPat arrives at the field picklist offered at this point. First of all the programme checks to see what the Directory Scope is (this is specifiable with the third option in the centre menu, Disk  Options. The default value is the current directory only). It changes directory if this is necessary. Then it takes the database file template and searches for the first match. Once a database is found its structure is read and this is then used to derive the field list from. 
	Incidentally if you press Escape when prompted to choose a database field then a brief message to the effect that all fields will be searched is issued. Bear in mind that searching through all fields takes considerably longer than using just one field. 

2.1.	Database pattern matching

Once all the information necessary for a search has been entered you may start. The screen changes and you are presented with a display which is similar to that in Lexa Pat on the corresponding programme level. Note however that here, when a match for the search template is found, the number of the current record along with that of the search field and the name of the latter are displayed before the matching string which, as in Lexa Pat, appears in inverse video. 

If an output file has been specified by the user on the desktop then an ASCII text file is generated which in its structure is the same as that which you can have Lexa Pat create during pattern matching (see above for details). 

2.2.	Database viewer

Pressing F5 from the desktop activates the internal database viewer. It is natural that you have a database viewer and not a text editor in Lexa DbPat as this is concerned with database pattern matching. The following is a list of the commands which you have at your disposal on this level of the programme. 

F5  Load new database Activates the directory lister to allow you to select a new database. Pressing Escape aborts the operation and returns you to the desktop, i.e. not to the database you were just viewing. 

Alt-F7	Return to Lexa DbPat desktop

F9	Show information on current database

2.2.1.	Navigation in database

PageUp  Scroll backwards   Moves backwards one record in database file. 

PageDown  Scroll forwards   Moves forwards one record in database file. 

Ctrl-PageUp  Beginning of database   Jumps to beginning of database file. 

Ctrl-PageDown  End of database   Jumps to end of database file. 

F10  Browse view database. The browse mode in database editing is one in which a single record occupies one line (as opposed to the full-screen mode in which one record fills a single screen). It has the advantage that it allows the user to survey a series of records at once. To this end a type of browse has been implemented in the database viewer. It shows you the first 24 characters of the first 3 fields of the current database on the editing level when the user presses F10. A highlight bar can be moved within the window which opens. By means of this you can move to a record which you would like to jump to (press Return to move the pointer or Escape to leave it unchanged). The remaining keystrokes are navigational and should be self-explanatory. 

If an asterisk appears after the number of a record in the browse window then this indicates that it is tagged for deletion and can be permanently removed from the database by loading DbTxt and selecting the Delete Records option on the desktop (see Vol.2 of the present documentation). 

2.2.2.	Locating records

Ctrl-G  Goto record   Leads to a prompt for a record number to which the programme then jumps and the contents of which are displayed. If the value is beyond the range of the database, the last record is displayed. 

Ctrl-F  Find field contents   This is the option which you choose if you wish to comb through the records of a database for a search string. 
	On pressing Ctrl-F a picklist with the fields of the current database appears on the right of the screen. You choose a field for the search operation and press Return. Then an input window opens where you enter the contents of the particular field which you wish to locate. Again terminate this by pressing Return (pressing Escape at any point leads to the entire operation being cancelled). Lexa DbPat attempts to find a match for the string entered from the current position in the database onwards (to comb through the entire database go to the top by pressing Ctrl-PageUp to begin with). If the search is successful the screen display is refreshed to show the record with the string in it, otherwise a brief message is issued and nothing else changes. 

Notes The search method in Lexa DbPat is non-exact which means that you only need to type as much of the field as is necessary to delimit it from others. Say you are looking for someone called ‘Fitzgerald’ in an address database then entering ‘Fitzge’ as a search string is probably enough to locate the record successfully. Note that here non-exact search can still distinguish between upper- and lower-case, i.e. in the above example entering ‘fitzge’ will not necessarily lead to a find even if there is an entry ‘Fitzgerald’ in the database. 

Ctrl-R, N  Repeat search The idea here is that a search is repeated with the same values for (i) the field to be searched through and (ii) the string to be found, without the necessity of entering the string and specifying the field again. The search continues from the present record. After you specify a string and choose a field with Ctrl-F, pressing Ctrl-R repeatedly will then show you all the finds for the string in the current database. 

Ctrl-L  Determine field for letter search Letter search is a facility included in Lexa DbPat with which you can search for the contents of a given field. The special feature of letter search is that it begins to comb through the current database from the first letter you type, jumping to any record which may show that letter in a certain field. Just what field is to be examined for letter search is determined via the present key combination. 

Space  Start letter search Pressing the SpaceBar activates the letter search command. The principle is as follows. You type a single letter. Lexa DbPat finds the next record in which this letter is the first letter of the keyfield. Type a second letter. The next record with both the first and second letters as the initial two letters of the keyfield is found and displayed. Carry on until you have found the record you want. 
	If there is more than one record with the string you have just typed, press Return to continue to the next find with these initial letters. 
	The record pointer is only re-positioned if you terminate the letter search command with Ctrl-Return. Pressing Escape leaves you at the record from which you activated the command. 

Note Pressing the SpaceBar for letter search before having chosen a field for search leads to the field picklist appearing from which you can select a field. 

3.	Lexa Context

Syntax:  lcontext [setup_file] [/b] 

3.0.	Introduction

Although the Lexa set is primarily concerned with the analysis of single lexical items, retrieval software which refers to phrases and sentences is obviously desirable as part of such a set of programmes. To this end the utility LexaContext has been included. 
	Basically what Lexa Context does is to examine a text or group of texts to see whether two strings or words occur in a certain context, writing the results of the search to an ASCII text file which can be examined with a text editor such as Lexa Text. 
	On starting Lexa Context you are presented with a screen like the following in which you can enter and/or change the parameters for a search. 

You will notice immediately that the information you specify falls into three main groups. To alter an option move the arrowhead up or down (with the arrow keys on the cursor pad) and press Return. 

3.1.	Specifiable parameters

(1)  System information Here you say what (i) drive is to be examined, (ii) the directory scope of the search and (iii) the file template to be used. When specifying a drive, Lexa Context reads all the logical drives of the system and offers them in a window from which you may choose one. This is the same as the drive choice option in many of the other Lexa programmes. When determining what directory scope to use you are offered a window with three possibilities. Move the highlight bar to the one you want and press Return. This is then echoed at the corresponding point on the Lexa Context screen. A file template is typed in by the user. Bear in mind that you may (a) enter a simple file name or (b) type a directory mask with one or both of the DOS wild cards *, ? when you wish to have several files examined. 

Note Instead of using a file template with DOS wild cards, Lexa Context (like Lexa Pat and Lexa Search) can take the names of those files to be examined from a so-called list file which is simply an ASCII text with the name of a separate file on each line. Lexa Context then combs through each of the files listed for matches. The advantage of this simple alternative is that it allows you to use a set of file names which do not share some similarity in their DOS name but for instance in the Cocoa-style parameter values which they show in their header. For suggestions on what use the latter option can be put to, see the description of the utility cocoa.exe in Vol.3 of the present documentation. 
	When using a list file, you enter the name of this file name instead of a DOS file template at the appropriate option. 

(2)  Search parameters To begin with users should note that with Lexa Context one can carry out searches for either one or two strings. If one chooses to look for just a single string (to be specified under the option Context Type) then the five remaining parameters (from intervening items to sentence delimiters) are of no relevance. In such a case you are using Lexa Context just like Lexa Search or Lexa Pat. 
	For the present discussion I assume that you want a double string search. In this case you must of course enter two strings as number one and number two. A string must be typed in literally, i.e. DOS wild cards are not legal here (try Lexa Pat if you wish to use wild cards when combing through texts). 
	Next you can say whether the case of letters in a string is to be considered; if not, then strings like "when" and "When" would be treated as two equal instances of the same word. 
	Each string can be treated as a word or string for a search. If you state that a string is to be treated as a word then the question of delimiter becomes important. Technically, a word is a string which is delimited at either end by (i) a line beginning or line end, (ii) a space or (iii) a member of a set of sentence delimiter characters. As the latter can vary, it is up to the user to specify under the relevant option what he/she understands by a sentence delimiter. 
	For any context the number of items which separate the two search strings/ words is of central importance. Firstly, you must say whether the intervening items, which Lexa Context counts when determining if a particular context should be returned as a find, are (i) characters or (ii) words. After this you specify the number of intervening items which can maximally occur between an occurrence of string one and string two for the context to be returned as a find. 
	Although computers treat texts as series of lines, the linguist sees texts as organized into sentences. For this reason there is an option in Lexa Contextwhere you can say at what point in a sentence (or line) a string can occur for it to be returned as a find. 

As you can determine this for both string one and string two, it is necessary that the specifications for both strings match one another. For instance it would be senseless to say that both string one and string two should occur at the beginning of a sentence. In such a case Lexa Context would not of course return any finds. 
	If you specify either beginning or end of a line as the string position for either string one or string two then Lexa Context no longer "sees" the text file(s) it examines as a set of sentences. 

(3)  File output information This concerns the last three options. You may enter any valid text editor name as the User Editor. This is the programme which will be called if you press F5 to view the output file. The name of the output file can also be entered by the user; furthermore you may specify which delimiters, normally some type of bracketing, e.g. {}, which is to be used by Lexa Contextwhen enclosing the search strings which are found in a certain context in the files to be searched through. 
	When a search is carried out, Lexa Context informs you of what files are being combed through. Once the search is completed you are returned to the Lexa Context initial screen and can either examine the output file (to see what was found), alter parameters and start searching again or simply exit to DOS. 

3.2.	Various limits

When using the current programme you should bear in mind that certain limitations exist with regard to the length of various parameters. 

Parameter				No. of characters/items
	Max. length of a search string		48
	Max. length of a line			255
	Max. length of a sentence		2048
	Max. no. of intervening items		255

During a search a context which goes beyond these limits, e.g. a sentence which is longer than 2048 characters, will not be reported back by Lexa Context. 

3.3.	Programme setup

When you exit Lexa Context with F7 the settings for all user-specifiable parameters are stored to a setup file, by default called lcontext.ini, in the directory in which the programme Lexa Context is itself located. The next time you load Lexa Context the configuration from the last session is read and used to set initializable parameters. This obviates the necessity of typing in information which is unchanged each time you load Lexa Context. 
	The user can enter the name for his/her own setup file by availing of the relevant option at the bottom of the screen in Lexa Context. The advantage here is that one can store different sets of information which need not be entered repeatedly but merely loaded from disk by means of a user-specified setup file. 
	To start Lexa Context using the information in a customized setup file you type lcontext setup_file on the DOS command line where setup_file stands for the name of your setup file. 
	Should you load Lexa Context using the /b switch (with or without a customized setup file) it starts, carries out a search (writing the results to file as usual) and exits to DOS automatically afterwards. 

Note As with Lexa Search (see below) the output file when the programme is run in the batch mode carries the extension .$$$ which indicates that this is a temporary file; this file, if it already exists on disk, is automatically overwritten in the batch mode, i.e. the user is not asked to confirm overwriting the output file before the programme begins a search run. 

4.	Lexa Sweep

Syntax:  lsweep [setup_file] [/b] 

4.0.	Introduction

The idea behind Lexa Sweep is to provide a menu-driven utility with which one can carry out global "find and exchange" operations. Various features contribute to the flexibility of the programme and recommend it to computer operators who manage large text files: (i) the ability to edit a line on which a pattern has been found, (ii) the option of specifying what directory or directories are to be searched through by the programme, (iii) the capability of editing files with finds with your own text editor and (iv) the storing of your configuration to a setup file. All of this is achieved from a comfortable and visually effective desktop. 

4.1.	Configuration

There are three menus in Lexa Sweep grouped as windows with picklists in which you simply move the highlight bar and press Return to choose an option. 

The first menu contains those options which are necessary to supply the programme with information required for a replace operation. Here you can specify (i) the find string, (ii) the replace string, (iii) the file template for files to be searched through and (iv) whether case is to be ignored. 
	After entering the necessary information you can check on the configuration by choosing the appropriate menu option. This is advisable as you cannot run a sweep until the required information is available. Note that this does not have to be entered afresh at the beginning of each work session as Lexa Sweep reads a setup file if present on starting. This is also indicated when the configuration is shown. 
	Having specified all the necessary information in this menu you can then view the configuration settings which leads to a screen like the above one. You may also say if the sweep mode is to be replace or delete (in which case no replace string is specified). 

4.2.	Sweep options

The second menu is concerned with options for the sweep operation. Here you may say if you wish to view the file on screen which Lexa Sweep is currently combing through, if you wish to confirm each replacement or deletion and what directory scope is to obtain during the sweep operation. The three possibilities here are (i) the current directory, (ii) all subdirectories under the current directory or (iii) all subdirectories under the root directory. In addition you may change the current directory to a value of your own. These settings can also be viewed resulting in a screen like that below. 

When you are satisfied with both the sweep options and the configuration of the replacement parameters you may start the sweep operation from the last option in the first menu. You are asked to confirm starting and then Lexa Sweep goes into action. Maximum control over the system is available if you have chosen to both view each file as it is combed through and to confirm each replacement or deletion. 
	Assuming you have done this Lexa Sweep will stop and demand user confirmation before replacing or deleting. You now have the additional option of editing the line Lexa Sweep has stopped on by pressing e for edit. The particular line of the current file is duplicated into an edit line above the file view window and you now have the commands of the User Input Editor (see relevant appendix below) at your disposal as in the following case: 

There is a column counter to the left of the screen which is useful for long lines. Horizontal scrolling is provided for and with the column counter you can tell where you are in the line you are editing. Note three special commands here: 

	1)	Escape	 Abort editing and continue sweep
	2)	F5		Undo changes and continue editing
	3)	F10		Terminate editing and save changes

The line of text which you can edit is completely unfiltered, i.e. carriage returns, line feeds, tabs and other control symbols are displayed as raw characters. When the sweep operation is under way you can interrupt it by pressing Escape. Lexa Sweep continues until the end of the current file and then aborts the sweep operation. Note The configuration and sweep options along with the name of your text editor are saved to a setup file lsweep.ini which is read each time Lexa Sweep is loaded. This file should be kept in the Lexa Sweep home directory. When stored from within Lexa Sweep, this directory is automatically used. 

4.3.	File processing

A variety of auxiliary options are gathered together in the third desktop menu which complement the set of tasks you can execute within Lexa Sweep. To begin with you can edit, view or hexedit a file or run Lexa Pat. In addition you can specify the text editor you would like to use in Lexa Sweep; its name is also saved in the setup file lsweep.ini; the default name is Lexa Text. 
	The last two options in the third menu are of particular interest. With the first of these you can load each file plus a string find with the editor you specified via the appropriate option. 

Consider a typical situation where this could be useful: you have, say, 30 files in a directory. These have been tagged with Lexa according to a scheme which you devised but which you have since altered. You would like to check on whether some of the old tags are still present in the texts. This can be achieved as follows: run this option with the name of the tag as the search string (no replace string need be specified). Lexa Sweep now loads your text editor with each of the files where it finds the search string until the search in the current directory is exhausted. By these means you can be certain that you have found all instances of the particular tag in all the text files. 
	The last option of the third menu generates an output file with the names of all the files which contain the specified search string. This could be useful for documentation purposes. 

4.4.	Function key settings

F1  Help screen This displays the on-line help screen of Lexa Sweep. The command is available on all levels of the programme. 

Shift-F1 Execute DOS command Here you are presented with an empty input line and can enter anything you like. Lexa Sweep then tries to load your entry externally by passing it on to DOS so that for the successful execution of this command you must have entered (i) a DOS command or (ii) the name of an external startup file which is either in the current directory or accessible via the path variable. 

Ctrl-F1  DOS Call With this command DOS is loaded temporarily and you can carry out any commands as if you were in DOS normally with the restriction that some of your system memory is now taken up by Lexa Sweep which is in the background. If you load a further programme when you enter DOS avoid making  another DOS call from within this programme as this may lead to your system hanging. When finished working in DOS, type exit to return to LexaSweep. The screen is restored just as you left it. 

F3  Call Lexa List Loads the Lexa utility Lexa List to give you a list of all files in the current directory. 

F7  Exit Lexa Sweep.  Returns you to DOS. No confirmation of exit needed. 

Shift-F7  Exit with directory change.  Between starting Lexa Sweep and your present position you may have changed directory (via the Set current directoryoption in the second menu) and now wish to change to this and unload LexaSweep. Pressing Shift-F7 will leave you in the directory last chosen as current. 

Ctrl-F7  Switch colours Allows you to toggle the colours for an EGA/VGA based system. There are 7 different colour combinations from which you can choose by simply pressing Ctrl-F7 until you reach the colour combination you want. 

F9  Show Environment Displays some relevant information about the environment you are working in such as the current and original path, the total and presently free disk space, the amount of system memory left, the current date and time, etc. 

5.	Lexa Search

Syntax:	1)	lsearch 
		2)	lsearch /i-setup_file 
		3)	lsearch /b-setup_file 
		4)	lsearch search_string file_template /i 

The purpose of Lexa Search is to offer a simple file searching facility. All it does is to find out if a user-specified string occurs in a particular file or files. However, by means of a few additional features it can be used as quite a flexible tool for quick and easy string searching. It is by no means intended to replace the full-blown pattern matcher Lexa Pat. 
	On starting Lexa Search without any DOS command line parameters you are presented with a screen like the following in which the nine parameters which are needed for a successful search are determined by the user in an interactive manner. 

You begin by moving the arrowhead to the parameter you wish to change/fill. By default it rests in front of Search String as obviously this is the most important for any search. The minimum which the user must enter is a search string, the remaining parameters have default values which hold if not altered. 
	In all but the rarest cases you will wish to alter one or more of the default values before starting a search. The parameters Search String and File Templaterequire of the user that he/she enter some alphabetic input. In those cases where a parameter can only have one of two values you can toggle the current value. 
	First move the arrowhead to the required parameter and press Return. As prompted, use the SpaceBar to toggle the value and Return to conclude. 

The parameter Directory Scope has three values and so cannot be toggled on and off but requires of the user that he/she chooses one of three values from a picklist which appears on choosing to determine this parameter. 

A search can be made to cover either (i) all the directories on the current disk, Subs from Root or (ii) only those directories which lie below the current one in the disk tree structure, Subs from Current or (iii) only the present directory, Current Directory. 

5.1.	Using a file list

Instead of using a file template with DOS wild cards, Lexa Search can take the names of those files to be examined from a so-called list file which is simply an ASCII text with the name of a separate file on each line. Lexa Search then combs through each of the files listed for matches. The advantage of this simple alternative is that it allows you to use a set of file names which do not share some similarity in their DOS name but for instance in the Cocoa-style parameter values which they show in their header. For suggestions on what use the latter option can be put to, see the description of the utility cocoa.exe in Vol.3 of the present documentation. 
	When using a list file, you first change the parameter Use List File to ‘yes’and then enter the name of this file name instead of a DOS file template at the appropriate option. A list file must have the extension .LST for Lexa Search to recognize it as such. 

5.2.	Using a list of search strings

When specifying the search string for Lexa Search you have two options. The first is to enter this directly in the interactive mode. No wild cards can be used here so there is not much flexibility available. 
	The second method promises better search results. As with Lexa Pat you may enter the name of a file instead of a search string. When the actual search starts, Lexa Search then consults this file and takes the string on the first line as search string; when this search has been completed, it loops back to the beginning, takes the string on the second line of the file and so on until it has processed the last line in the file with the list of search strings. 

Notes. As with a file list, a list of search strings must have the extension .LST for Lexa Search to recognize it as a file in the first place. There need be no obvious relationship between strings deposited in a list file, consult the file VERBFORM.LST which is included on the Lexa distribution diskettes and which can be used to test the present option with Lexa Search. 
	A search string can have a maximum length of 48 characters; a list file can have a maximum of 32 items (file names or search strings). 

After all the parameters for a search have been specified to your satisfaction, press F10 to start or Escape to abort the entire operation and return to DOS. 
	When it starts a search Lexa Search changes the screen. On the top the current directory, search string and file template (or list file) are echoed. It now combs through files which match the file template for the search string. If the string is found only once this is enough for Lexa Search (in fact it stops searching at that point) and does one of two things: (i) it either just displays the name of the file if you have chosen not to load Lexa View or (ii) it loads LexaView with the file name, search string (and perhaps the ignore case switch), upon which the first occurrence of the search string is located in the file passed as parameter. 
	If you have chosen to generate an output file with the results of the search then no screen display is offered and needless to say Lexa View is not loaded irrespective of whether the switch for it is set to ‘on’ or not. 
	The output file generated in the interactive mode is always called LSEARCH.OUT. You must confirm overwriting this file if it is found by LexaSearch on starting execution. The file is always deposited in the current DOS directory. 

Notes The values of the search parameters are stored to disk on exiting LexaSearch in the setup file (to be seen in the last line of the input window of the interactive mode). This file is called lsearch.ini by default and is deposited in the home directory of Lexa Search. You may specify a different name by editing this user-input line. The advantage here is that one can store different sets of information which need not be entered repeatedly but merely loaded from disk by means of a user-specified setup file (see remarks below). 
	On re-loading, the values for the various parameters are extracted from the file lsearch.ini if Lexa Search is called without explicit initialization (again see below) or from the setup file specified by the user on the DOS command line. 

5.3.	Command line options

Apart from the simple option of entering lsearch you can choose one of three others to force Lexa Search to behave somewhat differently. Two of these options concern setup files with information for Lexa on how to initialize the various parameters needed for a search run. 
	With the option lsearch /i-setup_file Lexa Search starts with automatic initialization (indicated by /i on the command line), i.e. it fills the parameters with information from the file specified as setup_file on the DOS command line. The programme enters the interactive mode as usual and you can decide on further action from there. 
	The option lsearch /b-setup_file information is also gleaned from a setup file. However, Lexa Search begins searching file immediately and terminates automatically. This batch mode (indicated by /b on the command line) is useful for a nested call to Lexa Search within a DOS batch file. 
	In the batch mode it is not possible to load Lexa View as this would require user input which is prohibited in the automatic execution of any of the Lexaprogrammes. Note also that the output file generated in this mode is always called LSEARCH.$$$ and is deposited in the current DOS directory. 

The last option lsearch search_string file_template /i allows users to enter Search String, File Template and Ignore Case information from the DOS command line. Again this can be of use when embedding calls to Lexa Search in DOS batch files. 

6.	Lexa Replace

Syntax:	1)	lreplace /r,d string1 string2 file_spec 
		2)	lreplace /r,d /f-find_replace_file file_spec 

The computer user who manages large numbers of text files, realizes how often one has to replace characters or strings in a file or group of files. Lexa Replaceis intended to facilitate this procedure. 
	The first point to note about the present programme is that the source for the replace operation can either be a single file or a group of files, specified by the user by means of a DOS wild card, e.g. *.txt. This immediately sets the present programme off from normal word processors which only allow replacement within a single file, i.e. that which is currently loaded. 
	The second point to take note of is that Lexa Replace has two modes. It either replaces or deletes a character/string in a file or group of files. The mode is determined by a switch which is entered on the command line. As one might expect, the /r switch indicates the replace mode while the /d switch stands for the delete mode. If the latter mode is chosen then obviously one does not have to specify a replacement string and the number of command line parameters is reduced by one (see syntax of Lexa Replace above). 
	The third point to bear in mind is that Lexa Replace can carry out a series of string exchanges. This is achieved by specifying what strings are to be found and what strings are to replace these. A text file must be created for the purpose and specified on the DOS command line by a preceding /f- (= "find-and-replace"-file); each line of such a text file contains a string to be found, followed by at least one tab character (ASCII $9), and then the string to replace the one to be found. A "find-and-replace"-file contains as many lines as there are string substitutions to be carried out. Such a file might look like the following: 

	_ART	[tab]	_DET 
	_ADV	[tab]	_QUAN, etc. 

This would replace each occurrence of the tag _ART by _DET (in plain words, replace "article" by "determiner"), _ADV by _QUAN (i.e. replace "adverb" by "quantifier"), etc. Again note carefully than the end of the find string is marked by a tab character and the beginning of the replace string by the end of the (last) tab character. There is no restriction on the number of replacements you make per file. 
	However, there is one restriction which the user must bear in mind here: Lexa Replace cannot replace a string in a file by another string if the string extends beyond one line into the next. This is because of the principle which is applied by the programme: the changes made are based on a line by line analysis of the input text. Accordingly Lexa Replace recognizes a non-ASCII text, issues an error message and terminates. By definition (see the descriptions of other programmes as well) an ASCII text is one with lines less than 256 characters long which are terminated by a carriage return and line feed. 
	As with the various other programmes of the Lexa set which require command line parameters, Lexa Replace issues a diagnostic if for some reason or other the input file or input file specification is not acceptable. Entering lreplace on its own leads to a short help text being issued. 

7.	Lexa Filter

Syntax:  lfilter table_file file_spec 

While Lexa Replace and Lexa Sweep are useful for replacing strings in groups of files there is still a need for a programme which will replace a series of bytes in a set of files from one value to another. Say you have encoded special language characters in a series of texts which you created with your text editor in a certain way and you now have changed some of these characters. You are faced with the task of loading each file with the special characters in it and changing all of them individually with the "find and replace" option of your text editor. 
	A much easier way of carrying out this and similar tasks is to use LexaFilter. It works on the basis of a table file, entered on the command line before the specification for the file(s) which are to be filtered, and which contains a set of substitutions which are then observed when Lexa Filter filters each of the files it finds which match the file specification. Note that the default name for the filter file is lfilter.tbl. Sample contents for a file called lfilter.tbl might be: 

		230	102
		228	101
		233	105

In this simple case all instances of ASCII $230 are replaced by ASCII $102, all those of $228 by $101 and those of $233 by $105. Technically Lexa Filter works as follows. 
	The filter file is read into memory into a character translation table. This can hold up to 255 entries at any one time. Then Lexa Filter reads the first input file it can find going on the file specification and compares each character with the substitutions which it has read into the character translation table. If there is a match then the particular byte read is translated into the substitution byte in the character translation table and written back to disk. This continues until no more files can be found which match the file specification. Note that Lexa Filtercan process any type of file, i.e. not just ASCII files. 
	The filter table file must have a definite format. It is an ASCII file with one substitution per line. First comes the number (in decimal!) of an input byte value then comes a tab or at least a space to separate the input byte from the output byte which now follows, it also being given in decimal form. The file should contain as many lines as desired substitutions. 

Note If you wish to have different substitution tables then you must create separate filter table files and specify the name of the desired one on the command line before running Lexa Filter. 

Bibliography on Corpus Linguistics

Note The following bibliography is intended as an orientation to those users who wish to read more about the subject of corpus linguistics. It seemed inappropriate to the present author to include general references to computer books as these go out of print (and date) very fast and are replaced by others just as quickly. Furthermore, there is little or no literature on programmes which form a (partial) alternative to the present software. Instead one must use original manuals, e.g. of the programme Tact produced by the University of Toronto or of the commercial product Word Cruncher (marketed up to recently by the Electronic Text Corporation), both of which are text retrieval programmes. 

	(1989) TUSTEP. Tübinger System von Textverarbeitungsprogrammen. (Tübingen: 
	Zentrum für Datenverarbeitung der Universität). 

Aarts, J., Meijs, W. (eds.) (1984) Corpus linguistics: Recent developments 
	in the use of computer corpora in English language research. (Amsterdam: 
	Rodopi). 

Aarts, J., Meijs, W. (eds.) (1986) Corpus linguistics II: New studies in 
	the analysis and exploitation of computer corpora. (Amsterdam: 
	Rodopi). 

Aarts, J., Meijs, W. (eds.) (1990) Theory and practice in corpus linguistics. 
	(Amsterdam: Rodopi). 

Aarts, J., van den Heuvel, T. (1984) "Linguistic and computational aspects 
	of corpus research", in: Aarts, J. and Meijs, W. (eds.), Corpus 
	linguistics: Recent developments in the use of computer Corpora 
	in English language research. (Amsterdam: Rodopi). 83-94.

Aarts, J., van den Heuvel, T. (1985) "Computational tools for the syntactic 
	analysis of corpora", Linguistics 23: 303-35.

Ager, D.E. (ed.) (1979) Advances in computer-aided literary and linguistic 
	research. (Birmingham: University of Aston). 

Ahmad, K., et al. (1985) Computers, language learning and language teaching. 
	(Cambridge: University Press). 

Aijmer, K., Altenberg, B. (eds.) (1991) English corpus linguistics: Studies 
	in honour of Jan Svartvik. (London: Longman). 

Aitken, A.J., R.W.Bailey and N.Hamilton-Smith (eds.) (1973) The computer 
	and literary studies. (Edinburgh: University Press). 

Akkerman, E., Masereeuw, P. and Meijs, W. (1985) Designing a computerized 
	lexicon for linguistic purposes, ASCOT Report No.1. (Amsterdam: 
	Rodopi). 

Akkerman, E., Meijs, W. and Voogt-van Zutphen, H. (1987) "Grammatical 
tagging in ASCOT", in: Meijs, W. (ed.), Corpus linguistics and beyond: Proceedings of the Seventh International Conference on English Language  Research on Computerized Corpora. (Amsterdam: Rodopi). 181-93.

Akkerman, E., W.Meijs and H.Voogt-van Zutphen (eds.) (1985) A computerized 
	lexicon for word-level tagging, ASCOT Report No.2. (Amsterdam: 
	Rodopi). 

Altenberg, B. (1991) "A bibliography of publications relating to English 
	computer corpora", in: Johansson, S. and Stenström, A.-B. (eds.), 
	English computer corpora: Selected papers and bibliography. (Boston:
	Mouton de Gruyter). 355-96.

Arnold, D., Tombe, L. des (1987) "Basic theory and methodology in EUROTRA", 
	in: Nirenburg, S. (ed.), Machine translation: Theoretical and 
methodological issues. (Cambridge: University Press). 114-35.

Arthern, P.J. (1979) "Machine translation and computerized terminology 
	systems - a translator’s viewpoint", in: Snell, B.M. (ed.), Translating 
	and the computer. (Amsterdam: North-Holland). 77-108.

Atwell, E. (1986) "Beyond the micro: Advanced software for research and 
	teaching from computer science and artificial intelligence", in: 
	Garside, R., Leech, G. and Sampson, G. (eds.), Computers in English 
	language teaching and research. (London: Longman). 167-83.

Atwell, E. (1987) "Constituent-likelihood grammar", in: Garside, R., Leech, 
	G. and Sampson, G. (eds.), The computational analysis of English: 
	A corpus-based approach. (London: Longman). 57-65.

Atwell, E., Elliott, S. (1987) "Dealing with ill-formed English texts", 
	in: Garside, R., Leech, G. and Sampson, G. (eds.), The computational 
	analysis of English: A corpus-based approach. (London: Longman). 
	120-38.

Atwell, E., Leech, G., and Garside, R.G. (1984) "Analysis of the LOB Corpus: 
	progress and prospects", in: Aarts,J. and Meijs, W. (eds.), Corpus 
	linguistics: Recent developments in the use of computer corpora 
	in English language research. (Amsterdam: Rodopi). 41-52.

Bailin, A., Thompson, P. (1988) "The use of natural language processing 
	in computer-aided language instruction", Computers and the Humanities 
	22: 99-110.

Barr, A., Feigenbaum, E.A. (eds.) (1981) The handbook of artificial intelligence, 
	Vol.I. (Los Altos, California: William Kaufmann Inc.). 

Barr, A., Feigenbaum, E.A. (eds.) (1982) The handbook of artificial intelligence, 
	Vol.II. (Los Altos, California: William Kaufmann Inc.). 

Bergenholtz, H., Schaeder, B. (eds.) (1979) Empirische Textwissenschaft: 
	Aufbau und Auswertung von Text-Corpora. (Königstein: Scriptor). 

Biber, D. (1988) Variation across speech and writing. (Cambridge: University 
	Press). 

Birch, D. (1985) "The stylistic analysis of large corpora of literary texts", 
	ALLC Journal 6: 33-8.

Black, W.J. (1986) Intelligent knowledge-based systems. (Wokingham: van 
	Nostrand Reinhold). 

Blatt, A., et al. (1985) Computer und Übersetzen: Eine Einführung. (Hildesheim: 
	Olms). 

Boguraev, B., Briscoe, E.J. (eds.) (1989) Computational lexicography for 
	natural language processing. (London: Longman). 

Brainerd, B. (1980) "The chronology of Shakespeare’s plays: a statistical 
	study", Computers and the Humanities 14: 221-30.

Brandon, F.R. (1985) "Microcomputer software tools for a bilingual dictionary 
	and an automatic bilingual dictionary", ALLC Journal 6: 11-13.

Brown, P.F., et al. (1990) "A statistical approach to machine translation", 
	Computational Linguistics 16: 79-85.

Burnard, L. (1987) "Principles of database design", in: Rahtz, S. (ed.), 
	Information technology in the humanities. (Chichester: Ellis Horwood). 
	54-68.

Burrows, J.F. (1987) Computation into criticism: A study of Jane Austen’s 
	novels and an experiment in method. (Oxford: Clarendon Press). 

Burton, D.M. (1973) Shakespeare’s grammatical style: A computer-assisted 
	analysis of ‘Richard II’ and ‘Antony and Cleopatra’. (Austin: University 
	of Texas Press). 

Butler, C.S. (1985) Computers in linguistics. (Oxford: Blackwell). 

Butler, C.S. (1985) Statistics in linguistics. (Oxford: Blackwell). 

Butler, C.S. (1985) "Computerized text processing in linguistic and literary 
	research", Linguistic Abstracts 1: 53-67.

Butler, C.S. (1990) "Language and computation", in: Collinge, N.E. (ed.), 
	An encyclopaedia of language. (London: Routledge). 611-67.

Cameron, A. (1977) "The dictionary of Old English and the computer", in: 
	Lusignan, S. and North, J.S. (eds.), Computing in the humanities. 
	(Waterloo, Ontario: University of Waterloo Press). 101-6.

Cameron, K. (ed.) (1989) Computer-assisted language learning. Program 
structure and principles. (Oxford: Blackwell). 

Cameron, K., Dodd, W.S. and Rahtz, S. (eds.) (1986) Computers and modern 
	language studies. (Chichester: Ellis Horwood). 

Carroll, J.B. (1971) "Statistical analysis of the corpus", in: Carroll, 
	J.B., Davies, P., Richman, B. (eds.), Word frequency book. (New 
	York: American Heritage). xxi-xli.

Carroll, J.B., Davies, P., and Richman, B. (eds.) (1971) Word frequency 
	book. (New York: American Hreritage). 

Carter, D. (1989) "LDOCE and speech recognition", in: Boguraev, B. and 
	Briscoe, E.J. (eds.), Computational lexicography for natural language 
	processing. (London: Longman). 

Cercone, N., Murchison, C. (1985) "Integrating artificial intelligence 
	into literary research: An invitation to discuss design specifications", 
	Computers and the Humanities 19: 235-43.

Charniak, E. (1983) "A parser with something for everyone", in: King, 
	M. (ed.), Parsing natural language. (New York: Academic Press). 
	117-50.

Cherry, L., et al. (1983) "Computer aids for text analysis", Bell Laboratories 
	Records May/June 1983: 10-16.

Clocksin, W.F. (1984) "An introduction to PROLOG", in: O’Shea, T. and 
	Eisenstadt, M. (eds.), Artificial intelligence: Tools, techniques 
	and applications. (New York: Harper & Row). 1-21.

Clocksin, W.F., Mellish, C.S. (1987) Programming in Prolog. 3rd.revised 
	and extended edition.  (Berlin and Heidelberg: Springer). 

Cohen, P.R., Feigenbaum, E.A. (eds.) (1983) The handbook of artificial 
	intelligence, Vol.III. (Los Altos, California: William Kaufmann 
	Inc.). 

Crookes, D. (1988) Introduction to programming in Prolog. (Englewood Cliffs: 
	Prentice Hall). 

Dale, R., Mellish, C. and Zock, M. (eds.) (1990) Current research in natural 
	language generation. (New York: Academic Press). 

Davies, G. (1986) "Authoring CALL software", in: Leech, G.N. and Candlin, 
	C.N. (eds.), Computers in English language teaching and research. 
	(London: Longman). 12-29.

Davies, G., Higgins, J. (1985) Using computers in language learning: A 
	teacher’s guide. 2nd. edition.  (London: CILT). 

Dik, S.C. (1989) The lexicon in a computational functional grammar. 
	(Amsterdam:	General Linguistics Institute, Amsterdam University). 

Dowty, D.R., Karttunen, L. and Zwicky, A.M. (eds.) (1985) Natural language 
	parsing: Psychological, computational and theoretical perspectives. 
	(Cambridge: University Press). 

Eeg-Olofsson, M. (1987) "Assigning new types to old texts - an experiment 
	in automatic word class tagging", in: Meijs, W. (ed.), Corpus 
	linguistics and beyond: Proceedings of the Seventh Inter. Conference 
	on English Language Research on Computer Corpora. (Amsterdam: 
Rodopi).  45-47.

Eeg-Olofsson, M., Svartvik, J. (1984) "Four-level tagging of spoken English", 
	in: Aarts, J. and Meijs, W. (eds.), Corpus linguistics: Recent 
	developments in the use of computer corpora in English language 
	research. (Amsterdam: Rodopi). 53-64.

Emanuelli, A.J. (1986) "Artificial intelligence and computer assisted language 
	learning", in: Fox, J. (ed.), Computer assisted language learning. 
	Special issue of UEA Papers in Linguistics. (Norwich: University 
	of East Anglia). 43-56.

Enkvist, N.E. (1964) "On defining style: an essay in applied linguistics", 
	in: Spencer, J. (ed.), Linguistics and style. (Oxford: University 
	Press). 1-56.

Fabian, B., Kranz, D. (1971) "Interne Kollation. Eine Einführung in die 
	maschinelle Textvergleichung", in: Martens, G. and Zeller, H. (eds.), 
	Texte und Varianten. Probleme ihrer Edition und Interpretation. 
	(Munich: Beck). 385-400.

Fallside, F., Woods, W.A. (eds.) (1985) Computer speech processing. (Englewood 
	Cliffs: Prentice Hall). 

Fox, J. (ed.) (1986) Computer assisted language learning. Special issue 
	of UEA Papers in Linguistics. (Norwich: University of East Anglia). 

Fox, J. (1990) "A microcomputer-based approach to training in second language 
	reading skills", Computer Assisted Language Learning 1: 29-40.

Francis, W.N. (1979) "Problems of assembling and computerizing large corpora", 
	in: Bergenholtz, H. and Schaeder, B. (eds.), Empirische Textwissenschaft: 
	Aufbau und Auswertung von Text-Corpora. (Königstein: Scriptor). 
	110-23.

Francis, W.N. (1980) "A tagged corpus - problems and prospects", in: Greenbaum, 
	S., Leech, G. and Svartvik, J. (eds.), Studies in English linguistics 
	- for Randolph Quirk. (London: Longman). 192-209.

Francis, W.N., Kucera, H. (1979) Manual of information to accompany a standard 
	corpus of present-day edited American English, for use with digital 
	computers. (Providence, R.I.: Department of Linguistics, Brown 
	University). 

Frude, N. (1987) A guide to SPSS/PC+. (London: Macmillan). 

Gabler, H.W., Kreitmair, W. (1986) "Der Computer als Arbeitshilfe für das 
	wissenschaftliche Edieren", in: Gregor, B. and Krifka, M. (eds.), 
	Computerfibel für die Geisteswissenschaften. (Munich: Beck). 203-11.

Garside, R. (1987) "The CLAWS word-tagging system", in: Garside, R., Leech, 
	G. and Sampson, G. (eds.), The computational analysis of English: 
	A corpus-based approach. (London: Longman). 30-41.

Garside, R., Leech, G. (1982) "Grammatical tagging of the LOB Corpus: general 
	survey", in: Johansson, S. (ed.), Computer corpora in English 
	language research. (Bergen: Norwegian Computing Centre for the 
	Humanities). 110-17.

Garside, R., Leech, G. and Sampson, G. (eds.) (1987) The computational 
	analysis of English: A corpus-based approach. (London: Longman). 

Gazdar, G., Mellish, C. (1987) "Computational linguistics", in: Lyons, 
	J. et al. (eds.), New horizons in linguistics, 2. (Harmondsworth: 
	Penguin). 225-48.

Gazdar, G., Mellish, C. (1989) Natural language processing in LISP. (Reading, 
	MA: Addison-Wesley). 

Gazdar, G., Mellish, C. (1989) Natural language processing in PROLOG: An 
	introduction to computational linguistics. (Reading, MA: Addison-
Wesley). 

Gazdar, G., et al. (1985) Generalised phrase structure grammar. (Oxford: 
	Blackwell). 

Goetschalckx, J., Rolling, L. (eds.) (1982) Lexicography in the electronic 
	age, proceedings of a symposium held in Luxembourg, 7-9 July, 1981. 
	(Amsterdam: North Holland). 

Greenbaum, S. (1990) "The International Corpus of English", ICAME Journal 
	14: 106-8.

Greenblatt, D.L. (1977) "Using statistics for the historical study of style", 
	Style 11: 251-61.

Greene, B.B., Rubin, G.M. (1971) Automatic grammatical tagging of English. 
	(Providence, R.I.: Department of Linguistics, Brown University). 

Grishman, R. (1986) Computational linguistics: An introduction. (Cambridge: 
	University Press). 

Griswold, R.E., Griswold, M.T. (1983) The Icon programming language. 
	(Englewood Cliffs: Prentice Hall). 

Grosz, B.J., Sparck-Jones, K. and Webber, B.L. (eds.) (1986) Readings in 
	natural language processing. (Los Altos, Calif.: Morgan Kaufmann). 

Halteren, H. van (1984) "User interface for a linguistic data base", ICAME 
	News 8: 31-40.

Harris, M.D. (1985) Introduction to natural language processing. (Reston, 
	Virginia: Reston Publishing Company). 

Hasemer, T. (1984) "An introduction to LISP", in: O’Shea, T. and Eisenstadt, 
	M. (eds.), Artificial intelligence: Tools, techniques and applications. 
	(New York: Harper & Row). 22-62.

Heather, N. (1987) "New technological aids for CALL", in: Rahtz, S. (ed.), 
	Information technology in the humanities: Tools, techniques and 
	applications. (Chichester: Ellis Horwood). 

Hidley, G.R. (1986) "Some thoughts concerning the application of software 
	tools in support of Old English poetic studies", Literary and 
	Linguistic Computing 1: 156-62.

Higgins, J., Johns, T. (1984) Computers in language learning. (London: 
	Collins). 

Hockey, S. (1985) SNOBOL programming for the humanities. (Oxford: 
	Clarendon Press). 

Hockey, S. (1986) "OCR: The Kurzweill Data Entry Machine", Literary and 
	Linguistic Computing 1: 63-7.

Hockey, S., Marriott, I. (1980) Oxford Concordance Program: Users’ manual. 
	(Oxford: Oxford University Computing Service). 

Hockey, S.M. (1980) A guide to computer applications in the humanities. 
	(London: Duckworth). 

Hofland, K., Johansson, S. (1982) Word frequencies in British and American 
	English. (Bergen / London: Norwegian Computing Centre for the 
Humanities / Longman). 

Hutchins, W.J. (1986) Machine translation: past, present, future. (Chichester: 
	Ellis Horwood). 

Ide, N.M. (1987) Pascal programming for the humanities. (Philadelphia: 
	University of Pennsylvania Press). 

Jackson, P. (1986) Introduction to expert systems. (Wokingham: 
	Addison-Wesley). 

Johansson, S. (1980) "The LOB Corpus of British English texts; presentation 
	and comments", ALLC Journal 1: 25-36.

Johansson, S. (ed.) (1982) Computer corpora in English language research. 
	(Bergen: Norwegian Computing Centre for the Humanities). 

Johansson, S. (1985) "Word frequency and text type: Some observations based 
	on the LOB corpus of British English texts", Computers and the 
	Humanities 19: 23-36.

Johansson, S. (1986) "ICAME Bibliography", ICAME News 10: 62-79. 

Johansson, S. (1986) The tagged LOB Corpus: User’s manual. (Bergen: 
	Norwegian Computing Centre for the Humanities). 

Johansson, S., Hofland, K. (1989) Frequency analysis of English vocabulary 
	and grammar, 2 Vols. (Oxford: Clarendon Press). 

Johansson, S., Jahr, M.-C. (1982) "Grammatical tagging of the LOB Corpus: 
	Predicting word class from word endings", in: Johansson, S. (ed.), 
	Computer corpora in English language research. (Bergen: Norwegian 
	Computing Centre for the Humanities). 118-46.

Johansson, S., Stenström, A.-B. (eds.) (1991) English computer corpora: 
	Selected papers and bibliography. (Berlin: Mouton de Gruyter). 

Johnson, R., King, M. and Tombe, L. des (1985) "EUROTRA: A multilingual 
	system under development", Computational Linguistics 11: 155-69.

Jones, A., R. Churchhouse (eds.) (1976) The computer in literary and linguistic 
	studies. (Cardiff: University of Wales Press). 

Jones, R.L. (1987) "Accessing the Brown Corpus using an IBM PC", ICAME 
	Journal 11: 44-7.

Jung, U. (1988) An international bibliography of computer-assisted language 
	learning with annotations in German. (Frankfurt-am-Main: Peter 
	Lang). 

Kempen, G. (ed.) (1987) Natural language generation: Recent advances in 
	artificial intelligence, psychology, and linguistics. (Boston, 
	MA: Kluwer Academic). 

Kenning, M.J., Kenning, M.M. (1983) An introduction to computer assisted 
	language teaching. (Oxford: University Press). 

King, M.(ed.) (1983) Parsing natural language. (New York: Academic Press). 

King, M.(ed.) (1986) Machine translation: The state of the art. (Edinburgh: 
	University Press). 

Kingscott, G. (1989) Applications of machine translation. A study for the 
	Commission of the European Communities. (Nottingham: Praetorius). 

Kipfer, B.A. (1982) "Computer applications in lexicography: A bibliography", 
	Dictionnaires 4: 202-37.

Knowles, G. (1986) "The role of the computer in the teaching of phonetics", 
	in: Leech, G.N. and Candlin, C.N. (eds.), Computers in English 
	language teaching and research. (London: Longman). 133-48.

Kraft, H. (ed.) (1990) Editionsphilologie. (Darmstadt: Wissenschaftliche 
	Buchgesellschaft). 

Kucera, H., Francis, W.N. (1967) Computational analysis of present-day 
	American English. (Providence, RI.: Brown University Press). 

Kytö, M. (1991) Manual to the diachronic part of the Helsinki corpus of 
	English texts. (Helsinki: Department of English). 

Kytö, M., Ihalainen, O. and Rissanen, M. (eds.) (1988) Corpus linguistics 
	hard and soft. (Amsterdam: Rodopi). 

Kytö, M., Rissanen, M. (1988) "The Helsinki Corpus of English Texts: Classifying 
	and coding the diachronic part", in: Kytö, M., Ihalainen, O. and 
	Rissanen, M. (eds.), Corpus linguistics. (Amsterdam: Rodopi). 
	169-80.

Kytö, M., Rissanen, M. (1992) "A language in transition: The Helsinki Corpus 
	of English texts", ICAME 16: 7-27.

Lancashire, I. (1991) The Humanities Computing Yearbook 1989-90. (Oxford: 
	University Press). 

Lancashire, I., McCarthy, W. (1988) The Humanities Computing Yearbook 1988. 
	(Oxford: Clarendon Press). 

Last, R. (1984) Language teaching and the microcomputer. (Oxford: Blackwell). 

Last, R. (1987) "Artificial intelligence - the way forward for CALL?", 
	in: Chesters, G. and Gardner, N. (eds.), The use of computers in 
	the teaching of language and languages. (Bath: University of Bath). 
	61-6.

Last, R. (1989) Artificial intelligence techniques in language learning. 
	(Chichester: Ellis Horwood). 

Leech, G., Candlin, C.N. (eds.) (1986) Computers in English language teaching 
	and research. (London: Longman). 

Leech, G., Garside, R. (1991) "Running a grammar factory: The production 
	of syntactically analysed corpora or "treebanks"", in: Johansson, 
	S. and Stenström, A.-B. (eds.), English computer corpora. (Berlin: 
	Mouton de Gruyter). 15-32.

Leech, G., Garside, R. and Atwell, E. (1983) "Recent developments in the 
	use of computer corpora in English language research", Transactions 
	of the Philological Society 32-40.

Leech, G., Garside, R. and Atwell, E. (1983) "The automatic grammatical 
	tagging of the LOB Corpus", ICAME News 7: 13-33.

Leech, G., Short, M.H. (1981) Style in fiction: A linguistic introduction 
	to English fictional prose. (London: Longman). 

Lehrberger, J., Bourbeau, L. (1988) Machine translation: Linguistic 
characteristics of machine translation systems and general methodology of evaluation. (Amsterdam: John Benjamins). 

Levy, M. (1990) Call bibliography. (Gold Coast, Queensland: Language Centre, 
	Bond University). 

Lewis, D. (1985) "The development and progress of machine translation systems", 
	ALLC Journal 5: 40-52.

Love, H.H.R. (1971) "The computer and literary editing: achievements and 
	prospects", in: Wisbey, R.A. (ed.), The computer in literary and 
	linguistic research. (Cambridge: University Press). 47-56.

Lusignan, S., J.S.North (eds.) (1977) Computing in the humanities. (Waterloo, 
	Ontario: University Press). 

Lyons, J., et al. (eds.) (1987) New horizons in linguistics, Vol.2. (Harmondsworth: 
	Penguin). 

Maegaard, B. (1988) "Eurotra: The machine translation project of the European 
	Communities", Literary and Linguistic Computing 3: 61-5.

Martin, W.J.R., Al, B.P. and van Sterkenburg, P.J. (1983) "On the processing 
	of a text corpus", in: Hartmann, R.R.K. (ed.), Lexicography: Principles 
	and practice. (London: Academic Press). 77-87.

McDonald, D.D., Bole, L. (eds.) (1988) Natural language generation systems. 
	(New York: Springer-Verlag). 

McTear, M. (1987) The articulate computer. (Oxford: Blackwell). 

Meijs, W. (1985) "Lexical organization from three different angles", ALLC 
	Journal 6: 1-10.

Meijs, W. (1986) "Links in the lexicon: The dictionary as a corpus", ICAME 
	News 10: 26-8.

Meijs, W. (ed.) (1987) Corpus linguistics and beyond: Proceedings of the 
	Seventh International Conference on English Language Research on 
	Computerized Corpora. (Amsterdam: Rodopi). 

Minsky, M. (1975) "A framework for representing knowledge", in: Winston, 
	P. (ed.), The psychology of computer vision. (New York: McGraw-Hill). 

Mitton, R. (1986) "A partial dictionary of English in computer-usable form", 
	Literary and Linguistic Computing 1: 214-5.

Moon, R. (1987) "The analysis of meaning", in: Sinclair, J. (ed.), Looking 
	up: An account of the COBUILD project in lexical computing. (London: 
	Collins). 86-103.

Morton, A.Q. (1986) "Once. A test of authorship based on words which are 
	not repeated in the sample", Literary and Linguistic Computing 
	1: 1-8.

Nirenburg, S. (ed.) (1987) Machine translation: Theoretical and methodological 
	issues. (Cambridge: University Press). 

Norusis, M.J. (1982) SPSS introductory guide: Basic statistics and operations. 
	(New York: McGraw-Hill). 

O’Shea, T., Eisenstadt, M. (eds.) (1984) Artificial intelligence: Tools, 
	techniques and applications. (New York: Harper & Row). 

O’Shea, T., Self, J. (1983) Learning and teaching with computers: Artificial 
	intelligence in education. (Brighton: Harvester Press). 

Oakman, R.L. (1980) Computer methods for literary research. (Columbia, 
	SC: University of South Carolina Press). 

Oostdijk, N. (1988) "A corpus linguistic approach to linguistic variation", 
	Literary and Linguistic Computing 3/1: 12-25.

Ott, W. (1973) "Computer applications in textual criticism", in: Aitken, 
	A.J. et al. (eds.), The computer and literary studies. (Edinburgh: 
	University Press). 199-223.

Ott, W. (1974) "Bibliographie: Computer in der Editionstechnik", ALLC 
	Bulletin 2: 73-80.

Ott, W. (1979) "A text processing system for the preparation of critical 
	editions", Computers and the Humanities 13: 29-35.

Ott, W. (1980) "Bibliographie: EDV im Editionswesen", Sprache und 
	Datenverarbeitung 4: 179-84.

Ott, W. (1990) "Edition und Datenverarbeitung", in: Kraft, H. (ed.), 
	Editionsphilologie. (Darmstadt: Wissenschaftliche Buchgesellschaft). 59-
70.

Ott, W.,Gabler, H.W. and Sappler, P. (1982) EDV-Fibel für Editoren. (Stuttgart 
	/ Tübingen: Holzboog / Niemeyer). 

Paikeday, T.M. (1985) "Text analysis by microcomputer", ALLC Journal 
	6: 29-32.

Piper, A. (1986) "Computers and the literacy of the foreign language learner: 
	A report on EFL learners using the word-processor to develop writing 
	skills", in: Fox, J. (ed.), Computer assisted language learning. 
	Special issue of UEA Papers in Linguistics. (Norwich: University 
	of East Anglia). 145-61.

Potter, R.G. (1988) "Literary criticism and literary computing: The difficulties 
	of a synthesis", Computers and the Humanities 22: 91-97.

Potter, R.G. (ed.) (1989) Literary computing and literary criticism. (Philadelphia, 
	PA: University of Pennsylvania Press). 

Quirk, R., Svartvik, J. (1978) "A corpus of Modern English", in: Bergenholtz, 
	H. and Schaeder, B. (eds.), Empirische Textwissenschaft: Aufbau 
	und Auswertung von Text-Corpora. (Königstein: Scriptor). 204-18.

Rahtz, S. (ed.) (1987) Information technology in the humanities: Tools, 
	techniques and applications. (Chichester: Ellis Horwood). 

Renouf, A. (1984) "Corpus development at Birmingham University", in: Aarts, 
	J. and Meijs, W. (eds.), Corpus linguistics: Recent developments 
	in the use of computer Corpora in English language research. 
(Amsterdam: Rodopi). 3-39.

Renouf, A. (1987) "Corpus development", in: Sinclair, J. (ed.), Looking 
	up: An account of the COBUILD project in lexical computing. (London: 
	Collins). 1-40.

Renouf, A. (1987) "Lexical resolution", in: Meijs, W. (ed.), Corpus linguistics 
	and beyond. (Amsterdam: Rodopi). 121-31.

Rich, E. (1983) Artificial intelligence. (Auckland and London: McGraw-Hill). 

Ritchie, G. (1983) "Semantics in parsing", in: King, M. (ed.), Parsing 
	natural language. (New York: Academic Press). 199-218.

Ritchie, G., Pulman, S.G., Black, A.W. and Russell, G.J. (1987) "A computational 
	framework for lexical description", Computational Linguistics 
	13: 290-307.

Ritchie, G., Thompson, H. (1984) "Natural language processing", in: O’Shea, 
	T. and Eisenstadt, M. (eds.), Artificial intelligence: Tools, techniques 
	and applications. (New York: Harper & Row). 358-88.

Ross, D., Rasche, R.H. (1972) "EYEBALL: a computer program for description 
	of style", Computers and the Humanities 6: 213-21.

Ryan, B.F., Joiner, B.L. and Ryan, T.A. (1985) Minitab student handbook. 
	2nd. edition.  (Boston, Mass.: Duxbury Press). 

Sager, N. (1981) Natural language information processing. (Wokingham: 
	Addison-Wesley). 

Sampson, G. (1983) "Deterministic parsing", in: King, M. (ed.), Parsing 
	natural language. (New York: Academic Press). 91-116.

Sampson, G. (1983) "Context free parsing and the adequacy of context-free 
	grammars", in: King, M. (ed.), Parsing natural language. (New 
	York: Academic Press). 151-70.

Sampson, G. (1987) "Probabilistic models of analysis", in: Garside, R., 
	Leech, G. and Sampson, G. (eds.), The computational analysis of 
	English. (London: Longman). 16-29.

Sampson, G. (1989) "How fully does a machine-usable dictionary cover English 
	text?", Literary and Linguistic Computing 4: 29-35.

Schank, R.C., Abelson, R.P. (1977) Scripts, plans, goals and understanding. 
	(Hillsdale, NJ: Lawrence Erlbaum). 

Schepers, H. (1981) "EDV-Erfahrungen einer Edition", Philosophisches 
	Jahrbuch 88: 159-164.

Schwob, A., Kranich-Hofbauer, K. and Suntinger, D. (eds.) (1989) Historische 
	Edition und Computer. Möglichkeiten und Probleme interdisziplinärer 
	Textverarbeitung und Textbearbeitung. (Graz: Leykam). 

Sedelow, S.Y. (1985) "Computational lexicography", Computers and the 
	Humanities 19: 97-101.

Self, J. (1985) Microcomputers in education. (Brighton: Harvester Press). 
	Shann, P. (1987) "Machine translation: A problem of linguistic engineering 
	or of cognitive modelling?", in: King, M. (ed.), Machine translation 
	today. (Edinburgh: University Press). 71-90.

Shannon, C.E., Weaver, W.W. (1949) The mathematical theory of communication. 
	(Urbana: University of Illinois Press). 

Shillingsburg, P.L. (1986) Scholarly editing in the computer age. Theory 
	and practice. (Athens, Georgia: University of Georgia Press). 

Sinclair, J. (1982) "Reflections on computer corpora in English language 
	research", in: Johansson, S. (ed.), Computer corpora in English 
	language research. (Bergen: Norwegian Computing Centre for the 
	Humanities). 1-6.

Sinclair, J. (1986) "Basic computer processing of long texts", in: Leech, 
	G. and Candlin, C.N. (eds.), Computers in English language teaching 
	and research. (London: Longman). 184-203.

Sinclair, J. (ed.) (1987) Looking up: An account of the COBUILD project 
	in lexical computing. (London: Collins). 

Sinclair, J., et al. (eds.) (1987) Collins COBUILD English Language Dictionary. 
	(London: Collins). 

Sloan, D. (ed.) (1984) The computer in education: A critical perspective. 
	(New York: Columbia University Press). 

Slocum, J. (ed.) (1987) Machine translation systems. (Cambridge: University 
	Press). 

Smith, M.W.A. (1983) "Recent experience and new developments of methods 
	for the determination of authorship", ALLC Bulletin 11: 73-82.

Sparck Jones, K., Wilks, Y. (eds.) (1985) Automatic natural language parsing. 
	(Chichester: Ellis Horwood). 

Spencer, J. (ed.) (1964) Linguistics and style. (Oxford: University Press). 

Steedman, M. (1983) "Natural and unnatural language processing", in: Sparck 
	Jones, K. and Wilks, Y.A. (eds.), Automatic natural language parsing. 
	(Chichester: Ellis Horwood). 132-40.

Svartvik, J. (1987) "Taking a new look at word class tags", in: Meijs, 
	W. (ed.), Corpus linguistics and beyond: Proceedings of the Seventh 
	International Conference on English Language Research on Computerized 
	Corpora. (Amsterdam: Rodopi). 33-43.

Svartvik, J. (ed.) (1990) The London-Lund Corpus of Spoken English: Description 
	and research. Lund Studies in English 82. (Lund: University Press). 
Svartvik, J., Eeg-Olofsson, M. (1982) "Tagging the London-Lund corpus of spoken English", in: Johansson, S. (ed.), Computer corpora in English language research. (Bergen: Norwegian Computing Centre for the Humanities). 85-109.

Svartvik, J., Quirk, R. (eds.) (1980) A corpus of English conversation, 
	Lund Studies in English 56. (Lund: Gleerup). 

Tallentire, D.R. (1976) "Confirming intuitions about style, using concordances", 
	in: Jones, A. and Churchhouse, R.F. (eds.), The computer in literary 
	and linguistic studies: Proceedings of the Third International Symposium. 
	(Cardiff: University of Wales Press). 309-38.

Taylor, L. (1988) Concordancing a corpus: A guide to concordancing
	machine-readable corpora on the Sequent Symmetry Computer. (Lancaster: 
	Department of Linguistics and Modern English Language, Lancaster 
Univ.). 

Taylor, L., Leech, G. and Fligelstone, S. (1991) "A survey of English 
	machine-readable corpora", in: Johansson, S. and Stenström, A.-B. (eds.),
	English computer corpora. (Berlin: Mouton de Gruyter). 319-54.

Thomson, N. (1989) "How to read articles which depend on statistics", 
	Literary and Linguistic Computing 4: 6-11.

Tollenaere, F. de (1973) "The problem of context in computer-aided 
lexicography", in: Aitken, A.J. et al. (eds.), The computer and literary 
studies. (Edinburgh: University Press). 25-35.

Tompa, F. (1986) Database design for a dictionary of the future, preliminary 
	report. (Waterloo, Ontario: Centre for the New Oxford English Dictionary, 
	University of Waterloo). 

Tribble, C., Jones, G. (1990) Concordances in the classroom: A resource 
	book for teachers. (London: Longman). 

Ule, L. (1983) "Recent progress in computer methods of authorship 
determination", ALLC Bulletin 10: 73-89.

Voogt-van Zutphen, H.J. (1989) "Towards a lexicon of functional grammar", 
	in: Connolly, J.H. and Dik, S.C. (eds.), Functional grammar and 
	the computer. (Dordrecht: Foris). 151-76.

Vossen, P. (1989) "The structure of lexical knowledge as envisaged in the 
	LINKS-project", in: Connolly, J.H. and Dik, S.C. (eds.), Functional 
	grammar and the computer. (Dordrecht: Foris). 177-99.

Vossen, P., Broeder, M. den and Meijs, W. (1988) "The LINKS project: Building 
	a semantic database for linguistic applications", in: Kytö, M., 
	Ihalainen, O. and Rissanen, M. (eds.), Corpus linguistics hard 
	and soft. (Amsterdam: Rodopi). 279-93.

Vossen, P., Meijs, W. and Broeder, M. den (1989) "Meaning and structure 
	in dictionary definitions", in: Boguraev, B. and Briscoe, E.J. 
	(eds.), Computational lexicography for the natural language processing. 
	(London: Longman). 171-92.

Wehrli, E. (1987) "Recent developments in theoretical linguistics and implications 
	for machine translation", in: King, M. (ed.), Machine translation 
	today. (Edinburgh: University Press). 58-70.

Weiner, E. (1985) "The New Oxford English Dictionary", ALLC Bulletin 
	13: 8-10.

Whitelock, P., et al. (eds.) (1987) Linguistic theory and computer applications. 
	(New York: Academic Press). 

Wilks, Y., et al. (1989) "A tractable machine dictionary as a resource 
	for computational semantics", in: Boguraev, B. and Briscoe, E.J. 
	(eds.), Computational lexicography for natural language processing. 
	(London: Longman). 193-228.

Woods, W.A. (1970) "Transition network grammars for natural language 
analysis", Communications of the Association for Computing Machinery 13: 591-606.

Zgusta, L. (1970) Manual of lexicography. (The Hague: Mouton). 

Glossary of Corpus Linguistic Terms

Note The following glossary is intended primarily as an assistance to those who are not very well acquainted with corpus linguistics but would nonetheless like to use the Lexa set in the analysis of linguistic data. The definitions are therefore geared first and foremost towards the matters discussed in the present documentation. For this reason some of the terms may be used slightly differently than in other literature on corpus linguistics. 

automatic and manual analysis  Basically any corpus processing software can carry out an analysis using information specified in advance, either by the computer operator or supplied to him/her from another source. This mode leads to automatic analysis of the linguistic data. If the decisions on analysis are made by the system asking questions of the computer user the mode is then manual. With the main programme Lexa the two modes as well as a combination of both are available. 

batch mode  A manner of starting a programme in which no user input is required or possible. The programme then executes automatically and returns to the operating system of its own accord. This mode has the advantage that the user does not have to be present during the execution of the particular programme or programmes. 

browse  Refers to the action of looking at data without processing them. Browsers (such as Lexa Browse) are thus programmes which allow one to survey the data on a drive for the purpose of quick orientation. 

case sensitivity  A parameter used in information retrieval programmes to determine whether lower and upper case letters should be distinguished during searches. If these are treated indiscriminately then the search is case insensitive. 

CD-ROM drive  A storage medium which is increasingly to be found with corpus linguistic data because of its very high storage capacity. The disk used is physically identical to a musical CD-ROM; the drive used can be linked up to the computer and run in a special mode to allow the processing of data like a normal disk. Recall that CD-ROM drives are read-only devices and that they are relatively slow compared to hard disks. For these reasons it is advisable to copy what one requires from the CD-ROM disk to hard disk before starting on corpus processing. 

character set  The group of symbols which are offered by the hardware of a particular computer. For all intents and purposes this is the IBM version of the extended ASCII character set for personal computers. This comprises 256 characters which contain the English alphabet, numbers, special symbols for the major European languages, some Greek letters, a few mathematical symbols and a set of graphical symbols used for framing and windowing on the screen of the personal computer. 

clipboard  An impressionistic term for an area of memory administered by a programme and which one can copy data to and retrieve data from on a temporary basis. Such a clipboard is provided by Lexa when editing a text online. 

Cocoa  A format for 32 parameters concerning the contents of a text file in a lingusitic corpus. It has been used widely, for instance to classify the contents of the files comprising the Helsinki corpus of diachronic English. Many items of corpus processing software such as the Oxford Concordance Programme and the Lexa set have special features for accessing the information in the Cocoa header which is placed at the beginning of each file in corpora which support this format. 

collation  A process in the critical editing of texts whereby different versions are compared by special software, highlighting differences and thus facilitating the preparation of a definitive edition of a text. 

comment  A section of a corpus file which is enclosed by special symbols, such as braces or square brackets, and which is ignored by the processing software. 

concordance  A file generated by special software in which the words of the input text are highlighted, frequently by centering these on each line (as a so-called KWIC, keyword in context) or by extracting these and placing them in a column on the left of each line (as a so-called KWOC, keyword out of context). A concordance may also contain statistical information on the input file or files. 

context  For the corpus processing possible with the Lexa set a context is any stretch of text enclosed by two words or strings which are specified by the user. A context in this sense does not have to correspond to a pre-defined syntactic unit but may do so if the user so chooses. 

corpus  Any body of coherent data collected according to pre-determined criteria which are laid down in advance. There are many types of corpora of which linguistic corpora are a subset. For the latter a corpus is a selection of a language variety at some particular chronological stage, e.g. the English of the United States in 1961 (taken as the basis for the Brown Corpus). In some cases several stages may be incorporated as with the Helsinki corpus of diachronic English. 

corpus management  The handling of the data from a corpus on a computer. Due to the size of a corpus, and frequently also to the number of files of which it consists, software is necessary for managing and not just processing corpus data. In the Lexa set the programmes in the Utility Library (see Vol.3 of the present documentation) are designed to fulfill this task. 

customize  The act of tailoring something to one’s own needs. Many programmes allow the user to determine their behaviour and/or appearence and so respond more accurately to the wishes of the computer operator. In the Lexa set customization is achieved by means of setup files for various programmes with which one can specify how input data is to be processed. 

data transfer  A procedure whereby data is moved from one type of processing environment to another. For instance in Lexa it is possible to extract data from input text files and deposit this in a database which can in its turn be processed, e.g. in lexical analysis. Data can also be re-transferred from a database to a text if necessary. 

database  A type of file which has a pre-defined structure. A database consists of a number of records (compare these with index cards), each of which consists of a number of fields (compare these with entry lines on a form). Each field has (i) a name, (ii) a given length and (iii) a specified type. These three parameters determine to a large extent the type of manipulation which can be carried out on the data contained in the records of a database. To process a database one uses a special type of programme known as a database manager. Within the Lexa set the particular programme is DbStat. 

delimited text  A type of text generated by a database manager in which the data from each record is contained on a single line of the output text. In addition the data from each field of a record is enclosed between two instances of a special symbol (specified by the user in advance) so that other processing software knows where each field in a line of the text file begins and ends. 

dictionary maintainance  The act of adding, subtracting or correcting data in the file which contains information on how to analyse corpus text files. With Lexa the ‘dictionary’ is called a lemma definition file as this descriptive term is more explanatory. This can be maintained by editing it with Lexa Text. The addition of information to the file can be achieved by editing files with Lexa, depositing information in the clipboard and then importing this into the lemma definition file (without exiting Lexa). 

DOS file template  A reference to possible files on the operating system level. A file template can contain wild cards, namely *, which stands for more than one unspecified character and ?, which stands for only one. The advantage of underspecified templates is that software can then process any of several files which might match the template passed to the operating system. 

escape sequence  A pre-determined character followed by another, the sequence of two characters then being interpreted literally. For instance in the Lexa initialization file a semi-colon at the beginning of a line is taken as a comment. If you precede this by a backslash, \;, then the semi-colon is interpreted literally, i.e. not as a comment. 

field  A division within a record of a database in which data can be entered. Fields have (i) a name, (ii) a set length and (iii) a certain type. 

file type  Files on personal computers vary according to the software which was used to generate them. For the user of corpus processing software the distinction between databases and text files is essential. Furthermore users should be constantly aware of the difference between an ASCII text, which has no formatting information, and a word processor which does contain such information and which is thus unsuitable as input for any of the Lexa data processing programmes. 

file list  A short text file which in its turn consists of the name of other text files with precisely one name on each line of the list file. The advantage of such files is that they can be used to list different files which the linguist would like to have regarded as belonging together even though there is no possibility of grouping them using DOS wild cards. Such a file list can be used as an alternative to a DOS file template by the information retrieval programmes of the Lexa group such as Lexa Pat, Lexa Context or Lexa Search. 

file header  A collection of items of information which is frequently placed at the beginning of a file. Databases always have such a header. Text files created with word processors such as WordPerfect or Microsoft Word also have headers (although with the latter programme the ‘header’ is at the end of the text file). Pure ASCII text files can also have headers, e.g. the files of the Helsinki corpus which contain information on the contents of each file in the Cocoa format at the beginning. 

frequency  A statistic which refers to the number of times some item occurs in an input file. When transferring data in Lexa from text files to a database the frequency of unique word forms is an important statistic which can be gathered cumulatively from several input files and deposited in a particular field of a lexical database generated by Lexa. 

front end  An impressionistic term for a user interface which acts as a communication line between the computer operator and some software which processes data in the background. 

horizontal  A term used, above all for one of the two versions of the Lancaster- Oslo-Bergen corpus, for an arrangement of corpus data on a line by line basis, i.e. as a text file. 

indexing  A procedure whereby a text file is generated which contains information on the offsets into a primary file for certain key words or fields. An index is often used with a database in which case it refers to a field of the record structure of the database concerned. When associated with a text file, an index refers to positions in the text file where certain elements, typically words, are to be found. The advantage of an index file is that the processing software can locate data very quickly by consulting the index, reading the offset which refers to the primary file and jumping to this location directly, i.e. without combing sequentially through the primary file. To increase speed, index files are always read into memory and maintained there, the processing software then accessing them when required. 

information retrieval  An area of data processing which is concerned with the swift and accurate finding of information in large bodies of data. Information retrieval is thus a central area of corpus processing and catered for by a variety of software types. In the Lexa set various programmes can be used to locate user-determined contents in corpus text files (Lexa Pat, Lexa Search, LexaContext). In a broader sense, information retrieval can refer to the processing of data in database form as the latter file type has many inbuilt functions for locating data accurately. 

initialization  A procedure frequently carried out by programmes to gain information on how they should be executed. Usually there are a series of internal parameters for a programme, e.g. an item of information retrieval software, which can be assigned values by consulting a setup file on starting. 

interactive  A term referring to a mode in which a programme operates. In this mode the user enters a dialogue with the programme and information for the execution of the latter is gained by the user making appropriate keyboard entries. 

KWIC  An abbreviation for keyword in context, see concordance. 

KWOC  An abbreviation for keyword out of context, see concordance. 

labelled bracketing  A procedure in the syntactic analysis (parsing) of input data in which hierarichal relations between elements of sentences are indicated by brackets enclosing those elements which are associated with each other. The outmost set of brackets correspond to the highest node in a graphical representation of syntactic relations and the innermost set to the terminal elements in a tree diagram. 

lemma  A term in linguistic data processing which refers to the label used to link up a set of word forms together. It is the equivalent of a lexeme in linguistics and represents a formal manner of identifying word forms as belonging to a given lexeme. A lemma is realized in Lexa as a tag which is appended to a word form which, going on a set of definitions in a separate ‘dictionary’ file, is seen to belong to this. 

lemma definition file  A file used by Lexa in which the lemmas, or types, are listed and with them the set of word forms, or tokens, which are to be associated with them during the procedure of tagging an input text file or files. 

lemmatise  The act of assigning word forms to a given lemma, usually by a process of tagging. 

lexical database  A database which is derived from an input text file or files and which contains as many records as there are unique word forms in the source for the database information. A lexical database is in effect a dictionary derived from a set of input text files. 

lexical density  A statistic on the relative frequency of word forms in an input text file or files. 

lexical data processing  A term referring to all the operations which can be carried out on linguistically relevant data. This term is often used contrastively with computational linguistics, a field which is concerned primarily with the automatic grammatical analysis of natural language, e.g. by simulating grammatical models with artificial intelligence languages such as Lisp or Prolog. 

line  A series of bytes in a text file which is terminated by two special characters, carriage return (ASCII $13) and line feed (ASCII $10). There is no formal structure to a line of text as opposed to the record of a database which is divided into fields of pre-determined name, length and type. 

log file  A file frequently generated to document the steps taken by some item of software, e.g. to keep track of the files linked together with Lexa Chain or the last file processed with Lexa Text. 

macro  A command within a programme which causes a series of commands to be executed. A subtype is the text macro, available in Lexa and Lexa Text, which causes a string of text to be processed on striking a single key or key combination, normally Alt and a letter. 

manual tag file  A file used by Lexa which contains a set of pre-determined tags. When editing a text online the user can choose a tag for a word form manually if the automatic tagging done by the programme gives unacceptable results. 

parse  The act of syntactically analysing a stretch of text. Parsers come is all shapes and sizes. Labelled bracketing is a common kind, see definition above. Parsing into trees is to be found with many dedicated programming language machines such as computers which work directly with an artificial intelligence language such as Lisp. 

pattern matching  The procedure of matching a search string or strings, entered by the user, against strings in a set of text files which have been selected as input. 

protocol  See log file. 

record  A unit within a database. In lay terms it can be seen as an index card which in its turn consists of fixed fields. In a bibliographical database for instance there would be as many records as index cards needed to register all the references in the database. An address database would contain as many records as persons whose addresses are listed in the database. 

search output A file, generated by many programmes of the Lexa set, which contains information on the results of a search run by the particular programme. The results are written to an ASCII file to allow users to browse through this at their leisure at some later stage. 

sentence  A syntactic unit which is not recognized by the computer, contrast this with the line which is the basic (unstructured) unit of the text file. Any attempt to define the sentence for corpus processing purposes must rest on formal criteria, see discussion in section on Lexa Context above. 

setup file  A small text file with values for parameters which are initializable in a certain item of processing software, e.g. Lexa and many other programmes of this set. 

stop words  Very common words, information on which is not required in a linguistic analysis of an input text file or files. To exclude these from an analysis (and thus speed up processing considerably) one passes a list of them to the processing software, e.g. Lexa, the latter then ignoring the words given in the list file. 

string  Any set of bytes. A string is frequently used in contradistinction to a word which is formally defined for corpus processing software as being delimited by certain characters. Searches usually refer to either strings or words. 

system-determined  Refers to the value of a parameter which is determined by the hardware or software one is using. The opposite of user-specified. For instance the maximum length of a line in an input text file for Lexa is 256. The user has no influence over this and so this value is referred to as system-determined. 

tag definitions  See lemma definition file. 

tagging  The act of appending tags to word forms in an input text file or files with corpus processing software such as Lexa. 

text file  Strictly speaking a file which consists of a number of lines of varying length, each terminated by a carriage return (ASCII $13) and a line feed (ASCII $10) character. 

text editor  An item of software which processes text files. The term is used in deliberate contradistinction to word processor as the latter processes files with formatting information. 

token  An instance of a certain lemma in a text file. 

type  Another term for a lemma in corpus processing software. 

unique word list  A list created by examining an input text file or files and which contains one and only one instance of each word. 

user-specified  Refers to the value of any parameter which can be determined by the user of some item of software. The opposite of system-determined. Information which is user-specified is conveyed to a programme either (i) by direct keyboard entry or (ii) by the programme reading a setup file. The first method is associated with an interactive mode and the latter with a batch mode of programme execution. 

vertical  A term used, above all for one of the two versions of the Lancaster- Oslo-Bergen corpus, for an arrangement of corpus data on the basis of one word per line with the grammatical information (tag, etc.) referring to each word on additional lines beneath the initial line. Such a version can be treated as a database with the lines corresponding to fields of a record. 

word  A particular type of string which is delimited by certain characters such as spaces, punctuation, beginning or end of a line, etc. Note that for corpus processing software there is no way of defining a word on semantic or morphological grounds. 

word processor  A special type of programme which is geared towards creating text files with many attributes for printing, such as page layout, special fonts or typefaces, etc. Such files are sharply differentiated from ASCII text files, the latter being the only type of file permitted as input to any corpus processing software such as the Lexa set. Note that ASCII text files can serve as input for a word processor but that one must avail of a special option within such a programme to save a text to disk as an ASCII text file and not as a file specific to just that word processor. 

Glossary of Computing Terms

Note This glossary contains more general terms concerning data processing in a wider context. Some of the definitions contained above are repeated here deliberately, a broader view on the terms being offered in the current glossary. 

abort  To terminate a programme entirely, to break off an action irretrievably. 

alphabetic commands  A command which is entered from the keyboard by spelling out the full text of the command. Not the type favoured in the Lexapackage. 

architecture  Refers to the overall design of a computer and includes both the hardware and the software which comprises the operating system. It does not refer to the application software which may be written for a certain computer. The architecture of the PC is characterized by its openness, i.e. expansion slots for adding peripheral cards and attaching peripheral devices at will. 

ASCII text file  A file which contains no formatting information and can thus be read by any text editor. Most word processors have a mode for reading and writing ASCII text files, i.e. for suppressing the formatting information, page layout, page breaks, typeface attributes, etc. which they normally include in the text files they create. 

Autoexec.bat  The name of a special kind of batch file which is processed on power-up after the computer has completed its self-test and DOS has been loaded. It contains the commands of programmes which are to be run before one starts working with the computer, for example a keyboard driver for German which enable ones to write with the special letters of German or the setting of a path of access to directories of the hard disk. 

backup  Refers to a file which is the last version processed and kept for security purposes; a copy of an original diskette; a procedure for generating such files/copies. 

binary  The adjective referring to the numerical system based on units of 2 as opposed to the decimal system, based on 10, or the hexadecimal system, based on 16. 

bit  A single data item which can have one of two values, 0 or 1, corresponding to voltage charges of plus or minus or a voltage difference where a threshhold is set above which the value 1 is assigned to a bit, below it 0. ‘Bit’ stands for binary digit. 

batch file  A specific type of file which contains a series of DOS commands (including the names of executable programmes) and which is processed when its name is entered from the operating system. 

blank  A blank space is a character for the computer, namely ASCII $32. This fact must be borne in mind when editing texts or entering commands, for example, as it serves as a command component delimiter when programmes parse user input. One can achieve the same visual effect as a blank by using an underscore, for instance in file names, e.g. by writing my_file.ini instead of myfile.ini which would be interpreted as two input components, i.e. my and file.ini. 

boot  The act of self-starting which the computer performs on power up. It is an abbreviation for "bootstrap loading". There are in fact two types of boot (i) a cold start which necessitates that power be off before the computer is started, (ii) a warm start (or soft reset) which resets the CPU and thus triggers the initializing routines of booting, though usually without the system memory test which is carried out with a cold start. To activate a warm start you must carry out a pre-defined set of keystrokes, normally ones which you are unlikely to do accidentally, i.e. by requiring the use of both hands. With the PC this set of keystrokes is Ctrl-Alt + Del. Sometimes when the system hangs a warm start is not enough to get it to function again. The reason for this is usually that a non-maskable interrupt has been triggered, irreversibly halting the CPU. 

byte  A series of eight bits joined together to give an ordered sequence which represents a number, thus the leftwardmost bit in a byte is the most significant bit, the rightwardmost one the least significant bit in a numerical sense. It is the basic unit of organization in the PC. Nearly all operations on the PC refer to entire bytes; occasionally one can access individual bits. 

buffers and files  A specification in the file CONFIG.SYS which is read by DOS on starting. It specifies how many buffer areas are to be defined in system memory and how many files can be used by DOS at any given time. Many programmes require that a minimum number of buffers and-or files be specified in order to operate with maximum efficiency. 

carriage return  An ASCII code value ($13) (i) which can be used in programmes for the purpose of affirming the choice of an option or saving data and (ii) which causes the head of the printer to move back to the left-hand margin of a page (this is where the element "carriage" comes from) and (iii) which in general functions as a symbol for a line break in a text file (see line-feed in this connection). 

case sensitive  Refers to the fact that upper and lower case letters are nottreated as the same in the execution of commands or instructions. If a programme has a differing interpretation of alphanumeric data according to whether it is written in capital letters (upper-case) or small letters (lower-case) then it is said to be case-sensitive. Frequently only the interpretation of certain types of data input is case-sensitive such as search strings used in Lexa Text. 

central processing unit  The heart of the computer; the central processing unit of a computer is often called a microprocessor or simply a processor. Be careful to distinguish this latter term for an item of hardware from "word processor" which is a term for an item of software, see relevant entry. The central processing unit is the main chip on the motherboard and consists of several component parts which carry out the operations necessary for the computer to function at all. At the very least it must contain an arithmetic and logic unit (ALU), a control unit (CU) and primary memory (different from system memory which is present in the form of banks of chips somewhere on the motherboard). Often abbreviated to CPU. 

character  (i) A term used to refer to a symbol used for screen display or printout or both. There are 256 characters in the IBM set used on the PC. (ii) A term used to designate a data type, for example in a database management system. The data type "character" thus refers to any symbols which are treated just as a screen display symbol and not as a symbol with arithmetical or logical value. 

close  In the technical sense the term "close" refers to the procedure of converting a file which is in system memory into file form, storing it on disk and removing any temporary files which the particular item of software may have created. Exiting a programme incorrectly (such as turning off the computer) means obviously that the data in system memory is lost; with some older programmes, however, it may also mean that the version of the file which one was processing is no longer accessible from disk when one starts the programme again. 

command interpeter  A file of the operating system, command.com, which is responsible for loading DOS and for interpreting commands entered at the DOS prompt. It is one of three files which is essential to have on a disk which you wish to boot from. The other two are so-called hidden files. 

command structure  The way in which commands are entered from the keyboard and carried out by a programme. There are various types of command structure varying from explicit menu-driven commands to function key commands. The programmes of the Lexa group exemplify both types. 

Config.sys  A file meaning "configuration of system" which is read by DOS on starting, the devices specified within it are then installed, such a RAM disk, the ANSI driver, or some other driver. 

configuration  A constellation of hardware elements, and perhaps software, to form a computer system. Due to the openness of the PC it can be assembled to result in various configurations, for example a certain size of system memory, a particular type of video card and monitor, a particular keyboard, etc. 

Ctrl-Z  One of the pre-defined key combinations of the operating system. It indicates the end of a file for DOS; this is a remnant from the old CP/M days and nowadays the end of a file is derived from the size entered in the file allocation table and not via a special character within a file. 

conversion programme  A utility supplied with a major programme allowing one to change files created with a different programme into the format necessary for the current programme. It may also change files produced in the code of a different operating system, e.g. in EBCDIC code on a mainframe into ASCII code for a PC. 

customized  Created, altered or set-up by the user. A customized version of a programme is thus one which has been tailored by the user to his/her personal needs. A customized screen-layout for example is one which has been created by some user and not been supplied by the manufacturers. 

data processing  A general term referring to the handling of information (text, numbers, graphics) on a computer and all that this entails. 

data input  The means by which data is passed to the computer. There are various possibilities here (i) directly from the keyboard or (ii) from another file which is read for this purpose. 

data structure  The way data is encoded by a computer. Data structure is not usually the concern of the user. However, in certain cases, e.g. when he/she tries to read a text file produced by a word processor which works entirely in a graphic mode with a non-graphic word processor he/she may become aware of the fact that similar screen display does not necessarily mean identical data structure for the computer. 

dedicated software  Any type of software which is designed for a specific purpose. A dedicated word processor is thus a programme which is designed as a word processor and not, say, as a module within an integrated software package. 

desktop  A figurative term used to describe the area at the user interface where one arrives on starting and from which one can undertake various operations. 

display  Refers to representation of data on the computer screen. 

DOS  Abbreviation for "disk operating system". In the PC universe refers to either PC-DOS or MS-DOS. 

DOS text file  A file which contains no formatting data specific to any application programme, i.e. only information which is acceptable to DOS, namely the beginning and end of the file and pure alphanumeric text inbetween organized as a series of lines terminating with a carriage return (ASCII $13) and line feed (ASCII $10) character. See ASCII file. 

eighth bit  The leftwardmost bit in a byte. If a system can only process 7-bit data then this bit is 0 or non-existent. The PC can of course process 8 bit data so that each byte can encode any of 256 characters (the IBM character set consequently contains 256 symbols). There is a common function for printers and for programmes which sets or deletes the eighth bit (i.e. sets the value of the leftwardmost bit in a byte to 1 or 0) should it be desired that a certain input results in an identical output but with the eighth bit reversed. 

Enter-key  The most commonly used key on the keyboard. Its function during word processing is to enter hard carriage returns into text; it has a further equally important function as the key denoting acceptance of a command suggestion or terminating an entry. The synonymous term Return key is also used. 

Escape-key  A key at the upper left-hand corner of recent keyboards (it was placed at the upper left-hand corner of the numeric block on the AT-keyboard). It normally has the function of backing out of a command at the last moment (hence the name). It is also used in a quasi-standard fashion for retracing one level back through a programme to a previous level. 

export  To send data from one programme to another programme of a different type. Because any one item of application software cannot normally read files created with another, special export and import facilities have to be offered to allow the user to continue processing files he/she has started on in another programme. 

extension  The three letters after the dot in a file name. There are typical extensions for DOS, such as .bat or .com. Application programmes often use characteristic extensions for the files they create, e.g. dBASE uses .dbf as an extension for its database files. There is no default extension for files in LexaText. 

facility  An option offered by a programme or an operating system to help the user in the realization of a particular intention. 

file manager  Either a part of a further programme (as with Lexa Text) or an independent programme which serves the function of optimizing file handling (listing, copying, renaming, erasing, etc.) over and above the very limited means supplied by DOS, cf. Lexa File. 

file  A sequence of bytes produced by a programme, stored on disk and which can normally be retrieved by a programme for editing. A file has a beginning and an end. An entry in the disk directory tells the user that the file exists and an entry in the file allocation table of the disk tells the system how the file is physically distributed over the disk medium. Note that in the narrower sense a file is always the product of a programme (database management system, word processor, spreadsheet, etc.). In a more general sense it is any coherent sequence of bytes with a beginning and an end and a name in the directory of the disk, e.g. it can be a programme file. 

file template  A specification used by DOS to search for files. It may contain so-called wild cards which can be matched by either one (‘?’) or more than one (‘*’) letter, e.g. *.txt, letter?.doc. A file template can be used on various levels, for instance, when running the file manager in Lexa Text or when entering a command from DOS with one or more parameters. 

file types  Starting from the broader sense of file (see above) one can distinguish various types of file (i) .exe files or .com files which are loadable programmes, (ii) overlays which are part of a programme which are only loaded into system memory when necessary (as a means of economizing on memory use), (iii) various other files which belong to a programme, e.g. an initialization file, a help file, (iv) files produced by a programme. This latter type may be subdivided into various categories, as is for instance the case with DbTxt for instance, which distinguishes many different file types such as .dbf-files (actual databases), .dbx-files (indexes), .txt-files (delimited text files), etc. 

formatting data  The data which indicates how a document has been formatted with a particular programme. This data can usually be removed from a text file to yield a DOS text file (or ASCII file) which can then be read by any other programme without being converted. 

formatting  The act of specifying information on screen attributes (italics, boldface, etc.), page layout (left and right margins, spacing, length of page) for a particular document in a programme (usually a word processor). 

function key  One of the twelve (formerly ten) keys positioned as a row on the top of the keyboard. These keys are non-alphanumeric keys which are assigned command values in programmes. Precisely what values they have depend on what programme one is using. There is little or no standardization in this area apart from the use of F1 for online help. 

gateway  Refers to the facilities provided by a particular programme to read (and usually write) files in the format of another programme and-or in the format of another operating system. 

graphics card  A type of video card which is capable of bit-mapping screen representation. There are basically two type of graphics card, a monochrome one (the Hercules card) and a colour one (nowadays the VGA adapter). 

hard disk (fixed disk)  A storage medium consisting of a number of hard disks within a sealed case. The surface of the disks is very smooth and the distance of head to disk surface very small and the speed of rotation is measured in thousands of revolutions per minute (compare this with the speed of floppy drives with 360 rpm usually) so that a much higher storage capacity and quicker access is the result. 

hardware  All the physically solid parts of the computer. The opposite of software, the programmes, operating system, etc. The term firmware refers to information which is non-transiently encoded in chips but which can be erased if necessary. 

help facility  A file connected with a certain programme which can be run from within the programme for the purpose of offering on-the-spot screen-displayed explanations of programme functions. With smaller programmes this can just be a single screen (whose contents are not loaded from a separate file), see the various descriptions of programmes above. 

hex(adecimal) notation  A means of representing numbers or characters (such as those of the IBM character set) in hexadecimal digits. Thus the ASCII code "27" (= Escape) can be written "1B" in hexadecimal notation. Conversion tables for hexa-decimal to decimal and back are often included as appendices to printer or computer manuals and should be consulted when the specification of codes, such as printer commands, are given in hexadecimal notation. 

hexadecimal  The numbering system which uses 16 as its base. The digits are labelled 0 through 9 and A through F. In a hexadecimal system 256 numbers can be characterized using two digits, i.e. from 00 (=decimal 0) to FF (=decimal 256). 

highlighting  A means of making a choice in a menu-driven command structure. Of the series of options to choose from one will be displayed in inverse video, i.e. in the highlighted mode. By the using the cursor keys one can move the "highlight bar" up and down the list of choices and press the Enter key when it is positioned on the choice one wants to make. 

IBM character set  A set of 256 characters which is to be found in the character generator on the video card of a PC. Good printers can reproduce at least the numbers 32 to 254 of this set. Only a fraction of the set is alphanumeric. 

import  To take in data into one programme which has been processed on another, e.g. between word processors. There is usually a conversion facility for allowing this importing to take place. 

indexing  In general a process of creating a file which contains specific information on locations in another data file. A programme can then use this index file to find sections of the main data file faster than combing sequentially through the latter. 

integrated software  Software which contains several programmes of different types. It is usual in integrated software for the PC that a word processor, a database management system and a spreadsheet be included. A graphics and telecommunications section may also be present. 

interaction  A means of communicating with the user whereby the programme makes a series of suggestions which are accepted or rejected by the user, this leading to further suggestions and so on. Widely used in the Lexa set of programmes. 

interface  The common boundary between two devices, systems, subsystems, or the user and a system. The term also refers to an instrument which arranges for the transfer of data from one device to another, e.g. between the computer and a certain kind of printer. 

log in  A general term used to specify a certain device as the current one, for example to specify that drive C: is the one you wish to work with; it can also be used in networking to denote a file or transmission line which one has started to use. 

lower-case  Letters which are not written as capitals, i.e. small letters. In the ASCII code lower-case letters are 32 places above the corresponding upper-case letters which means that conversion from lower to upper-case is a simple process of subtracting 32 from the value of the small letter. 

lower ASCII area  The symbols from $0 to $127. They consist of printer control codes ($0-$31), alphanumeric characters ($32-$126) and the delete character ($127). There is a high degree of standardization in the use of these characters as opposed to that of the upper ASCII area. Systems which can only process this set of characters (i.e. not the upper area as well) are referred to as 7-bit systems as the eighth bit cannot be set to identify another 128 characters. 

lpt1, lpt2  The abbreviations which DOS uses for the two parallel devices (usually printers) which can in principle be connected up with a PC. 

macro  A set of commands linked together to form a file and able to be called by one keystroke or a combination of two keystrokes. Macros proper allow the specification of those keystrokes which trigger functions in the programme for which they are written. There is a quasi-convention among manufacturers of application software that the Alt-key in combination with a further key be used to activate macros. 

memory-oriented  Refers to a method of file handling in a programme which does not offer any facility for spill over onto disk. For this reason there is always an upper limit on the size of files which can be processed. 

menu bar  A row on the top of the screen which contains the names of certain command groups which can be chosen (or pointed at with a mouse, for example) leading to a pull-down menu appearing which contains the individual commands of a group. 

menu-driven  Refers to one of two main types of command structure. With this type the user is presented with a window on the screen in which is contained a list of options; by moving the so-called highlight bar to the option he/she wishes to choose and pressing return, he/she activates the particular function. The opposite of menu-driven is alphabetic. 

operating system  A set of programme files which are loaded by the computer on starting and which represent the software part of that information which the computer requires to be able to function in the first place, e.g. to load other programmes, to read and save files, to deal with the keyboard and the screen, etc. Note that the operating system, abbreviated to DOS, uses part of system memory so that in a computer with 640K you do not have 640K free for application programmes but something under 600K after the system has been loaded. 

mouse  An electronic pointing device which looks somewhat like a mouse and which has a ball underneath it which sends a signal to the computer via a cable when the mouse is moved, this then moving a small arrow over the screen which can be used to activate pull-down or pull-up menus. 

naming files  The action of giving a file a name. One must specify a name when saving a file for the first time within a programme. One can also alter the name of a file on the DOS level. The name of a file consists of up to 8 letters or digits and an optional extension of up to three letters or digits (the extension); not all punctuation marks can be used in file names. Programmes often produce files with typical extensions, while others allow the user to determine these him/herself. 

parameter  An item of information, typically the name of a file, which is passed to a programme when this is loaded. In this case one also speaks of a command line parameter; in DOS such parameters are typed (separated by blanks) after the name of the programme to be called. 

parent directory  The name of a directory which is one level above the current one. If you are one level down in the tree structure of your disk then the root directory will be the parent directory. If you are further down then the parent directory will be some user-created directory. 

path variable  A DOS command which specifies what subdirectories can be accessed in the search for programmes which meet the commands entered from the keyboard; DOS always searches the active directory first and then the directories in the path variable in the order in which they are specified, usually in the file AUTOEXEC.BAT. 

PC  An abbreviation for personal computer. Now it has come to mean any computer built around the Intel 8088 processor (or a successor of this) and all that this implies in terms of hardware and software. 

port  An output socket in a computer. It exists as hardware (the actual socket) and as software (as an output destination, e.g. LPT1, COM1, etc.). The parallel port is used for the printer normally and may either be attached directly to the motherboard of the computer or be on the video card (in the case of a graphics card like the Hercules card). The serial port is used for some types of printer and for communication purposes. Virtually all PCs have a parallel port and a serial one as well. 

printer codes  Refers to some of the ASCII codes below $32 which are interpreted by the printer as commands and not as text to be printed. For example, ASCII $14 is interpreted by all printers (in the Epson ESC P standard) as a command for "go into headline mode until the next carriage return", and not as an instruction to print a symbol which looks like ASCII $14 in the IBM character set (two musical notes). 

protocol  A set of conventions which regulates the exchange of data across communication lines. 

Qwerty  A way of referring to how the alphanumeric keys are arranged on the keyboard. The "qwerty" arrangement is that for English; "qwertz" is that for German, where the positions of "z" and "y" are exchanged, among other things. 

random-access memory (RAM) area   An abbreviation for "random access memory" as opposed to "read only memory" (abbreviated as ROM, see relevant entry). What is meant here is that the memory can be used again and again, i.e. it is memory which can be read from and written to at will. 

resident  Refers to a programme which is loaded and maintained in system memory even if another programme is loaded after it. Resident application software can usually be activated by some specified combination of keys which cause the resident programme to take over the user interface temporarily until released into the background again. 

restore  A DOS command which replaces files, copied from a hard disk to a floppy disk, back to a hard disk again. In general the term refers to any procedure for transferring data back from diskettes to hard disk. 

Return-key  See Enter-key. 

root directory  The main directory of a disk; the top directory below which all others are arranged. Shown at the prompt and addressed as "\". 

RS-232C  A standard for data transmission via the serial port of the computer. 

saving  The act of moving a file from system memory (which is temporary) to a disk (hard or floppy) which is permanent as long as one does not overwrite it. 

serial  A type of communication in which data is transferred item for item and not in parallel. 

setup  A number of parameters which are specified either on starting the computer or on starting a programme and which specify one’s choice in a set of options; setup parameters can often be determined by an initialization file (as with Lexa). 

software  Any data or programmes which are only available in the form of magnetic patterns on a disk and which need to be read into system memory before being processed or run. 

startup file  Any file which is loaded into system memory (and does something, for instance offers the user file management or word processing facilities) when the user types the letters (on the DOS level) before the extension (always either .com or .exe) and presses Return. A startup file is what one normally terms a programme. 

subdirectory  On a disk a directory which is located below the root directory. On hard disks there are usually several subdirectories which are arranged in a hierarchy which is intended to reflect the data which is kept in them. 

switch  A qualifier which one adds to a DOS command to be more specific about what you want it to do. For instance, format is a command which can take a switch /s meaning that the system files of DOS are to be transferred to the newly formatted disk as well. Similar switches can be used with many programmes of the Lexa group, particularly when they are being called in the so-called batch mode. 

system memory  The memory on the motherboard of a computer. Typical values are 512k or 640K. Under the present version of DOS (5.0) the maximum directly addressable system memory allowed is still 640K. Under modern operating systems like Microsoft Windows there is no limit on system memory. 

template  (i) A skeleton file which has certain parameters set but does not contain any data. (ii) A specification for DOS containing one or more wild cards which the operating system then attempts to match with actual files e.g. *.*, my???.txt. 

text area  A section of system memory which is managed by a programme (e.g. Lexa Text) and which contains the contents of a single file; such an area is kept distinct from others which may be used to store the contents of other text files temporarily. 

text editor  A type of editor which deliberately makes no provision for formatting data (page layout, character attributes, etc.) as the files you edit with such a programme are not intended primarily for printing. The output of a text editor is always ASCII text. 

toggle  A type of switch which has the function of reversing a state, i.e. turning something on if it was off and off if it was on. 

upper-case  Lettering which is entirely in capitals. 

upper ASCII area  The area of ASCII characters from $128 to $255. 

user interface  A term which refers to the way a programme presents itself to a user, what it looks like on the screen, the commands put at his/her disposal, the level at which he/she can communicate with the programme. 

user-specified  The opposite to system-determined. Any aspect of a programme which the user can decide on him-/herself, frequently during a so-called set-up procedure at the start of the programme or by calling a programme like Lexa with an initialization file from which it takes user-determined values for various parameters. 

utility  A small programme supplied either as part of a group or with a larger programme or as a complement to the operating system to perform some specific function, e.g. the programmes Lexa Chain and Lexa UnChain supplied with Lexa. 

wild cards and jokers  Synomymous terms for symbols used to leave information unspecified which can then be matched by the system (usually on the DOS level). For the operating system there are two wild cards, ? and *. The first is used to leave one character unspecified and the latter to leave more than one. This is very useful if one wants to increase the scope of a command to include any files which match a certain file template with a wild card, e.g. entering dir *.txt will result in a listing of all files with the extension .txt, irrespective of what comes before it. An example of the question mark wild card would be copy letter? doc a:\ which would copy all the files beginning in letter, having one character after this, e.g. a number, and with the extension .docto drive A:. 

word processor  A type of editor whose prime aim is to produce neatly printed text. Such programmes use a lot of additional information (apart from actual text) to control the output on the printer. A consequence of this latter fact is that files produced with one word processor cannot be read automatically by another unless they are first converted to ASCII text (with the loss of formatting information). 

Appendix A	User input editor

Preamble. You will have noticed that at various points within many of the programmes of the Lexa group that you are prompted via a window or a line to enter something from the keyboard as part of a command which is about to be carried out. Typical examples are the provision of file names or directories for file creation or copying operations. In all these cases an internal editor is called which has a small set of commands which are the same in all instances. The purpose of the present section is to describe this mini-editor. 

Return  Pressing this key when within the User Input Editor causes the entry to be terminated and the current command to continue to the next step (which may be its execution). 

Escape  Used to abort the current command. Even if there are several prompts involving the User Input Editor pressing the Escape key at any point leads to the entire command being cancelled and the controlling programme returning to the point immediately before the initiation of the cancelled command. 

Up Arrow  Any command involving the User Input Editor can be executed several times. To obviate the necessity of having to repeat an entry which was already made for a former run of the command the arrow keys have been programmed so that they scroll backwards (Up Arrow) or forwards (Down Arrow) in the list of previously entered commands. If you scroll in the list and arrive at an entry which you wish to adopt for the present run of the command, you can simply press Return or edit this entry just like a fresh one. 
	Note that there is a fixed length for every input line which in all instances is determined by the horizontal size of the input window/line. No characters beyond this will be accepted from the keyboard. You may of course delete characters and re-enter some if you wish. 
	The number of commands which can be stored in the command list varies between 8 and 32. 

Down Arrow  Used to scroll forwards in a command list. If you are at the front end of the list anyway, no action is taken. Should the list be full, pressing the DownArrow key displays the first command after the last command in the list. 

Left Arrow   Moves the cursor to the left within the input window/line. You cannot move off the left edge of the window. 

Right Arrow   Moves the cursor to the right within the input window/line. You cannot move off the right edge of the window or beyond the last letter of the present input line. 

Home  Jumps to the beginning of the input line. 

End  Jumps to the end of the input line. 

Ctrl-End  Deletes the section of the input line from the present cursor position to the end of the line including the character under which the cursor is presently resting. 

Delete  Deletes the character under which the cursor is presently resting. 

Backspace  Deletes the character immediately to the left of the cursor. This keystroke has no effect at the beginning of a line. 

Insert  This is a toggle which switches back and forth between the insert and the typeover keyboard input modes. 

Notes.  The key used to terminate an entry (either the Return or Escape key) is not considered part of the entry. 
	In some cases a programme fills the input line in advance with a default value which is that the user is assumed to want most frequently (e.g. A:\ as target of a copying operation). This value can of course be edited. 
	Uppercase letters may appear when one is retrieving a previous command from the command list. You may mix lowercase letters with these (if you are editing part of a previous command (e.g. as in C:\TC\ATOOLS -> C:\TC\afonts) as the input line editor is (nearly) always insensitive to case. 
	The video attribute used in the input window/line is purely visual and irrelevant to the operation of a command. 

Appendix B	Directory lister commands

In several of the Lexa programmes an internal directory lister is available (e.g. when you are choosing a text database in Corpus Manager). This serves the purpose of allowing users to choose files in a comfortable and flexible manner. To this end a number of commands have been included which apply to all instances of the directory lister. 
	First of all you notice that the screen is cleared and two windows are to be seen, a window with a listing on the right of the screen and a long horizontal window in the centre. The latter always displays the directory from which the files in the listing are derived. When first called the directory displayed here will be the current one for the current drive. 

A highlight bar rests on the first item in the listing and can be moved downwards. In all you have the following navigation keys at your disposal: 

	Up/Down Arrow	Up/down an item in listing
	PageUp/Down	Up/down a windowful of files
	Ctrl-PgUp/PgDn	Beginning or end of listing
	Letter Search		Type the first few letters of the file you want
				and the highlight bar jumps to the next match

Alternatively you can use the mouse by placing the mouse cursor on either _ or _ to move up and down in the listing respectively and pressing the LeftButton. 

Viewing files without leaving directory lister

F2  View file Allows you to view the file the highlight bar is resting on. Calls Lexa View. Will work with any type of file; an automatic return to the calling programme is made. 

Note If the currently highlighted file is a dBASE database then the database viewer DbLook is called instead of Lexa View. 

Shift-F2  Edit file Allows you to edit the file the highlight bar is resting on. Calls Lexa Text; an automatic return to the calling programme is made. 

Ctrl-F2  Hexedit file Allows you to hexedit the file the highlight bar is resting on. Calls Lexa Hex. Will work with any type of file; an automatic return to the calling programme is made. 

Changing directory or drive

To change directory press the Return key when the highlight bar is located on a directory entry, either a name, e.g. [MY_DATA] for a subdirectory or the word « Parent Dir » for the directory immediately above the current one. 
	To log in a new drive place the highlight bar on an entry with a drive letter, e.g. »     A:     « and press Return. 
	Instead of using Return you can position the mouse accordingly and click the LeftButton. 
	When you change either directory or drive or both the new current directory is reflected in the horizontal window in the centre of the screen. 

Shift-F4  File template. You enter the template you want in the horizontal window and press Return. Display is refreshed and any matching files are shown. 

Shift-F9  Show full details of file in listing Pressing this combination shows the entire information on the currently highlighted file from the listing in the horizontal window, i.e. file size, date and time it was last archived. 

File choice or command cancellation

To choose a file simply press Return when the highlight bar is located on it. If you use Escape then the file choice operation is aborted and returned to where you left off in the current programme. 

Appendix C	Mouse support

A Microsoft mouse (or a compatible one) can be used with the main programme of the Lexa package and most of the minor ones as well. The principle behind mouse support is very simple. A cursor appears in the centre of the screen when the programme is loaded. Moving the mouse causes this block cursor to move around the screen. To activate a command with the mouse, move the block cursor to the text of a command (e.g. to a line of a window menu) and press the left button. 
	In a menu of options or in a directory listing you can move the highlight bar to a particular item by moving the cursor and clicking a button. Note in this connection that a mouse click moves the highlight bar and also carries out the option concerned. What this in practice means is that the use of the mouse has the effect of both moving the bar with an arrow key and then pressing Return. 
	In many situations the mouse buttons are differentiated. If this is the case then the following settings hold: 

	Left Button	=	Return
	Right Button	=	Escape

When a window with options is opened and you click a button when the mouse cursor is located outside of this window then the latter disappears (this is functionally equivalent to pressing the Escape key). 

On slide bars

In any window listing, be it online help, a directory list or a disk tree structure, a slide bar can be recognized on one edge of the window. At the top of the bar is an arrow pointing upwards and on the bottom another arrow pointing downwards. If you move the mouse cursor to one of these arrows and click a button the highlight bar moves in the expected direction. Furthermore holding a mouse button depressed causes the action to repeat (until you release the button again). 
	When a list scrolls in the window the dark block in the slide bar moves either upwards or downwards. This block gives a visually effective indication of where the currently highlighted item is in the list (towards the beginning or end). 

Answering to prompts with a mouse

Users should furthermore note how to respond with the mouse when requested to press a key: at any time when you are offered a choice which is to be decided upon by pressing a key you may use the mouse to achieve this. In each case a prompt line appears and after or below it the following text:  [ y | n | Esc ]. Here you can move the mouse block to within the delimiters of the option you want and click the left button. Say you wish to accept an option then you do not necessarily have to position the mouse block on the letter y. It suffices to locate it between the square bracket and the broken vertical bar in which the y is enclosed. The same applies to the n and Esc responses to the prompt.