%
% This file contains some KANA-KANJI characters.
%


		 Installation and Execution Procedure
				 for
		  Japanese Sentence Generation Tool
				   
			   version cesp-0.3
				   
			      1992-06-01
				   

1. Install

(0) The CESP system (above version 3.0) is required because JG is
written on CESP.  Also you are recommended to have some knowledge
about Japanese grammar to use JG.

Moreover you must have a software which can handle Kanji-Kana
characters, for instance Nemacs(Nihongo Emacs)
 and Kterm in the X-window system.

You can get "Nemacs" from the major ftp sites in Japan. Kterm is 
one of the contribution softwares of X11R4 and X11R5.


(1) You can see the following directories and files under the current
directory.

  --  mjg (contains programs and some documents)
	a_aspect.esp    a_polite.esp    disp.esp        o_tablek.esp
	a_engine.esp    a_voice.esp     ikari.esp       u_list.esp
	a_expand.esp    c_load.esp      jg_demo.esp     u_prolog.esp
	a_gojun.esp     c_opera.esp     o_engine.esp
	a_modal.esp     c_subset.esp    o_table.esp

	cat_all.com

	std_macro.txt
	text.dat
	simple-man.j

  -- jgdict ( dictionaries for JG)
	jg_dic_adj.cil  jg_dic_app.cil  jg_dic_n.cil    jg_dic_r.cil
	jg_dic_adv.cil  jg_dic_aux.cil  jg_dic_v.cil

(2) Please edit the file "mjg/c_load.esp " as the following.

======================================  mjg/c_load.esp ===========
(Line Number)
    15  class jg_dictionary has
    16    nature
    17          cil_operator;
    18
    19    attribute
    20          directory,
    21          file_list,
    22          dictionary,
    23          input_file;
    24
    25          :setup(Class):-
    26
    27  %%%%%%%%%%%
    28  % Direc $B$NCM$r!"<-=q$,$"$k%G%#%l%/%H%j$K@_Dj$9$k!#(B
    29  %
    30  % Set the variable "Direc" to the directory which .....
    31  %%%%%%%%%%%
    32              Direc = "/usr/icot/cesp/fgcs/jgdict",  <-- edit here
    33				
    34              File = [
    35                      "jg_dic_v.cil",
    36                      "jg_dic_adj.cil",
    37                      "jg_dic_adv.cil",
    38                      "jg_dic_app.cil",
    39                      "jg_dic_aux.cil",
    40                      "jg_dic_n.cil",
    41                      "jg_dic_r.cil"
    42
    43                      ],
===============================================================
(NOTE: line 28 contains "KANA-KANJI characters")

Replace the string which is the right side of "Direc" on No.32 line to
the correct value according to the name of the directory where the
dictionaries for JG are put.


(example) When the dictionaries are located in
/usr/tanaka/cesp/jgdict, you should replace the No.32 line with:

   Direc = "/usr/tanaka/cesp/jgdict",


(3) Please change the current directory to "mjg"(or check if the current
   directory is "mjg")

After checking it, let the CESP system start.

In the following example, CESP starts as a subprocess of
Nemacs(Nihongo Emacs).

===================================================================
% nemacs

(In nemacs, CESP started)

------CESP buffer of Nemacs-------

Current directory is /usr/icot/cesp/fgcs/mjg/

       ======                                   ======   =======   =======
      //                                       //       //    //  //    //
     //     ----  ----  ----  ----  ----      /_____   (______   //____//
    //     /   / / / / / / / /   / /   /     //              // //
   (_____ (___/ / / / / / / (___/ /   /     (______   (_____// //

                CESP Version 3.2  [1991-Nov-11 12:00:00]  with X11r4/Kanji
                Copyright (C) 1991 by  AI Language Research Institute  LTD.

CESP>
===================================================================

(4) Invoke the librarian  and execute a command file named 
"cat_all.com"

"cat_all" catalogues all programs of JG and save them.

===================================================================
CESP> librarian         <--- Your input
LIBMAN>@cat_all   <--- Your input
LIBMAN>catalogue u_list.esp u_prolog.esp ikari.esp c_load.esp
c_opera.esp  c_subset.esp a_aspect.esp a_engine.esp a_expand.esp
a_gojun.esp a_modal.esp a_polite.esp a_voice.esp disp.esp
jg_demo.esp o_engine.esp o_table.esp o_tablek.esp

/usr/icot/fgcs/mjg/u_list.esp...
  user##list_handler
  user##atom_handler

	......
        ......
===================================================================

To catalogue and save them, it takes about 12 min.(in the case of
SparcStation1 with 16Mb memory)


(5) Here, you complete the install procedure.



2. Execution

% If you've just finished the installation, you need not to do (1).

(1) Let CESP start and load the JG system.


=====================================================================
CESP> librarian
LIBMAN> load jg_demo
=====================================================================

All classes of JG are auto-loaded by loading the class "jg_demo".

(2) Invoke the debugger and load the dictionaries by using a method
":setup(#jg_dictionary)"


=====================================================================
LIBMAN> exit      <--- your input
CESP> debugger    <--- your input

??- :setup(#jg_dictionary).     <--- your input
loading /usr/icot/cesp/fgcs/jgdict/jg_dic_v.cil
                                         . . . . . . . . . .end
loading /usr/icot/cesp/fgcs/jgdict/jg_dic_adj.cil
                                         . . . . . . . . . .end
loading /usr/icot/cesp/fgcs/jgdict/jg_dic_adv.cil
                                         . . . . . . . . . .end
loading /usr/icot/cesp/fgcs/jgdict/jg_dic_app.cil
                                         . . . . . . . . . .end
loading /usr/icot/cesp/fgcs/jgdict/jg_dic_aux.cil
                                         . . . . . . . . . .end
loading /usr/icot/cesp/fgcs/jgdict/jg_dic_n.cil
                                         . . . . . . . . . .end
loading /usr/icot/cesp/fgcs/jgdict/jg_dic_r.cil
                                         . . . . . . . . . .end
Finished loading dictionaries.

??-

=====================================================================
It takes about 4 min.

If an error occurs while loading them, please confirm the installation
procedure 2-(2).


(3) Here you can use the JG system. There is some examples of JG in
"mjg/text.dat" and "mjg/simple_man.j (in Japanese)".

Also you can refer "jg_demo.esp" for samples of the macro expressions.


NOTE:

When you write a PST expression in a program or a command line of the
debugger, you MUST quote the PST with ``( ) to avoid expanding as a
macro expression by the CESP system.



     (example)

	:jg_generate(#macro_engine,``( {$B4X78(B/{$B8lWC(B/$BJ9$/(B}} ),Surface),

				    $B",(B     PST           $B",(B


%END
