-
Notifications
You must be signed in to change notification settings - Fork 24
/
App.tsx
189 lines (182 loc) · 25.5 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
import React, { useRef, useState } from 'react';
import { JSONTree } from 'react-json-tree';
import Annotator from 'react-pdf-ner-annotator';
import { Entity, IEntityHover } from 'react-pdf-ner-annotator/src/interfaces/entity';
import { Annotation } from 'react-pdf-ner-annotator/src/interfaces/annotation';
import { AnnotatorHandle } from 'react-pdf-ner-annotator/src/types';
import PDFFile from './pdfs/order.pdf';
import KlassifaiLogo from './klassifai.svg';
import './App.scss';
import 'react-pdf-ner-annotator/src/scss/style.scss';
const defaultAnnotations: Array<Annotation> = [{
'id': 4,
'page': 1,
'areaAnnotation': {
'boundingBox': { 'left': 60, 'top': 35, 'width': 230, 'height': 38 },
'pdfInformation': { 'width': 892.92, 'height': 1262.835, 'scale': 1.5 },
'base64Image': 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gIoSUNDX1BST0ZJTEUAAQEAAAIYAAAAAAIQAABtbnRyUkdCIFhZWiAAAAAAAAAAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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aupjlrs3cYLESzRh+ee5Q3lTz5PBAJ8kE67WMfXsSrOfUinUdomgkaKQr7drFfBH45HIHgHjxrJNG8BcxaFlpu3wNLkr5s21RREHbdv7otE/t7aFliDGFjGxRlpvBsquMhjhnXGTIGtCwUCUlx3L0Ytbzy3Os+RtWAqNII4kbuSGBFhiRueQQiAAsD7MxZv512goVoCzKheRh2tLMzSysOOOO5yeAR7hQo8nx5OoZ7D+BvgDYhShHobclT16q1FXdOlqXuS1xWnhLVIYcTJzMRTDlSqK6Qe266wtuuHRAwQrig4liPEwlhM2PcGRjHPdA8nYI/XeBGmKD2VpAB3Ae/1BiT5bnUSTCUZD5WVY+8v6KTOIe4+5Cee3n/xI4HgcDVluhOcNH8v0QXWuhNbVzWtPGdUU7HwbDzhkqevH09K2CckHzZ2xzD//AO8tOyUhIPf8LJynGMYq7Fme1IZbErSufHLHwAPZVUcKqj7KoA/jVjBXhrII4I1jQfZfcn8sx5Zj+SxJ/nXdvvDXtp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pp5pr//2Q==',
'text': 'SlicedInvoices',
},
'entity': { 'id': 7, 'name': 'Logo', 'color': '#b39ddb', 'entityType': 'AREA' },
}, {
'id': 5,
'page': 1,
'nerAnnotation': { 'tokens': ['INV-3337'], 'textIds': [4] },
'entity': { 'id': 5, 'name': 'Reference', 'color': '#DCE775', 'entityType': 'NER' },
}, {
'id': 6,
'page': 1,
'nerAnnotation': { 'tokens': ['January', '25', ',', '2016'], 'textIds': [18, 19, 20, 21] },
'entity': { 'id': 4, 'name': 'Date', 'color': '#AED581', 'entityType': 'NER' },
}, {
'id': 7,
'page': 1,
'nerAnnotation': { 'tokens': ['January', '31', ',', '2016'], 'textIds': [27, 28, 29, 30] },
'entity': { 'id': 4, 'name': 'Date', 'color': '#AED581', 'entityType': 'NER' },
}, {
'id': 8,
'page': 1,
'nerAnnotation': {
'tokens': ['123', 'Somewhere', 'St', 'Melbourne', ',', 'VIC', '3000'],
'textIds': [46, 47, 48, 49, 50, 51, 52],
},
'entity': { 'id': 1, 'name': 'Location', 'color': '#4DD0E1', 'entityType': 'NER' },
}, {
'id': 9,
'page': 1,
'nerAnnotation': { 'tokens': ['Test', 'Business'], 'textIds': [44, 45] },
'entity': { 'id': 3, 'name': 'Organisation', 'color': '#81C784', 'entityType': 'NER' },
}, {
'id': 10,
'page': 1,
'nerAnnotation': {
'tokens': ['ANZ', 'Bank', 'ACC', '#', '1234', '1234', 'BSB', '#', '4321', '432'],
'textIds': [90, 91, 92, 93, 94, 95, 96, 97, 98, 99],
},
'entity': { 'id': 6, 'name': 'Other', 'color': '#FF8A65', 'entityType': 'NER' },
}];
const entities: Array<Entity> = [
{
id: 1,
name: 'Location',
color: '#4DD0E1',
entityType: 'NER',
},
{
id: 2,
name: 'Person',
color: '#4DB6AC',
entityType: 'NER',
},
{
id: 3,
name: 'Organisation',
color: '#81C784',
entityType: 'NER',
},
{
id: 4,
name: 'Date',
color: '#AED581',
entityType: 'NER',
},
{
id: 5,
name: 'Reference',
color: '#DCE775',
entityType: 'NER',
},
{
id: 6,
name: 'Other',
color: '#FF8A65',
entityType: 'NER',
},
{
id: 7,
name: 'Logo',
color: '#b39ddb',
entityType: 'AREA',
},
];
const App = () => {
const [selectedEntity, setSelectedEntity] = useState(-1);
const [annotations, setAnnotations] = useState<Array<Annotation>>(defaultAnnotations);
const [textMap, setTextMap] = useState<any>([]);
const [hoveredEntities, setHoveredEntities] = useState<Array<IEntityHover>>([]);
const childRef = useRef<AnnotatorHandle<typeof Annotator>>();
const handleEnter = (entityId: number) => {
setHoveredEntities((prev) => [...prev, { id: entityId }]);
};
const handleLeave = (entityId: number) => {
setHoveredEntities((prev) => [...prev].filter((entity) => entity.id !== entityId));
}
return (
<div className="app-container">
<div className="app__header">
<h1>React PDF NER Annotator</h1>
</div>
<div className="app__content">
<div className="app__content-wrapper">
<div className="app__content-output">
<JSONTree data={{
annotations,
textMap,
}}
/>
</div>
<div className="app__content-main">
<Annotator
data={PDFFile}
defaultAnnotations={defaultAnnotations}
entity={entities[selectedEntity]}
hoveredEntities={hoveredEntities}
getAnnotations={setAnnotations}
getTextMaps={setTextMap}
ref={childRef}
config={{
shouldUpdateDefaultAnnotations: true,
}}
/>
</div>
<div className="app__content-entities">
<h1>Entities</h1>
{
entities.map((entity, index) => (
<div
className="entity-container"
key={entity.id}
onMouseEnter={() => handleEnter(entity.id)}
onMouseLeave={() => handleLeave(entity.id)}
>
<span className="entity__hotkey">
{index + 1}
</span>
<span
role="button"
className="entity__name"
style={(selectedEntity === index || selectedEntity === -1) ?
{ backgroundColor: entity.color } : { backgroundColor: '#bebebe' }}
onClick={() => setSelectedEntity(selectedEntity !== index ? index : -1)}
>
{entity.name}
</span>
</div>
))
}
</div>
</div>
</div>
<div className="app__footer">
<h1>Made by</h1>
<a href="https://www.klassif.ai/">
<img
className="app__footer-logo"
src={KlassifaiLogo}
alt="Klassif.ai logo"/>
</a>
</div>
</div>
);
};
export default App;