|
|
@ -300,10 +300,21 @@ function setupInterface(data, file, urls) {
|
|
|
|
|
|
|
|
|
|
|
|
notifyChange();
|
|
|
|
notifyChange();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (editingTd.tokenizer_action.includes('start-sentence')) {
|
|
|
|
else if (editingTd.tokenizer_action.includes('sentence')) {
|
|
|
|
|
|
|
|
|
|
|
|
let pos = tableInfo.nRow;
|
|
|
|
let pos = tableInfo.nRow;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let new_row = JSON.parse(JSON.stringify(data.data[pos]))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(new_row)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data.data.splice(pos, 0, new_row);
|
|
|
|
|
|
|
|
data.data[pos]['No.'] = 0
|
|
|
|
|
|
|
|
data.data[pos]['TOKEN'] = ''
|
|
|
|
|
|
|
|
pos += 1
|
|
|
|
|
|
|
|
|
|
|
|
let word_pos = 1;
|
|
|
|
let word_pos = 1;
|
|
|
|
while ((pos < data.data.length) && (data.data[pos]['No.'] != 1)) {
|
|
|
|
while ((pos < data.data.length) && (data.data[pos]['No.'] != 1) && (data.data[pos]['TOKEN'] != '') ) {
|
|
|
|
data.data[pos]['No.'] = word_pos;
|
|
|
|
data.data[pos]['No.'] = word_pos;
|
|
|
|
pos++;
|
|
|
|
pos++;
|
|
|
|
word_pos++;
|
|
|
|
word_pos++;
|
|
|
|