realign
Sentence align a given file anew.
calculate_paths(tmxhtml)
Calculate paths, given a file from the command line.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tmxhtml |
str
|
path to a .tmx or a .tmx.html file |
required |
Returns:
Type | Description |
---|---|
tuple[CorpusPath, CorpusPath]
|
tuple of corpuspath.make_corpus_path |
Source code in /home/anders/projects/CorpusTools/corpustools/realign.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
|
convert_and_copy(corpus_path1, corpus_path2)
Reconvert and copy files to prestable/converted.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
corpus_path1 |
corpuspath.make_corpus_path
|
A CorpusPath representing the lang1 file that should be reconverted. |
required |
corpus_path2 |
corpuspath.make_corpus_path
|
A CorpusPath representing the lang2 file that should be reconverted. |
required |
Source code in /home/anders/projects/CorpusTools/corpustools/realign.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
|
main()
Sentence align a given file anew.
Source code in /home/anders/projects/CorpusTools/corpustools/realign.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
parse_options()
Parse the commandline options.
Returns:
Type | Description |
---|---|
argparse.Namespace
|
the parsed commandline arguments |
Source code in /home/anders/projects/CorpusTools/corpustools/realign.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
|
print_filename(corpus_path)
Print interesting filenames for doing sentence alignment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
corpus_path |
corpuspath.make_corpus_path
|
filenames |
required |
Source code in /home/anders/projects/CorpusTools/corpustools/realign.py
31 32 33 34 35 36 37 38 39 40 41 |
|
print_filenames(corpus_path1, corpus_path2)
Print interesting filenames for doing sentence alignment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
corpus_path1 |
corpuspath.make_corpus_path
|
filenames for the lang1 file. |
required |
corpus_path2 |
corpuspath.make_corpus_path
|
filenames for the lang2 file. |
required |
Source code in /home/anders/projects/CorpusTools/corpustools/realign.py
44 45 46 47 48 49 50 51 52 53 54 |
|