<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-GB;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Verdana","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">That script says it was written by Marco Baroni in 2005. So it is clearly quite a lot of versions out of date. CWB did not handle any charsets other than Latin1
 back then, and CQPweb did not exist. You are <i>inevitably</i> going to run into problems attempting to use that script with a current version of CWB.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">If Marco is reading this he might be kind enough to point you to a more recent version. Otherwise, I don’t understand why you don’t just use the normal tools
 i.e. cwb-encode/cwb-make. That’s why we document them: <a href="http://cwb.sourceforge.net/files/CWB_Encoding_Tutorial/">
http://cwb.sourceforge.net/files/CWB_Encoding_Tutorial/</a> &nbsp;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">&gt;&gt;</span>2- How to install a new corpus from zero, the 2 ways... in CQP and in cqpWeb<span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">That’s what the tutorial is for.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">&gt;&gt;</span> If the texts are like &quot;word pos lemma&quot; how I fill the fields?<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">You put the information for “pos” in the first row, and the information for “lemma” in the second row. If a column doesn’t apply, leave it blank. Don’t tick
 “feature set”. It’s recommended to specify “pos” as primary.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">OR, use the built in annotation template called “POS plus lemma (TreeTagger format)” which covers exactly this configuration of p-attributes.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">best<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">Andrew.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> cwb-bounces@sslmit.unibo.it [mailto:cwb-bounces@sslmit.unibo.it]
