1 TAGGER_SUPERVISED_ITERATIONS
=0
2 BASENAME
=apertium-oc-ca
5 TAGGER
=$(LANG1
)-tagger-data
6 PREFIX
=$(LANG1
)-$(LANG2
)
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 \
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
55 $(TAGGER
)/$(LANG1
).untagged
: $(TAGGER
)/$(LANG1
).tagged.txt
$(PREFIX
).automorf.bin
56 cat
$(TAGGER
)/$(LANG1
).tagged.txt | apertium-destxt | lt-proc
$(PREFIX
).automorf.bin
> $@
;