forked from braunefe/Gargantua
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
64 lines (47 loc) · 2.69 KB
/
README
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Sentence Aligner presented in :
Fabienne Braune, Alexander Fraser (2010). Improved Unsupervised Sentence Alignment for Symmetrical and Asymmetrical Parallel Corpora. In Proceedings of the 23rd International Conference on Computational Linguistics (COLING) - Posters, Beijing, China, August.
If you have any problems using this software please contact :
This sentence aligner is optimized for the Europarl tagging format.
If your corpus is split into chapters, speakers or paragraphs, please convert your tags to the Europarl format.
-----------------------------
0. Clean up if already used
-----------------------------
chmod u+x clean.sh
./clean.sh
----------------------
1. Prepare data
-----------------------
a) The sentences to be aligned need to be into pairs of files with the the same name and the extension .txt.
b) Each file in one langauge has to have a corresponding file (with the same name) in the other langauge. In order to remove documents that are in one langauge only you can use the perl script remove-non-parallel-files.perl which comes with the aligner.
c) Each file has to contain one sentence per line and spaces between words.
d) In order to sentence split and tokenize files, the split-sentences and tokenize script provided with the Europarl corpus can be used:
http://www.statmt.org/europarl/
Important note 1: it is recommended to first sentence split the corpus in order to obtain the untokenized data. In a second step tokenize the sentence split files in order to obtain the tokenized data.
-----------------------
2. Prepare filesystem
-----------------------
In the directory SentenceAligner make the following directories:
chmod u+x prepare-filesystem.sh
./prepare-filesystem.sh
Move (or link) your data in the corresponding directories:
mv (ln -s) your_untokenized_source_language_files/* corpus_to_align/source_language_corpus_untokenized
mv (ln -s) your_untokenized_target_language_files/* corpus_to_align/target_language_corpus_untokenized
mv (ln -s) your_tokenized_source_language_files/* corpus_to_align/source_language_corpus_tokenized
mv (ln -s) your_tokenized_target_language_files/* corpus_to_align/target_language_corpus_tokenized
Important note 2: If the data remains untokenized (i.e the *_tokenized and *_untokenized files are the same) put the data in ALL directories.
---------------------
3. Prepare Data
---------------------
chmod u+x prepare-data.sh (includes lowercasing the data)
./prepare-data.sh
---------------------------------------------------------
4. Compile source code
---------------------------------------------------------
cd src
make clean
make
------------------------
5. Run Aligner
------------------------
./sentence-aligner