We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b774e37 commit 824463aCopy full SHA for 824463a
1 file changed
x-pack/plugins/ml/server/models/job_service/new_job/categorization/examples.ts
@@ -145,10 +145,11 @@ export function categorizationExamplesProvider({
145
for (let g = 0; g < sumLengths.length; g++) {
146
if (t.start_offset <= sumLengths[g] + g) {
147
const offset = g > 0 ? sumLengths[g - 1] + g : 0;
148
+ const start = t.start_offset - offset;
149
tokensPerExample[g].push({
150
...t,
- start_offset: t.start_offset - offset,
151
- end_offset: t.end_offset - offset,
+ start_offset: start,
152
+ end_offset: start + t.token.length,
153
});
154
break;
155
}
0 commit comments