head	1.3;
access;
symbols
	REL8_0_25:1.1.4.1
	REL8_1_21:1.1.6.1
	REL8_2_17:1.1.8.1
	REL8_0_24:1.1.4.1
	REL8_1_20:1.1.6.1
	REL8_2_16:1.1.8.1
	REL8_0_23:1.1.4.1
	REL8_1_19:1.1.6.1
	REL8_2_15:1.1.8.1
	REL8_0_22:1.1.4.1
	REL8_1_18:1.1.6.1
	REL8_2_14:1.1.8.1
	REL8_0_21:1.1.4.1
	REL8_1_17:1.1.6.1
	REL8_2_13:1.1.8.1
	REL8_0_20:1.1.4.1
	REL8_1_16:1.1.6.1
	REL8_2_12:1.1.8.1
	REL8_0_19:1.1.4.1
	REL8_1_15:1.1.6.1
	REL8_2_11:1.1.8.1
	REL8_0_18:1.1.4.1
	REL8_1_14:1.1.6.1
	REL8_2_10:1.1.8.1
	REL8_0_17:1.1.4.1
	REL8_1_13:1.1.6.1
	REL8_2_9:1.1.8.1
	REL8_0_16:1.1.4.1
	REL8_1_12:1.1.6.1
	REL8_2_8:1.1.8.1
	REL8_2_7:1.1.8.1
	REL8_0_15:1.1.4.1
	REL8_1_11:1.1.6.1
	REL8_2_6:1.1.8.1
	REL8_3_BETA2:1.2
	REL8_3_BETA1:1.2
	REL8_0_14:1.1.4.1
	REL8_1_10:1.1.6.1
	REL8_2_5:1.1.8.1
	REL8_0_13:1.1.4.1
	REL8_1_9:1.1.6.1
	REL8_2_4:1.1.8.1
	REL8_0_12:1.1.4.1
	REL8_1_8:1.1.6.1
	REL8_2_3:1.1.8.1
	REL8_0_11:1.1.4.1
	REL8_1_7:1.1.6.1
	REL8_2_2:1.1.8.1
	REL8_0_10:1.1.4.1
	REL8_1_6:1.1.6.1
	REL8_2_1:1.1.8.1
	REL8_2_STABLE:1.1.0.8
	REL8_2_0:1.1
	REL8_2_RC1:1.1
	REL8_2_BETA3:1.1
	REL8_2_BETA2:1.1
	REL8_1_5:1.1
	REL8_0_9:1.1
	REL8_2_BETA1:1.1
	REL8_0_8:1.1
	REL8_1_4:1.1
	REL8_0_7:1.1
	REL8_1_3:1.1
	REL8_0_6:1.1
	REL8_1_2:1.1
	REL8_0_5:1.1
	REL8_1_1:1.1
	REL8_1_STABLE:1.1.0.6
	REL8_1_0:1.1
	REL8_1_0RC1:1.1
	REL8_1_0BETA4:1.1
	REL8_1_0BETA3:1.1
	REL8_0_4:1.1
	REL8_1_0BETA2:1.1
	REL8_1_0BETA1:1.1
	REL8_0_3:1.1
	REL8_0_2:1.1
	REL8_0_1:1.1
	REL8_0_STABLE:1.1.0.4
	REL8_0_0:1.1.0.2
	REL8_0_0RC5:1.1
	REL8_0_0RC4:1.1
	REL8_0_0RC3:1.1
	REL8_0_0RC2:1.1
	REL8_0_0RC1:1.1
	REL8_0_0BETA5:1.1
	REL8_0_0BETA4:1.1
	REL8_0_0BETA3:1.1
	REL8_0_0BETA2:1.1
	REL8_0_0BETA1:1.1;
locks; strict;
comment	@# @;


1.3
date	2007.11.13.21.02.29;	author tgl;	state dead;
branches;
next	1.2;

1.2
date	2006.12.21.17.35.28;	author teodor;	state Exp;
branches;
next	1.1;

1.1
date	2003.11.26.14.06.16;	author teodor;	state Exp;
branches
	1.1.4.1
	1.1.6.1
	1.1.8.1;
next	;

1.1.4.1
date	2006.12.21.17.36.08;	author teodor;	state Exp;
branches;
next	;

1.1.6.1
date	2006.12.21.17.35.55;	author teodor;	state Exp;
branches;
next	;

1.1.8.1
date	2006.12.21.17.35.44;	author teodor;	state Exp;
branches;
next	;


desc
@@


