[CWB] unicode problems with Greek and OCS

Hardie, Andrew a.hardie at lancaster.ac.uk
Tue Mar 10 12:02:47 CET 2015


Is the context size measured in characters? If so, that would explain the problem, since “characters” = bytes still.

If changing the context width to a given number of words fixes the issue, then that is the solution.

I have been working on a patch to fix this, but have not completed it yet.

Andrew.

From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Ruprecht von Waldenfels
Sent: 10 March 2015 09:54
To: cwb at sslmit.unibo.it
Subject: [CWB] unicode problems with Greek and OCS

Dear List,

I am using CWB 3.4.8 on 64 bit Ubuntu 14.10.
After encoding a text in Old Church Slavonic, I get invalid UTF-8 character errors; I seem to get them only in sgml mode (I also get them during alignment with the Ancient Greek translation source, which might be a related problem, but I am not sure.)

In order to pinpoint the problem with the Old Church Slavonic text, I have reduced the text in question to two bible verses. The text can be found here: www.parasolcorpus.org/test.txt<http://www.parasolcorpus.org/test.txt>

I encode the corpus with the following commands:
/opt/CWBUTF8/cwb/utils/cwb-encode -d Data/ntestament_tt -f test.txt -R /data/PROIEL/Registry/ntestament_tt -c utf8 -xsB -P lemma -P id -P alig -P pos -P tag -S aligVerse:0
/opt/CWBUTF8/cwb/utils/cwb-makeall -r /data/PROIEL/Registry NTESTAMENT_TT

There is no problem in text mode:

[cid:image001.png at 01D05B21.BE02FE60]

However, in sgml mode, some lemmas get truncated and do not contain valid utf8 anymore. For example, the lemma of "с҃вщаѩи" is such a token. This problem does NOT appear if I search for this token itself, it ONLY and consistently appears if I search for a different token and the problematic token is in the result set:
[cid:image002.png at 01D05B21.BE02FE60]

To sum up: I get the problem only if I search for a neighboring token in sgml mode. I don't get it if I search for the token itself, and I don't get it in text mode. I have reduced the problem to w 50-token text, and the problem persists.

Any help would be greatly appreciated!
Best,
Ruprecht



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://devel.sslmit.unibo.it/pipermail/cwb/attachments/20150310/f5c27f7b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 77569 bytes
Desc: image001.png
URL: <http://devel.sslmit.unibo.it/pipermail/cwb/attachments/20150310/f5c27f7b/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 85145 bytes
Desc: image002.png
URL: <http://devel.sslmit.unibo.it/pipermail/cwb/attachments/20150310/f5c27f7b/attachment-0003.png>


More information about the CWB mailing list