[bt-devel] Problems with our OSIS handler (crashes with GerElb1905)

Eeli Kaikkonen eekaikko at mail.student.oulu.fi
Thu Mar 26 10:12:46 MST 2009


>> Comment By: Eeli Kaikkonen (eelik)
> Date: 2009-03-26 16:41
> 
> Message:
> This seems to be a bug in the module. I'll try to change BT code so that it
> doesn't crash, but it can't be displayed correctly. Xiphos displays the
> footnote in v.5 like this:
> 
> dh. überdeckte sie, ohne zu verdunkeln; denn es war eine lichte Wolke,
> "die prachtvolle Herrlichkeit"(G2.)(Petr.)(1,)(17). Dasselbe Wort wird von
> der Wolke gebraucht, welche die Stiftshütte bedeckte
> 
> The OSIS token handled in BT code is:
> w morph="robinson:G2. Petr. 1, 17"
> 

There is also problematic code in our handleToken.

First, there is:
if ((attrib = tag.getAttribute("lemma"))) {
	char splitChar = '|';
	const int countSplit1 = tag.getAttributePartCount("lemma", '|');
	const int countSplit2 =
		tag.getAttributePartCount("lemma", ' ');//TODO: not allowed, remove soon

What is this "//TODO: not allowed, remove soon"? Apparently it has taken 
care of a space as multiple lemma (and also morph, which uses similar 
code) separator. But someone has known that it can't be used as a 
separator. If I take away the code related to spaces and leave only '|' 
there, it works and doesn't crash. So, can I do and commit it?

There's another problem in line 200 where it originally crashed.

const bool skipFirst =
	((val[0] == 'T') && ((val[1] == 'H') || (val[1] == 'H')));

I don't know what T and H are, but at least it's obvious that
	(val[1] == 'H') || (val[1] == 'H')
is not logical.


--Eeli Kaikkonen



More information about the bt-devel mailing list