2019-06-13 12:34:19 +02:00
|
|
|
SRC_LANG=pl
|
|
|
|
TRG_LANG=en
|
|
|
|
CORPUS_NAME=opensubtitles_sample
|
|
|
|
SEPARATOR=@\#@
|
|
|
|
|
|
|
|
DICTIONARY_WEIGHT=3
|
|
|
|
|
2019-08-29 21:08:15 +02:00
|
|
|
all: corpora/$(CORPUS_NAME)/alignments.txt corpora/$(CORPUS_NAME)/src_clean.txt corpora/$(CORPUS_NAME)/src_clean.tok corpora/$(CORPUS_NAME)/src_clean.lem corpora/$(CORPUS_NAME)/trg_clean.txt
|
2019-06-13 12:34:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
clean:
|
2019-06-26 09:26:34 +02:00
|
|
|
rm -f corpora/$(CORPUS_NAME)/*.tok
|
2019-06-13 12:34:19 +02:00
|
|
|
rm -f corpora/$(CORPUS_NAME)/*.lem
|
|
|
|
rm -f corpora/$(CORPUS_NAME)/*.dict
|
|
|
|
rm -f corpora/$(CORPUS_NAME)/src_clean.txt
|
|
|
|
rm -f corpora/$(CORPUS_NAME)/src_clean.lem
|
|
|
|
rm -f corpora/$(CORPUS_NAME)/trg_clean.txt
|
|
|
|
rm -f corpora/$(CORPUS_NAME)/ids_clean.txt
|
|
|
|
rm -f corpora/$(CORPUS_NAME)/falign_corpus.txt
|
|
|
|
rm -f corpora/$(CORPUS_NAME)/falign_result.txt
|
|
|
|
rm -f corpora/$(CORPUS_NAME)/alignments.txt
|
|
|
|
|
|
|
|
|
|
|
|
corpora/$(CORPUS_NAME)/alignments.txt: corpora/$(CORPUS_NAME)/falign_result.txt corpora/$(CORPUS_NAME)/src_clean.lem
|
|
|
|
./get_alignments.py corpora/$(CORPUS_NAME)/falign_result.txt corpora/$(CORPUS_NAME)/src_clean.lem > $@
|
|
|
|
|
|
|
|
corpora/$(CORPUS_NAME)/src.dict:
|
|
|
|
./collect_dict.py $(SRC_LANG) $(TRG_LANG) $(DICTIONARY_WEIGHT) > $@
|
|
|
|
|
|
|
|
corpora/$(CORPUS_NAME)/trg.dict:
|
|
|
|
./collect_dict.py $(TRG_LANG) $(SRC_LANG) $(DICTIONARY_WEIGHT) > $@
|
|
|
|
|
2019-06-26 08:47:01 +02:00
|
|
|
corpora/$(CORPUS_NAME)/falign_result.txt: corpora/$(CORPUS_NAME)/falign_corpus.txt
|
|
|
|
./fast_align -i $< -d -o -v > $@
|
|
|
|
|
|
|
|
|
2019-06-13 12:34:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-29 21:08:15 +02:00
|
|
|
corpora/$(CORPUS_NAME)/src_clean.txt corpora/$(CORPUS_NAME)/src_clean.tok corpora/$(CORPUS_NAME)/src_clean.lem corpora/$(CORPUS_NAME)/trg_clean.txt corpora/$(CORPUS_NAME)/ids_clean.txt corpora/$(CORPUS_NAME)/falign_corpus.txt: corpora/$(CORPUS_NAME)/src.txt corpora/$(CORPUS_NAME)/trg.txt corpora/$(CORPUS_NAME)/ids.txt corpora/$(CORPUS_NAME)/src.tok corpora/$(CORPUS_NAME)/src.lem corpora/$(CORPUS_NAME)/trg.lem corpora/$(CORPUS_NAME)/src.dict corpora/$(CORPUS_NAME)/trg.dict
|
|
|
|
./prepare_corpus.py corpora/$(CORPUS_NAME)/src.txt corpora/$(CORPUS_NAME)/trg.txt corpora/$(CORPUS_NAME)/ids.txt corpora/$(CORPUS_NAME)/src.tok corpora/$(CORPUS_NAME)/src.lem corpora/$(CORPUS_NAME)/trg.lem corpora/$(CORPUS_NAME)/src.dict corpora/$(CORPUS_NAME)/trg.dict corpora/$(CORPUS_NAME)/src_clean.txt corpora/$(CORPUS_NAME)/src_clean.tok corpora/$(CORPUS_NAME)/src_clean.lem corpora/$(CORPUS_NAME)/trg_clean.txt corpora/$(CORPUS_NAME)/ids_clean.txt corpora/$(CORPUS_NAME)/falign_corpus.txt $(SRC_LANG) $(TRG_LANG)
|
2019-06-13 12:34:19 +02:00
|
|
|
|
|
|
|
|
2019-06-26 09:08:00 +02:00
|
|
|
|
|
|
|
corpora/$(CORPUS_NAME)/src.lem: corpora/$(CORPUS_NAME)/src.tok
|
|
|
|
./sentence_lemmatizer.py $< $(SRC_LANG) $@
|
|
|
|
|
|
|
|
corpora/$(CORPUS_NAME)/trg.lem: corpora/$(CORPUS_NAME)/trg.tok
|
|
|
|
./sentence_lemmatizer.py $< $(TRG_LANG) $@
|
|
|
|
|
|
|
|
|
2019-06-26 08:47:01 +02:00
|
|
|
corpora/$(CORPUS_NAME)/trg.tok: corpora/$(CORPUS_NAME)/trg.txt
|
2019-08-28 07:54:37 +02:00
|
|
|
/usr/local/bin/concordia-sentence-tokenizer -c /concordia-library/prod/resources/concordia-config/concordia.cfg < $< > $@
|
2019-06-26 08:47:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
corpora/$(CORPUS_NAME)/src.tok: corpora/$(CORPUS_NAME)/src.txt
|
2019-08-28 07:54:37 +02:00
|
|
|
/usr/local/bin/concordia-sentence-tokenizer -c /concordia-library/prod/resources/concordia-config/concordia.cfg < $< > $@
|