File: factorize

package info (click to toggle)
mmorph 2.3.4.2-9
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 920 kB
  • ctags: 904
  • sloc: ansic: 4,992; yacc: 1,215; lex: 417; makefile: 295; sh: 48; sed: 33; csh: 26
file content (33 lines) | stat: -rwxr-xr-x 709 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/csh -f

#    mmorph, MULTEXT morphology tool
#    Version 2.3, October 1995
#    Copyright (c) 1994,1995 ISSCO/SUISSETRA, Geneva, Switzerland
#    Dominique Petitpierre, <petitp@divsun.unige.ch>

if ($#argv < 1 || $#argv > 2) then
    set Cmd=$0
    set Cmd=$Cmd:t
    echo "Usage: $Cmd mmorphdecl [mmorphlex]"
    exit 1
endif
set add =""
if ($#argv > 1 ) then
   set add = (-a $2:q)
endif
echo "" >/tmp/newline$$
mmorph -z -m $1:q $add:q \
 | tr '\011\012' '\012\011' \
 | cat - /tmp/newline$$ \
 | sort -t'	'  +0 -1 \
 | tr '\012\011' '\011\012' \
 | nawk '/]$/ { \
    if ( $0 != previous_tfs) { \
	previous_tfs = $0 ;\
	print ;\
    } \
    next ;\
    } \
    { print ;\
    }'
rm /tmp/newline$$