Spaces:
Running
Running
Julien Chaumond
commited on
Commit
·
2976762
1
Parent(s):
ee12ee4
tweaks
Browse files- js-src/coref.ts +1 -1
- less/zDisplacy.less +15 -15
js-src/coref.ts
CHANGED
|
@@ -63,7 +63,7 @@ class Coref {
|
|
| 63 |
}
|
| 64 |
|
| 65 |
render(res: Response) {
|
| 66 |
-
const markup = Displacy.render(res.cleanedText, (<any>res).
|
| 67 |
if (!this.container) { return ; }
|
| 68 |
console.log(markup); // todo remove
|
| 69 |
this.container.innerHTML = `<div class="text">${markup}</div>`;
|
|
|
|
| 63 |
}
|
| 64 |
|
| 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>`;
|
less/zDisplacy.less
CHANGED
|
@@ -22,39 +22,39 @@
|
|
| 22 |
vertical-align: middle;
|
| 23 |
margin: 0 0 0.1rem 0.5rem
|
| 24 |
}
|
| 25 |
-
[data-entity][data-entity="
|
| 26 |
background: rgba(166, 226, 45, 0.2);
|
| 27 |
border-color: #a6e22d
|
| 28 |
}
|
| 29 |
-
[data-entity][data-entity="
|
| 30 |
background: #a6e22d
|
| 31 |
}
|
| 32 |
-
[data-entity][data-entity="
|
| 33 |
background: rgba(224, 0, 132, 0.2);
|
| 34 |
border-color: #e00084
|
| 35 |
}
|
| 36 |
-
[data-entity][data-entity="
|
| 37 |
background: #e00084
|
| 38 |
}
|
| 39 |
-
[data-entity][data-entity="
|
| 40 |
background: rgba(67, 198, 252, 0.2);
|
| 41 |
border-color: #43c6fc
|
| 42 |
}
|
| 43 |
-
[data-entity][data-entity="
|
| 44 |
background: #43c6fc
|
| 45 |
}
|
| 46 |
-
[data-entity][data-entity="org"] {
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
}
|
| 50 |
-
[data-entity][data-entity="org"]:after {
|
| 51 |
-
|
| 52 |
-
}
|
| 53 |
-
[data-entity][data-entity="
|
| 54 |
background: rgba(253, 151, 32, 0.2);
|
| 55 |
border-color: #fd9720
|
| 56 |
}
|
| 57 |
-
[data-entity][data-entity="
|
| 58 |
background: #fd9720
|
| 59 |
}
|
| 60 |
[data-entity][data-entity="loc"] {
|
|
|
|
| 22 |
vertical-align: middle;
|
| 23 |
margin: 0 0 0.1rem 0.5rem
|
| 24 |
}
|
| 25 |
+
[data-entity][data-entity="proper"] {
|
| 26 |
background: rgba(166, 226, 45, 0.2);
|
| 27 |
border-color: #a6e22d
|
| 28 |
}
|
| 29 |
+
[data-entity][data-entity="proper"]:after {
|
| 30 |
background: #a6e22d
|
| 31 |
}
|
| 32 |
+
[data-entity][data-entity="nominal"] {
|
| 33 |
background: rgba(224, 0, 132, 0.2);
|
| 34 |
border-color: #e00084
|
| 35 |
}
|
| 36 |
+
[data-entity][data-entity="nominal"]:after {
|
| 37 |
background: #e00084
|
| 38 |
}
|
| 39 |
+
[data-entity][data-entity="pronominal"] {
|
| 40 |
background: rgba(67, 198, 252, 0.2);
|
| 41 |
border-color: #43c6fc
|
| 42 |
}
|
| 43 |
+
[data-entity][data-entity="pronominal"]:after {
|
| 44 |
background: #43c6fc
|
| 45 |
}
|
| 46 |
+
// [data-entity][data-entity="org"] {
|
| 47 |
+
// background: rgba(67, 198, 252, 0.2);
|
| 48 |
+
// border-color: #43c6fc
|
| 49 |
+
// }
|
| 50 |
+
// [data-entity][data-entity="org"]:after {
|
| 51 |
+
// background: #43c6fc
|
| 52 |
+
// }
|
| 53 |
+
[data-entity][data-entity="list"] {
|
| 54 |
background: rgba(253, 151, 32, 0.2);
|
| 55 |
border-color: #fd9720
|
| 56 |
}
|
| 57 |
+
[data-entity][data-entity="list"]:after {
|
| 58 |
background: #fd9720
|
| 59 |
}
|
| 60 |
[data-entity][data-entity="loc"] {
|