[CWB] query parallel corpus from command line
"Andrés Chandía"
andres at chandia.net
Mon Nov 20 18:20:44 CET 2017
Thanks, ther should be something wrong I don't know where because on of the things I tryied
before sending the mail asking for help was exactly activating the alignment in the way you
point out, and it din't work, I tryied again, no success, here you have the files updated:
file: init.fl
set LeftKWICDelim '<span id="hit">';
set
RightKWICDelim '</span>';
set lc 1 s;
set rc 1 s;
set PrintMode html;
show cd;
set PrintOptions tbl;
set PrintStructures 'text';
set Optimize
on;
show +pos +lemma;
show +s;
set ShowTagAttributes on;
show
+corpus_tl;
file: search.fl
[word="Frau"] cut 10;
cqp
command: cqp -I init.fl -r registry/ -D CORPUS_OL -f search.fl > results.txt
file: results.txt
===Context
Descriptor======================================= left context: 1 s right context: 1 s
corpus position: shown target anchors: not shown Positional Attributes: Structural
Attributes: Aligned Corpora:
============================================================
14203:
Am Ende des Flures steht rechts vor Wohnung 7
- 32 die arabische Mitbewohnerin von der Dehke ,
Frau
Fatima Mansur .
14695:
Tag ,
Frau
Dehke .
15579:
Eine kurzhaarige , blonde
Frau
betritt das Bad .
15833:
Ich bleibe nicht wegen der sich waschenden
Frau
am Fenster stehen .
16088:
Sie ist die einzige
Frau
in meinem Leben .
16678:
An der Eingangstür fällt mir die
Stimme meiner früheren
Frau
ein.
17301:
Eine arabisch aussehende
Frau
eilt mit nervösem Blick an mir vorbei die Treppe runter
.
17357:
Die Wohnung der duschenden
Frau
müÃte am Ende des Ganges liegen .
17639:
Ich stehe in einer fremden Wohnung neben einer
schlafenden
Frau
, die fast nichts an hat .
18673:
Ja ? fragt eine Stimme über die
Gegensprechanlage , eine
Frau
.
Hi Andrés! > cqp -I init.fl -r registry/ -D CORPUS_OL -f
search.fl > results.txt First, I'd suggest to experiment in an interactive CQP
session to get it to work there (because you can try different combinations of settings), and
then put the commands it into script files. > CORPUS_OL : corpus
origin language > CORPUS_TL : corpus target language
> Both corpus has been indexed and aligned. Assuming that the
corpora are properly aligned, you should have an alignment attribute corpus_tl in CORPUS_OL.
> On 20 Nov 2017, at 16:10, Andrés ChandÃa <andres at chandia.net>
wrote: > > set lc 25 ;
> set rc 25 ; set Context s; might make more sense
if you're displaying the aligned regions. > show +pos +lemma;
> show +s; What you're missing is to activate the alignment:
show +corpus_tl; Running a query like [word = "Frau"] cut 10;
should now display the aligned region for each query hit. This may be confusing if the source
region doesn't correspond to a single sentence. In current versions of CQP, you can use a
hack to display the actual alignment beads: set Context corpus_tl; Does this help?
Best, Stefan
_______________________
            andrés
chandÃa
NMT |
Dungupeyem | Corlexim
administrador de:
Parles.upf | Amind
terapia | ONG Mapuche koyaktu | Nocando | IAC
| CddZ | CatCg |
mail: ONG Mapuche koyaktu | Psicoaching |
P No imprima innecesariamente. ¡Cuide el medio ambiente!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20171120/a746e147/attachment.html>
More information about the CWB
mailing list