source: nawszelkiwypadek/tools/cor_dic/prep.pl @ b5884b3

Last change on this file since b5884b3 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.1 KB
RevLine 
[f1563c0]1#! /usr/bin/perl
2
3use locale;
4use strict;
5
6my $file = shift;
7
8if ($file eq "") {
9    print "Podaj nazwê pliku.\n";
10    exit(0);
11}
12
13
14`makeLabels.pl > labels.sym`;
15
16`lexmakelab labels`;
17
18print "Pobieram informacje ze s³ownika..........................";
19
20`cut -d \\; -f 1 <$file > temp1`;
21
22`sort -u < temp1 > temp2`;
23
24print "OK\n";
25
26print "Kompilujê automat........................................";
27
28`lexcomplex -l labels.lab -S labels.scl <temp2 > temp1`;
29
30print "OK\n";
31
32print "Usuwam epsilon-przejscia.................................";
33
34`fsmrmepsilon temp1> temp2`;
35
36print "OK\n";
37
38print "Determinizujê automat....................................";
39
40`fsmdeterminize temp2 > temp1`;
41
42print "OK\n";
43
44print "Minimalizujê automat.....................................";
45
46`fsmminimize temp1> temp2`;
47
48print "OK\n";
49
50print "Konwertujê automat do formatu fsa........................";
51
52`fsmprint -i labels.lab temp2> temp1`;
53
54`../fsm2aut temp1> temp2`;
55
56`../aut2fsa < temp2> cor.dic`;
57
58print "OK\n";
59
60print "Czyszczê pliki pomocnicze................................";
61
62`rm temp2`;
63`rm temp1`;
64`rm labels.*`;
65
66print "OK\n";
67
Note: See TracBrowser for help on using the repository browser.