1.3
log
@Replace the now-incompatible-with-core contrib/tsearch2 module with a
compatibility package.  This supports importing dumps from past versions
using tsearch2, and provides the old names and API for most functions
that were changed.  (rewrite(ARRAY[...]) is a glaring omission, though.)

Pavel Stehule and Tom Lane
@
text
@ZIPFILE=nb_NO
LANGUAGE=norsk


UNZIP=unzip -o


all: $(LANGUAGE).dict $(LANGUAGE).aff

$(ZIPFILE).aff: $(ZIPFILE).zip
	$(UNZIP) $? $@@
	touch $@@ 


# 1 Cleanup dictionary
# 2 remove " symbol
# 3 add compoundwords controlled flag to word which hasn't it, but
#   has compound only suffixes

$(LANGUAGE).dict: $(ZIPFILE).zip
	$(UNZIP) $? $(ZIPFILE).dic
	grep -v -E '^[[:digit:]]+$$' < $(ZIPFILE).dic \
	 | grep -v '\.' \
	 | sed -e 's/"//g' \
	 | perl -pi -e 's|/(\S+)| $$q=$$1; ( $$q=~/[\\_`]/ && $$q!~/z/ ) ? "/$${q}z" : "/$${q}"|e' \
	 | sort \
	> $@@

#just convert affix file

$(LANGUAGE).aff: $(ZIPFILE).aff 
	grep -v -i zyzyzy $(ZIPFILE).aff \
	 | grep -v -i zyzyzy \
	 | perl -pi \
		-e 's/^COMPOUNDFLAG\s+(\S+)/compoundwords controlled $$1/;' \
	        -e 's/^COMPOUNDMIN\s+(\d+)/compoundmin $$1/;' \
	        -e 's/^PFX\s+(\S+)\s+([YN])\s+\d+.*$$/ if ( !$$wasprf ) { $$wasprf=1; "prefixes\n\nflag $$1:" } else { "flag $$1:" } /e;' \
	        -e 's/^PFX\s+\S+\s+(\S+)\s+(\S+)\s+(\S+)/ uc("   $$3    > $$2")/e;' \
	        -e 's/^(.*)SFX\s+(\S+)\s+([YN])\s+\d+.*$$/ $$flg=($$3 eq "Y") ? "*" : ""; $$flg="~$$flg" if length $$1; $$q=$$2; $$q="\\$$q" if $$q!~m#[a-zA-Z]#; if ( !$$wassfx ) { $$wassfx=1; "suffixes\n\nflag $$flg$$q:" } else { "flag $$flg$$q:" } /e;' \
	        -e 's/^.*SFX\s+\S+\s+(\S+)\s+(\S+)\s+(\S+)/ uc("   $$3    > ".( ($$1 eq "0") ? "" : "-$$1,").( ($$2 eq "0") ? "" : "$$2") )/e;' \
		-e 's/^(SET|TRY)/#$$1/' \
	> $@@ 

clean:
	rm -rf $(ZIPFILE).aff $(ZIPFILE).dic $(LANGUAGE).dict $(LANGUAGE).aff 


@


1.2
log
@Fix convertion for 'PFX flag N num'
@
text
@@


1.1
log
@Utility for convert myspell dictionaries to ispell, full README will be later
@
text
@d37 1
a37 1
	        -e 's/^PFX\s+(\S+)\s+Y\s+\d+.*$$/ if ( !$$wasprf ) { $$wasprf=1; "prefixes\n\nflag $$1:" } else { "flag $$1:" } /e;' \
@


1.1.4.1
log
@Fix convertion for 'PFX flag N num'
@
text
@d37 1
a37 1
	        -e 's/^PFX\s+(\S+)\s+([YN])\s+\d+.*$$/ if ( !$$wasprf ) { $$wasprf=1; "prefixes\n\nflag $$1:" } else { "flag $$1:" } /e;' \
@


1.1.6.1
log
@Fix convertion for 'PFX flag N num'
@
text
@d37 1
a37 1
	        -e 's/^PFX\s+(\S+)\s+([YN])\s+\d+.*$$/ if ( !$$wasprf ) { $$wasprf=1; "prefixes\n\nflag $$1:" } else { "flag $$1:" } /e;' \
@


1.1.8.1
log
@Fix convertion for 'PFX flag N num'
@
text
@d37 1
a37 1
	        -e 's/^PFX\s+(\S+)\s+([YN])\s+\d+.*$$/ if ( !$$wasprf ) { $$wasprf=1; "prefixes\n\nflag $$1:" } else { "flag $$1:" } /e;' \
@


