source: nawszelkiwypadek/tools/lem_dic/prep.pl @ 8338227

Last change on this file since 8338227 was f1563c0, checked in by obrebski <obrebski@…>, 17 years ago

git-svn-id: svn://atos.wmid.amu.edu.pl/utt@3 e293616e-ec6a-49c2-aa92-f4a8b91c5d16

  • Property mode set to 100755
File size: 1.2 KB
RevLine 
[f1563c0]1#! /usr/bin/perl
2
3use locale;
4use strict;
5
6my $file = shift;
7my $filename;
8
9if ($file eq "") {
10    print "Podaj nazwê pliku.\n";
11    exit(1);
12}
13
14if ($file =~ /(.*)\.dic/)
15{
16    $filename = $1;
17}
18else
19{
20    print "The input file must have .dic extension.";
21    exit(1);
22}
23
24`makeLabels.pl > labels.sym`;
25
26`lexmakelab labels`;
27
28print "Kanonizujê opisy.........................................";
29
30#`canon.pl <$file >temp2`;
31
32print "Kompilujê automat........................................";
33
34`lexcomplex -l labels.lab -S labels.scl <$file > temp1`;
35
36print "OK\n";
37
38print "Usuwam epsilon-przejscia.................................";
39
40`fsmrmepsilon temp1> temp2`;
41
42print "OK\n";
43
44print "Determinizujê automat....................................";
45
46`fsmdeterminize temp2 > temp1`;
47
48print "OK\n";
49
50print "Minimalizujê automat.....................................";
51
52`fsmminimize temp1> temp2`;
53
54print "OK\n";
55
56print "Konwertujê automat do formatu fsa........................";
57
58`fsmprint -i labels.lab temp2> temp1`;
59
60`cp temp1 pofsmprint`;
61
62`../fsm2aut temp1> temp2`;
63
64`./aut2fsa.nowy < temp2> $filename.bin`;
65
66print "OK\n";
67
68print "Czyszczê pliki pomocnicze................................";
69
70`rm temp2`;
71`rm temp1`;
72#`rm labels.*`;
73
74print "OK\n";
75
Note: See TracBrowser for help on using the repository browser.