Julien Chaumond commited on
Commit
2976762
·
1 Parent(s): ee12ee4
Files changed (2) hide show
  1. js-src/coref.ts +1 -1
  2. 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).entities); // 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>`;
 
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="person"] {
26
  background: rgba(166, 226, 45, 0.2);
27
  border-color: #a6e22d
28
  }
29
- [data-entity][data-entity="person"]:after {
30
  background: #a6e22d
31
  }
32
- [data-entity][data-entity="norp"] {
33
  background: rgba(224, 0, 132, 0.2);
34
  border-color: #e00084
35
  }
36
- [data-entity][data-entity="norp"]:after {
37
  background: #e00084
38
  }
39
- [data-entity][data-entity="facility"] {
40
  background: rgba(67, 198, 252, 0.2);
41
  border-color: #43c6fc
42
  }
43
- [data-entity][data-entity="facility"]: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="gpe"] {
54
  background: rgba(253, 151, 32, 0.2);
55
  border-color: #fd9720
56
  }
57
- [data-entity][data-entity="gpe"]:after {
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"] {