Last change
on this file since 93afab8 was
a6e708f,
checked in by tom <tom@…>, 13 years ago
|
ANULOWANIE POPRZEDNIEGO COMMITU
Revert "Replacing old implementation with working implementation"
This reverts commit 1e121f45e2d091fcd34a893291b8453e350d5884.
Please enter the commit message for your changes. Lines starting
with '#' will be ignored, and an empty message aborts the commit.
Committer: tom <tom@lim.(none)>
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: _old/app/Makefile
deleted: _old/app/conf/Makefile
deleted: _old/app/conf/compiledic.conf
deleted: _old/app/conf/cor.conf
deleted: _old/app/conf/dgc.conf
deleted: _old/app/conf/dgp.conf
deleted: _old/app/conf/gph.conf
deleted: _old/app/conf/grp.conf
deleted: _old/app/conf/gue.conf
deleted: _old/app/conf/kor.conf
deleted: _old/app/conf/lem.conf
deleted: _old/app/conf/mar.conf
deleted: _old/app/conf/ser.conf
deleted: _old/app/conf/utt.conf
modified: _old/app/src/common/Makefile
modified: _old/app/src/compiledic/Makefile
modified: _old/app/src/compiledic/aut2fsa.cc
modified: _old/app/src/cor/Makefile
modified: _old/app/src/dgp/Makefile
new file: _old/app/src/dgp/canonize
new file: _old/app/src/dgp/dgc
modified: _old/app/src/dgp/grammar.hh
modified: _old/app/src/dgp/mgraph.hh
modified: _old/app/src/dgp/sgraph.hh
modified: _old/app/src/dgp/thesymbols.hh
new file: _old/app/src/dgp/tre
modified: _old/app/src/gue/Makefile
modified: _old/app/src/gue/guess.cc
modified: _old/app/src/kor/Makefile
modified: _old/app/src/kor/corlist.cc
modified: _old/app/src/kor/corr.cc
new file: _old/app/src/kor/corr.hh
modified: _old/app/src/kor/main.cc
modified: _old/app/src/lem/Makefile
modified: _old/app/src/lem/lem.cc
modified: _old/app/src/lib/Makefile
modified: _old/app/src/lib/auttools.cc
modified: _old/app/src/lib/symtab.cc
modified: _old/app/src/lib/tft.h
modified: _old/app/src/lib/tfti.h
modified: _old/app/src/lib/ttrans.h
modified: _old/app/src/lib/word.cc
modified: _old/app/src/lib/word.h
modified: _old/app/src/tok.c/Makefile
modified: _old/app/src/tok.c/cmdline_tok.ggo
modified: _old/app/src/tok.c/common_tok.cc
modified: _old/app/src/tok/Makefile
modified: _old/nawszelkiwypadek/tools/aut2fsa
modified: _old/nawszelkiwypadek/tools/cor_dic/makeLabels.pl
modified: _old/nawszelkiwypadek/tools/cor_dic/prep.pl
modified: _old/nawszelkiwypadek/tools/fsm2aut
modified: _old/nawszelkiwypadek/tools/gue_dic/canon.pl
modified: _old/nawszelkiwypadek/tools/gue_dic/compile_user_dict.pl
modified: _old/nawszelkiwypadek/tools/gue_dic/count_prefs.pl
modified: _old/nawszelkiwypadek/tools/gue_dic/cut_prefs.pl
modified: _old/nawszelkiwypadek/tools/gue_dic/makeLabels.pl
modified: _old/nawszelkiwypadek/tools/gue_dic/prep.pl
modified: _old/nawszelkiwypadek/tools/gue_dic/prep_user_dict.pl
modified: _old/nawszelkiwypadek/tools/gue_dic/rmDup.pl
modified: _old/nawszelkiwypadek/tools/gue_dic/stat.pl
modified: _old/nawszelkiwypadek/tools/gue_dic/stat_pre.pl
modified: _old/nawszelkiwypadek/tools/lem_dic/makeLabels.pl
modified: _old/nawszelkiwypadek/tools/lem_dic/prep.pl
modified: auto/defaults
modified: auto/options
modified: auto/output/Makefile
modified: auto/output/config_h
modified: auto/summary
modified: configure
|
-
Property mode set to
100755
|
File size:
1.1 KB
|
Line | |
---|
1 | #!/usr/bin/perl |
---|
2 | |
---|
3 | # Usuwa zbêdne powtórzenia scie¿ek |
---|
4 | |
---|
5 | use locale; |
---|
6 | |
---|
7 | #if (@ARGV < 1) { |
---|
8 | # print "USAGE: remDup.pl num\n\tGdzie \"num\" jest ilo¶ci± powtórzeñ, które zostawiamy\n"; |
---|
9 | # exit(0); |
---|
10 | #} |
---|
11 | |
---|
12 | |
---|
13 | |
---|
14 | #ilo¶æ powtórzeñ, które zostawiamy |
---|
15 | $max = 10; |
---|
16 | |
---|
17 | # przyjmujemy, ze na wej¶ciu znajduje siê plik posortowany, |
---|
18 | # po koñcówkach oraz po prawdopodobieñstwie |
---|
19 | |
---|
20 | $line = <>; |
---|
21 | |
---|
22 | while (($line !~ m/^$/) || ($line =~ m/^\n$/)) { |
---|
23 | |
---|
24 | $count = 0; |
---|
25 | |
---|
26 | while ($line =~ m/^\n$/) { |
---|
27 | $line = <>; |
---|
28 | } |
---|
29 | |
---|
30 | $line =~ /^([^~]+)~.*/; |
---|
31 | $theEnd = $1; |
---|
32 | $end = $1; |
---|
33 | |
---|
34 | while (($end =~ m/$theEnd/) && ($count++ < $max)) { |
---|
35 | print $line; |
---|
36 | $line = <>; |
---|
37 | $line =~ /^([^~]+)~.*/; |
---|
38 | $end = $1; |
---|
39 | } |
---|
40 | |
---|
41 | # tutaj mamy dwie mo¿liwo¶ci: |
---|
42 | # 1. wypisali¶my ju¿ max lini - musimy wywaliæ kolejne linie, które |
---|
43 | # zawieraj± koñcówkê theEnd, |
---|
44 | # 2. pasuj±cych lini by³o mniej ni¿ max, wtedy nic nie musimy robiæ |
---|
45 | # - w zmiennej line znajduje siê kolejna linia... |
---|
46 | |
---|
47 | if ($count == $max + 1) { |
---|
48 | while ($oldEnd =~ m/$theEnd/) { |
---|
49 | $line = <>; |
---|
50 | $line =~ /^([^~]+)~.*/; |
---|
51 | $oldEnd = $1; |
---|
52 | } |
---|
53 | } |
---|
54 | |
---|
55 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.