Converting a PRD File with Endings

Posted by Jean Ichbiah , Sun, Dec 13, 1998, 21:23:24 Reply   Forum


If you are using a lot of endings, there is another way of using the Importer to convert a PRD list into an Instant Text glossary. Rather than working directly with the pp2 file, you can use the PRTPRD utility that comes with PRD to print the list to a text file. Then you can edit the text file to have formulas that can be processed by the Importer. Here are the steps.

Produce a text file from the pp2 file:

  1. Run PRTPRD.COM in a Dos Window

  2. Set PRTPRD with:
    File: the pp2 file name
    Sort: Short form
    Page: 58 lines
    Double: No
    Endings: Yes
    Linefeed: Yes
    Wait: No
    Output: Disk (give the name for the text file to be produced)

  3. Choose the GO command from the PRTPRD menu to produce the text file.

Editing the printout

The listing produced by PRTPRD will look as follows:


inh inhaler
inj inject
injd injected
injg injecting
injs injects
injn injection
injns injections
inl initial
inll initially
inla inferolateral
inme inferomedial

As you can see, entries with endings are immediately after the normal entry but start with a space. The next step is to eliminate that space. For example, in MS Word, you can do it by a replace command:

    Edit/Replace Find What: ^p^w Replace by: ^p

What this says is to replace a hard return (^p) followed by space (^w) by a simple hard return. After this it will look like:

inh inhaler
inj inject
injd injected
injg injecting
injs injects
injn injection
injns injections
inl initial
inll initially
inla inferolateral
inme inferomedial

Then we convert them into formulas by a succession of replace commands:


    Edit/Replace Find What: 9 spaces Replace by: =

    Edit/Replace Find What: 8 spaces Replace by: =

    Edit/Replace Find What: 7 spaces Replace by: =

    Edit/Replace Find What: 6 spaces Replace by: =

    Edit/Replace Find What: 5 spaces Replace by: =

    Edit/Replace Find What: 4 spaces Replace by: =

    Edit/Replace Find What: 3 spaces Replace by: =

This produces formulas:


inh=inhaler
inj=inject
injd=injected
injg=injecting
injs=injects
injn=injection
injns=injections
inl=initial
inll=initially
inla=inferolateral
inme=inferomedial

Finally, you can save it as text.

Using the Importer

Now you can use the Importer to import the formulas and a second
time to condense the resulting glossary.

Notes

If you have only a few endings, you are better off using the normal method of importing directly the pp2 file and modifying the resulting glossary. The above method only pays if you have a lot of endings.



Edit | Reply | | | |   | Current page |