			Syntactic Analyzing Program
		-- How to use Syntactic Analyzing Program --

1. Environment
   The environment of Syntactic Analyzing Program (SAX Program) is as
   follows:

       Machine: UNIX machine
      Language: SICStus Prolog Ver 0.7
   Source Code: 30 KB

2. How to use SAX
   SAX is implemented in SICStus Prolog Ver 0.7. In addition to SAX,
   sample grammar rules and data is provided. 
   We can analyze a sentence using these programs and data.

2.1. How to install SAX

(a) uncompress synana.tar.Z

(b) tar xf synana.tar

2.2. How to use SAX

2.2.1. How to use SAX translator

(a) Run SICStus Prolog

(b) Compile SAX translator.

| ?- compile('PARSER/spr24.pl').

(c) Run SAX translator


yes
| ?- tran.
Welcome to SAX Compiler Version N1.1
(C) ICOT Labs. 1986
Enter input file name :- 'GRAM/dcg'.
Enter output file name :- out.
Enter Top Node (default is sentence for key in y.) y.
Enter Arguments for top node (default is 2 for key in y) y.
************************
> Unused NT < 

>> Finished Path 1 <<
 > SAX Clause Generation <
 > Link Generation <
 > Id_Table Generation <

>> Finished Path 2 <<
>> End of translation <<
   Execution time = 17460 msec

yes
| ?-

(d) Compile in the following programs.

| ?- compile(['TEXT/out','GRAM/pl.euc','PARSER/eval_lc.pl','PARSER/ytime.pl','PARSER/ytstr10.pl','GRAM/util.pl']).

2.2.2 Analyzing a Japanese sentence (Example).

[run (a)] Analyzing one sentence

[1.] Mode Nemacs editor to euc code

[2.] Read asahi.txt from Nemacs editor
 
[3.] start. input CR Key.

| ?- start.
:  begin,$B6HL3>e$N(B,$BIB5$$K(B,$B8B$l$P(B,$B6aG/(B,$B8:$C$F$-$F$$$k(B,end.
parsed  
sentence
   end
   ws
      ws
         w
            $B8:$C$F$-$F$$$k(B
         w
            $B6aG/(B
      ws
         w
            $B8B$l$P(B
         ws
            w
               $BIB5$$K(B
            w
               $B6HL3>e$N(B
begin

execution time = 60msec
gc time = 0msec
ss time = 0msec
heap = 1048200 bytes
yes
| ?- 

[run (b)] Batch processing

[1.] start('input file'). input CR Key.

yes
| ?- start('asahi_sh.euc').
parsed  
sentence
   end
   ws
      ws
         w
            $B8:$C$F$-$F$$$k(B
         w
            $B6aG/(B
      ws
         w
            $B8B$l$P(B
         ws
            w
               $BIB5$$K(B
            w
               $B6HL3>e$N(B
begin

execution time = 40msec
gc time = 0msec
ss time = 0msec
heap = 1048340 bytesparsed  
sentence
   end
   ws
      ws
         ws
            w
               $BH>8:$7$?(B
            ws
               w
                  $B4V$K(B
               ws
                  w
                     $B==?tG/$N(B
                  w
                     $B$3$N(B
         w
            $B0lK|8^@i?MB-$i$:$G(B
      w
         $B:rG/$O(B
begin
parsed  
sentence
   end
   ws
      ws
         w
            $BH>8:$7$?(B
         ws
            w
               $B4V$K(B
            ws
               w
                  $B==?tG/$N(B
               w
                  $B$3$N(B
      ws
         w
            $B0lK|8^@i?MB-$i$:$G(B
         w
            $B:rG/$O(B
begin

execution time = 60msec
gc time = 0msec
ss time = 0msec
heap = 1048340 bytesparsed  
sentence
   end
   ws
      ws
         ws
            w
               $B>e>:$7$F$$$k(B
            w
               $BKhG/(B
         ws
            ws
               ws
                  w
                     $BN($O(B
                  w
                     $BIB5$$N(B
               w
                  $B0lHL$N(B
            ws
               w
                  $B8+$D$+$k(B
               w
                  $BDj4|7r9/?GCG$G(B
      w
         $B$7$+$7(B
begin
parsed  
sentence
   end
   ws
      ws
         ws
            w
               $B>e>:$7$F$$$k(B
            w
               $BKhG/(B
         ws
            ws
               w
                  $BN($O(B
               w
                  $BIB5$$N(B
            ws
               w
                  $B0lHL$N(B
               ws
                  w
                     $B8+$D$+$k(B
                  w
                     $BDj4|7r9/?GCG$G(B
      w
         $B$7$+$7(B
begin
parsed  
sentence
   end
   ws
      ws
         ws
            w
               $B>e>:$7$F$$$k(B
            w
               $BKhG/(B
         ws
            ws
               w
                  $BN($O(B
               ws
                  w
                     $BIB5$$N(B
                  w
                     $B0lHL$N(B
            ws
               w
                  $B8+$D$+$k(B
               w
                  $BDj4|7r9/?GCG$G(B
      w
         $B$7$+$7(B
begin
parsed  
sentence
   end
   ws
      ws
         ws
            w
               $B>e>:$7$F$$$k(B
            w
               $BKhG/(B
         ws
            w
               $BN($O(B
            ws
               ws
                  w
                     $BIB5$$N(B
                  w
                     $B0lHL$N(B
               ws
                  w
                     $B8+$D$+$k(B
                  w
                     $BDj4|7r9/?GCG$G(B
      w
         $B$7$+$7(B
begin
parsed  
sentence
   end
   ws
      ws
         ws
            w
               $B>e>:$7$F$$$k(B
            w
               $BKhG/(B
         ws
            w
               $BN($O(B
            ws
               w
                  $BIB5$$N(B
               ws
                  w
                     $B0lHL$N(B
                  ws
                     w
                        $B8+$D$+$k(B
                     w
                        $BDj4|7r9/?GCG$G(B
      w
         $B$7$+$7(B
begin

execution time = 329msec
gc time = 0msec
ss time = 0msec
heap = 1048340 bytesparsed  
sentence
   end
   ws
      ws
         w
            $BN($@(B
         w
            $B:G9b$N(B
      ws
         w
            $B4^$a$F(B
         w
            $B9bEY@.D94|$r(B
begin

execution time = 19msec
gc time = 0msec
ss time = 0msec
heap = 1048340 bytesparsed  
sentence
   end
   ws
      ws
         w
            $B@j$a$k(B
         w
            $B9b7l05$,(B
      ws
         w
            $BH>J,6a$/$r(B
         w
            $B$=$N(B
begin

execution time = 40msec
gc time = 0msec
ss time = 0msec
heap = 1048340 bytes
yes
| ?- 