<b>On Behalf Of </b>Daniel Renau<br>
<b>Sent:</b> 16 December 2015 20:35<br>
<b>To:</b> Open source development of the Corpus WorkBench<br>
<b>Subject:</b> Re: [CWB] Accents and codification<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Thank you Stefan and Andrew,<o:p></o:p></p>
</div>
<p class="MsoNormal">I just change this line in the registry file:<o:p></o:p></p>
<div style="margin-left:30.0pt">
<p class="MsoNormal">##:: charset = &quot;latin1&quot;&nbsp;&nbsp;&nbsp; # character encoding of corpus data<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">to<o:p></o:p></p>
<div style="margin-left:30.0pt">
<p class="MsoNormal" style="margin-bottom:12.0pt">##:: charset = &quot;utf8&quot;&nbsp;&nbsp;&nbsp; # character encoding of corpus data<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">and it works well: <a href="http://imgur.com/GvEnB11">
http://imgur.com/GvEnB11</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Like I said days ago, they use this script to encode corpus:
<a href="http://pastebin.com/xTEHaDdm">http://pastebin.com/xTEHaDdm</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">When the script calls the CWB::Encoder don't tell it to use utf8 and the encoder uses Latin1 by default:<o:p></o:p></p>
<div style="margin-left:30.0pt">
<p class="MsoNormal">&nbsp;-c &lt;charset&gt; specify corpus character set (instead of the default latin1)<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p class="MsoNormal">Now my doubts are...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">1- Better modify the script to call the encoder with &quot;-c utf8&quot;?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">2- How to install a new corpus from zero, the 2 ways... in CQP and in cqpWeb<br>
If the texts are like &quot;word pos lemma&quot; how I fill the fields?<o:p></o:p></p>
</div>
<div>
<div style="margin-left:30.0pt">
<p class="MsoNormal"><a href="http://i.imgur.com/NC7ua7n.png">http://i.imgur.com/NC7ua7n.png</a><o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I don't know how to pass the different attributes.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Thank you so much.<o:p></o:p></p>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">2015-12-16 13:14 GMT&#43;01:00 Hardie, Andrew &lt;<a href="mailto:a.hardie@lancaster.ac.uk" target="_blank">a.hardie@lancaster.ac.uk</a>&gt;:<o:p></o:p></p>
<p class="MsoNormal">The mess via SSH is because<br>
<br>
- less highlights the numeric representation of bytes it can't represent<br>
- it emits the ESC-[7m control sequence to do this<br>
- ssh is not interpreting this correctly when it comes in the middle of a utf8 sequence<br>
- this may have something to do with how the receiving console is configured<br>
- but the vm terminal does handle the ESC-[7m correctly<br>
- but in either case, the action of less in introducing those highlight codes stops the UTF-8 sequence resolving as it does for the accented characters.<br>
<br>
Daniel: For the browser, something to check is what presentation encoding it is automatically set to when visiting any page on your CQPweb server; this will tell you what charset your HTTP server is emitting in the Content-Type header. It ought to be emitting
 UTF-8. (And check your browser has auto-detect encoding switched on, or the equivalent; that's optional in Chrome but I don't know about other browsers).<br>
<br>
CQPweb always tries to&nbsp; set the HTTP Content-Type header to assert utf8 as the charset. It's possible, however, that your server might block this in some way ( I don't know how, but anything's possible I suppose).<br>
<br>
If neither browser nor HTTP server is the culprit, the next most likely explanation may be that you accidentally ticked the &quot;Tick here if the corpus is encoded in Latin1 (iso-8859-1) &quot; box in CQPweb's New Corpus form. If so, then the charset will be declared
 as latin1 in the registry file (instead of utf8 which is what it should be).<br>
<br>
If you did this, then CQPweb will re-code the data from (what it thinks is) latin1 to utf8 every time. If the underlying data is really UTF-8,&nbsp; that re-coding would produce the effect you are seeing.<br>
<br>
best<br>
<span style="color:#888888"><br>
Andrew.</span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
<br>
-----Original Message-----<br>
From: <a href="mailto:cwb-bounces@sslmit.unibo.it" target="_blank">cwb-bounces@sslmit.unibo.it</a> [mailto:<a href="mailto:cwb-bounces@sslmit.unibo.it" target="_blank">cwb-bounces@sslmit.unibo.it</a>] On Behalf Of Stefan Evert<br>
Sent: 16 December 2015 09:02<br>
To: CWBdev Mailing List<br>
Subject: Re: [CWB] Accents and codification<br>
<br>
<br>
&gt; On 16 Dec 2015, at 01:28, Daniel Renau &lt;<a href="mailto:alphak87@gmail.com" target="_blank">alphak87@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; There's a way to solve this problem with accents and apostrophe?<br>
&gt;<br>
&gt; Pic related: <a href="http://i.imgur.com/OAVDzuG.png" target="_blank">http://i.imgur.com/OAVDzuG.png</a><br>
&gt;<br>
&gt; At cqp via command line, the accents show OK (ssh connection or local terminal)<br>
&gt; At cqpWEB the accents are not displayed correctly.<br>
&gt; The apostrophe -&gt; ' &lt;- isn't shown properly anywhere, it shows &lt;80&gt;&lt;99&gt;<br>
&gt; At UTF8 table is named like &quot;RIGHT SINGLE QUOTATION MARK&quot;<br>
<br>
After taking a very close look at the screenshot, it would appear that your corpus is mostly encoded in UTF-8, but you have set CQPweb and/or your browser to interpret it as latin1.&nbsp; If you change these settings to be consistent with your actual corpus encoding,
 the text should display fine.<br>
<br>
The encoding of RIGHT SINGLE QUOTATION mark might actually be broken in your input data, since it appears as a sequence of three bytes in your VM terminal and especially given the absolute mess of characters (and control codes??) showing up via ssh.<br>
<br>
Did &quot;cwb-encode -c utf8&quot; actually accept this input as well-formed UTF-8?<br>
<br>
Best,<br>
Stefan<br>
<br>
<br>
_______________________________________________<br>
CWB mailing list<br>
<a href="mailto:CWB@sslmit.unibo.it" target="_blank">CWB@sslmit.unibo.it</a><br>
<a href="http://devel.sslmit.unibo.it/mailman/listinfo/cwb" target="_blank">http://devel.sslmit.unibo.it/mailman/listinfo/cwb</a><br>
_______________________________________________<br>
CWB mailing list<br>
<a href="mailto:CWB@sslmit.unibo.it" target="_blank">CWB@sslmit.unibo.it</a><br>
<a href="http://devel.sslmit.unibo.it/mailman/listinfo/cwb" target="_blank">http://devel.sslmit.unibo.it/mailman/listinfo/cwb</a><o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<br>
-- <o:p></o:p></p>
<div>
<p class="MsoNormal">Un saludo, Dani.<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>