Spaces:
Running
Running
Julien Chaumond
commited on
Commit
·
b784e3e
1
Parent(s):
2976762
more tweaks
Browse files- js-src/Displacy.ts +1 -1
- js-src/coref.ts +1 -1
js-src/Displacy.ts
CHANGED
|
@@ -78,7 +78,7 @@ class Displacy {
|
|
| 78 |
|
| 79 |
for (const sT of spanTags) {
|
| 80 |
if (sT.tag === "start") {
|
| 81 |
-
out.append(`<mark data-entity="${ sT.span.type.toLowerCase() }">`);
|
| 82 |
} else {
|
| 83 |
out.append(`</mark>`);
|
| 84 |
}
|
|
|
|
| 78 |
|
| 79 |
for (const sT of spanTags) {
|
| 80 |
if (sT.tag === "start") {
|
| 81 |
+
out.append(`<mark data-entity="${ sT.span.type.toLowerCase() }" data-index="${ (<any>sT.span).index }">`);
|
| 82 |
} else {
|
| 83 |
out.append(`</mark>`);
|
| 84 |
}
|
js-src/coref.ts
CHANGED
|
@@ -65,7 +65,7 @@ class Coref {
|
|
| 65 |
render(res: Response) {
|
| 66 |
const markup = Displacy.render(res.cleanedText, (<any>res).mentions); // We will sort the second param in Displacy
|
| 67 |
if (!this.container) { return ; }
|
| 68 |
-
console.log(markup); // todo remove
|
| 69 |
this.container.innerHTML = `<div class="text">${markup}</div>`;
|
| 70 |
}
|
| 71 |
}
|
|
|
|
| 65 |
render(res: Response) {
|
| 66 |
const markup = Displacy.render(res.cleanedText, (<any>res).mentions); // We will sort the second param in Displacy
|
| 67 |
if (!this.container) { return ; }
|
| 68 |
+
// console.log(markup); // todo remove
|
| 69 |
this.container.innerHTML = `<div class="text">${markup}</div>`;
|
| 70 |
}
|
| 71 |
}
|