bibel_no_aligner
Functions to align bible texts from bibel.no.
add_filename_id(filename)
Add the tmx filename as an prop element in the header.
Source code in /home/anders/projects/CorpusTools/corpustools/bibel_no_aligner.py
40 41 42 43 44 45 46 |
|
common_verses(filename, parallel_path)
Return string pairs from common verses.
Source code in /home/anders/projects/CorpusTools/corpustools/bibel_no_aligner.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
|
main()
Make tmx files.
Source code in /home/anders/projects/CorpusTools/corpustools/bibel_no_aligner.py
145 146 147 148 149 150 151 152 153 |
|
make_tmx(path, source_lang, target_lang)
Make a tmx element with verse pairs.
Source code in /home/anders/projects/CorpusTools/corpustools/bibel_no_aligner.py
119 120 121 122 123 124 125 126 127 128 129 |
|
make_tmx_header(filename, source_lang)
Make a tmx header based on the lang variable.
Source code in /home/anders/projects/CorpusTools/corpustools/bibel_no_aligner.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|
make_tmx_template(filename, source_lang)
Make tmx file based on the output of the aligner.
Source code in /home/anders/projects/CorpusTools/corpustools/bibel_no_aligner.py
65 66 67 68 69 70 71 |
|
make_tuv(line, lang)
Make a tuv element given an input line and a lang variable.
Source code in /home/anders/projects/CorpusTools/corpustools/bibel_no_aligner.py
29 30 31 32 33 34 35 36 37 |
|
parse_options()
Gather options.
Source code in /home/anders/projects/CorpusTools/corpustools/bibel_no_aligner.py
93 94 95 96 97 98 99 100 101 102 |
|
valid_path(source_lang, target_lang)
Yield a CorpusPath if the parallel file exists.
Source code in /home/anders/projects/CorpusTools/corpustools/bibel_no_aligner.py
105 106 107 108 109 110 111 112 113 114 115 116 |
|
write_tmx(tmx, tmx_filename)
Write a tmx file.
Source code in /home/anders/projects/CorpusTools/corpustools/bibel_no_aligner.py
132 133 134 135 136 137 138 139 140 141 142 |
|