-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup_db.sql
40 lines (37 loc) · 895 Bytes
/
setup_db.sql
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
DROP TABLE IF EXISTS raw_news CASCADE;
CREATE TABLE raw_news(
news_id bigserial primary key,
url text,
news_title text,
news_text text,
news_time timestamp with time zone,
mentioned_org text[],
mentioned_people text[]
);
DROP TABLE IF EXISTS sentences CASCADE;
CREATE TABLE sentences(
document_id bigint,
sentence text,
words text[],
lemma text[],
pos_tags text[],
dependencies text[],
ner_tags text[],
parse_tree text,
sentence_offset bigint,
sentence_id text -- unique identifier for sentences
);
DROP TABLE IF EXISTS doc_coreference CASCADE;
CREATE TABLE doc_coreference(
document_id bigint,
coreferences text[],
coref_offset bigint,
coref_id text -- unique identifier for doc_coreference
);
DROP TABLE IF EXISTS doc_coref CASCADE;
CREATE TABLE doc_coref(
sentence_id text,
sen_coref text[],
document_id bigint,
sentence_offset bigint
);