<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hi again!<br id="lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div><blockquote type="cite" cite="mid:D9616B48-9385-45ED-A64E-1C34FD57CA5B@collocations.de" style="font-family: ArialMT; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><div>Which means that you can "simply" generate your own alignment in this text format and then run cwb-align-encode. You can also preview your alignment with cwb-align-show first to check that you've got the format right. </div></div></div></blockquote><span style="caret-color: rgb(0, 0, 0); font-family: ArialMT; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">So as I understand this, given that my s tags are one-to-one correspondancse, it would be enough for me to upload an .align file reading 1 <TAB> 1, 2 <TAB> 2, etc.?</span><br style="caret-color: rgb(0, 0, 0); font-family: ArialMT; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"></div></blockquote><div><br></div><div>No, the input file has to list the start and end corpus positions of the corresponding regions.</div><div><br></div><div>If your pre-alignment is encoded in s-attribute "s" in both SOURCE and TARGET corpus, and if there's indeed a perfect correspondence between the reasons, these unix command-line steps will give you most of the .align file (you just need to add a header line as described in "man cwb-align").</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>cwb-s-decode SOURCE s > tmp1.txt</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>cwb-s-decode TARGET s > tmp2.txt</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>paste tmp1.txt tmp2.txt > source_target.align</div><div><br></div><div>But it's even easier to use "cwb-align" to generate the file, by using "s" both as the alignment grid and as pre-alignment.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>cwb-align -o source_target.align -S s SOURCE TARGET s -C:1 </div><div><br></div><div>"cwb-align" has no choice but to generate all 1:1 alignments because there's only a single source and target region in each pre-alignment block. (Theoretically it could split them into 1:0 and 0:1 beads, but that should always get a worse score than the 1:1 alignment.) You could also just use the default feature set, but using only sentence length (-C:1) is avoids unnecessary work.</div><div><br></div><blockquote type="cite"><div><blockquote type="cite" cite="mid:D9616B48-9385-45ED-A64E-1C34FD57CA5B@collocations.de" style="font-family: ArialMT; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><div>If you have a pre-alignment (which might be at a different level than sentences), you can indicate this to cwb-align, which will force the aligner to only consider sentence correspondences that are consistent with the pre-alignment. A trick I've sometimes used is to specify the same s-attribute that encodes the pre-alignment (keep in mind that there must be a single region for each pre-alignment block) as alignment grid, which keeps cwb-align from making any changes.</div></div></div></blockquote><span style="caret-color: rgb(0, 0, 0); font-family: ArialMT; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">Does this mean that, since I specify alignment on s tags in cwb-align, I should be getting what I want to achieve anyway?</span></div></blockquote><div><br></div><div>If you do it as I've shown above, this should just pass through the pre-alignment.</div><br><blockquote type="cite"><div><span style="caret-color: rgb(0, 0, 0); font-family: ArialMT; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">My pre-alignement is tagged <s> ... </s> which generally, but not always, correspond to sentences. As I understand it, I'd need to tag it <s id="1"> ... </s>, etc. Is that right? If so, could it just, trivially, be a question of added the "id" attribute incrementally to the already present "s" tags in order to run cwb-align-import with my pre-aligned material?</span></div></blockquote><div><br></div><div>Yes, that would be the cleanest solution, combined with an input file that lists the trivially corresponding IDs</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>1 TAB 1</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>2 TAB 2</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>...</div><br></div><div>Best,</div><div>Stephanie</div><br></body></html>