comphist / cora

A web-based, token-level annotation tool for non-standard language data
http://www.linguistics.rub.de/comphist/resources/cora/
MIT License
10 stars 6 forks source link

Splitting and merging tokens does not work #83

Closed mbollmann closed 7 years ago

mbollmann commented 8 years ago

Originally reported by: fab-bar (Bitbucket: fab-bar, GitHub: fab-bar)


We noticed yesterday that splitting or merging tokens in the ReN-Corpus (by inserting "§" or "# " into the tokentext) does not work anymore.

CorA outputs the follwoing error message:

Ein interner Fehler ist aufgetreten (Code: 1211). SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'NULL' for column 'id' at row 1 INSERT INTO dipl (id, tok_id, line_id, utf, trans) VALUES (:diplid, :tokid, :lineid, :utf, :trans) ON DUPLICATE KEY UPDATE line_id=VALUES(line_id), utf=VALUES(utf), trans=VALUES(trans)


mbollmann commented 8 years ago

Original comment by fab-bar (Bitbucket: fab-bar, GitHub: fab-bar):


I have asked around: seems like everyone is using linebreaks.

So it is very probable that this bug just did not occur for us.

mbollmann commented 8 years ago

Original comment by Marcel Bollmann (Bitbucket: mbollmann, GitHub: mbollmann):


Looking at the code, it seems to calculate the line count based on actual linebreaks, not on the dipl_breaks attribute returned by the edit script, as it probably should. This looks like it's a bug.

However, this can't be a new bug then, since the code hasn't effectively changed since last year...

mbollmann commented 8 years ago

Original comment by fab-bar (Bitbucket: fab-bar, GitHub: fab-bar):


Thank you. However, setting the token text to something like "ex# ample" still leads to the SQL error. Doing the same with a linebreak works. Splitting ("§") also works fine.

mbollmann commented 8 years ago

Original comment by Marcel Bollmann (Bitbucket: mbollmann, GitHub: mbollmann):


Should work again now.

mbollmann commented 8 years ago

Original comment by Marcel Bollmann (Bitbucket: mbollmann, GitHub: mbollmann):


Duplicate of #70.

mbollmann commented 8 years ago

Original comment by Marcel Bollmann (Bitbucket: mbollmann, GitHub: mbollmann):


Pretty sure this is identical to issue #70, which is fixed in the code, but not on the server yet.

Looking to fix it in production, but closing here.