[CWB] Can't use sentence (s) as position label
Hardie, Andrew
a.hardie at lancaster.ac.uk
Wed Aug 28 08:46:46 CEST 2019
That was just an example. What I mean is that you can’t use XML elements, only XML attributes (And it is the value of the attribute that appears). These must first exist in your corpus of course.
So, if you want to use sentence numbers, you need to have a sentence number attribute (call it num, n or whatever) on <s> . If you only have <s> … </s> with no attribute-values, then there is nothing to use as a label.
And that requires having <s num=”…”> in your corpus input files, and declaring num as an attribute of s when indexing. That internally will define s_num.
Andrew.
From: Scott Sadowsky <ssadowsky at gmail.com>
Sent: 28 August 2019 07:40
To: Hardie, Andrew <a.hardie at lancaster.ac.uk>
Cc: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it>
Subject: Re: [CWB] Can't use sentence (s) as position label
On Wed, Aug 28, 2019 at 2:08 AM Hardie, Andrew <a.hardie at lancaster.ac.uk<mailto:a.hardie at lancaster.ac.uk>> wrote:
Hi Andrew,
You can only use attributes as position labels if they have values. IE they need ot be derived attributes such as s_num to access <s num=”nnn”>
<s> doesn’t have a value of tis own. Thus the error.
I don't see s_num anywhere in my corpus, so I'm guessing you're talking about a user-generated variable. How can something like this be created via CWB? Do sentences indeed have an internal index number that can be accessed?
Cheers,
Scott
I’ll fix it so that attributes that can’t be used don’t appear as options.
best
Andrew.
From: cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it> <cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it>> On Behalf Of Scott Sadowsky
Sent: 28 August 2019 04:23
To: Open source development of the Corpus WorkBench <CWB at liste.sslmit.unibo.it<mailto:CWB at liste.sslmit.unibo.it>>
Subject: [CWB] Can't use sentence (s) as position label
Hi All,
I'm trying to add sentence (s) as a position label so that query results can be cited properly. But when I try, I get "[UNREADABLE]" in the display:
[image.png]
The same thing happens with text and text_id, but not with any "proper" p-attributes, which all display just fine.
Suggestions?
Best wishes,
Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20190828/3cd2cf0e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 34027 bytes
Desc: image001.png
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20190828/3cd2cf0e/attachment-0001.png>
More information about the CWB
mailing list