Added 5 nouns.
[apertium.git] / apertium-es-gl / es-gl-supervised.make
blob4d0b893e9dff5c9c3bfc0102b5e245282cd9b215
1 TAGGER_SUPERVISED_ITERATIONS=0
2 BASENAME=apertium-es-gl
3 LANG1=es
4 LANG2=gl
5 TAGGER=$(LANG1)-tagger-data
6 PREFIX=$(LANG1)-$(LANG2)
8 all: $(PREFIX).prob
10 $(PREFIX).prob: $(BASENAME).$(LANG1).tsx $(TAGGER)/$(LANG1).dic $(TAGGER)/$(LANG1).untagged $(TAGGER)/$(LANG1).tagged $(TAGGER)/$(LANG1).crp
11 apertium-validate-tagger $(BASENAME).$(LANG1).tsx
12 apertium-tagger -s $(TAGGER_SUPERVISED_ITERATIONS) \
13 $(TAGGER)/$(LANG1).dic \
14 $(TAGGER)/$(LANG1).crp \
15 $(BASENAME).$(LANG1).tsx \
16 $(PREFIX).prob \
17 $(TAGGER)/$(LANG1).tagged \
18 $(TAGGER)/$(LANG1).untagged;
20 $(TAGGER)/$(LANG1).dic: $(BASENAME).$(LANG1).dix $(PREFIX).automorf.bin
21 @echo "Generating $@";
22 @echo "This may take some time. Please, take a cup of coffee and come back later.";
23 apertium-validate-dictionary $(BASENAME).$(LANG1).dix
24 apertium-validate-tagger $(BASENAME).$(LANG1).tsx
25 lt-expand $(BASENAME).$(LANG1).dix | grep -v "__REGEXP__" | grep -v ":<:" |\
26 awk 'BEGIN{FS=":>:|:"}{print $$1 ".";}' | apertium-destxt >$(LANG1).dic.expanded
27 @echo "." >>$(LANG1).dic.expanded
28 @echo "?" >>$(LANG1).dic.expanded
29 @echo ";" >>$(LANG1).dic.expanded
30 @echo ":" >>$(LANG1).dic.expanded
31 @echo "!" >>$(LANG1).dic.expanded
32 @echo "42" >>$(LANG1).dic.expanded
33 @echo "," >>$(LANG1).dic.expanded
34 @echo "(" >>$(LANG1).dic.expanded
35 @echo "\\[" >>$(LANG1).dic.expanded
36 @echo ")" >>$(LANG1).dic.expanded
37 @echo "\\]" >>$(LANG1).dic.expanded
38 @echo "¿" >>$(LANG1).dic.expanded
39 @echo "¡" >>$(LANG1).dic.expanded
40 lt-proc -a $(PREFIX).automorf.bin <$(LANG1).dic.expanded | \
41 apertium-filter-ambiguity $(BASENAME).$(LANG1).tsx > $@
42 rm $(LANG1).dic.expanded;
44 $(TAGGER)/$(LANG1).crp: $(PREFIX).automorf.bin $(TAGGER)/$(LANG1).crp.txt
45 apertium-destxt < $(TAGGER)/$(LANG1).crp.txt | lt-proc $(PREFIX).automorf.bin > $(TAGGER)/$(LANG1).crp; \
47 $(TAGGER)/$(LANG1).crp.txt:
48 touch $(TAGGER)/$(LANG1).crp.txt
50 $(TAGGER)/$(LANG1).tagged:
51 @echo "Error: File '"$@"' is needed to perform a supervised tagger training" 1>&2
52 @echo "This file should exist. It is the result of solving the ambiguity from the '"$(TAGGER1)/$(LANG1).tagged.txt"' file" 1>&2
53 exit 1
55 $(TAGGER)/$(LANG1).untagged: $(TAGGER)/$(LANG1).tagged.txt $(PREFIX).automorf.bin
56 cat $(TAGGER)/$(LANG1).tagged.txt | apertium-destxt | lt-proc $(PREFIX).automorf.bin > $@;
58 clean:
59 rm -f $(PREFIX).prob