File size: 2,064 Bytes
6f7496c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
qid_to_location_label = {
    "Q82794": "geographical region",
    "Q6256": "country",
    "Q3624078": "sovereign state",
    "Q35657": "U.S. state",
    "Q515": "city",
    "Q532": "village",
    "Q3957": "town",
    "Q2983893": "municipality",
    "Q486972": "human settlement",
    "Q23442": "island",
    "Q8502": "mountain",
    "Q23397": "lake",
    "Q4022": "river",
    "Q123705": "peninsula",
    "Q13221722": "bay",
    "Q165": "sea",
    "Q124714": "ocean",
    "Q42124": "continent",
    "Q23413": "territory",
    "Q1048835": "province",
    "Q107390": "county",
    "Q13220204": "district",
    "Q13218630": "subdistrict",
    "Q618123": "location",  # geographical object
    "Q2221906": "location",  # geographical location
    "Q17334923": "location",  # geographical region
}
TYPE_MAP = {
    "Q5": "person",  # human
    "Q43229": "organization",  # organization
    "Q95074": "organization",  # company
    "Q783794": "organization",  # non-profit
    "Q618123": "location",  # geographical object
    "Q2221906": "location",  # geographical location
    "Q17334923": "location",  # geographical region
    "Q6256": "location",  # country
    "Q515": "location",  # city
}

qid_to_location_label_keys = set(qid_to_location_label.keys())
qid_to_organization_label = {
    "Q43229": "organization",  # organization
    "Q95074": "company",  # company
    "Q783794": "non-profit",  # non-profit organization
    "Q891723": "international organization",
    "Q163740": "political party",
    "Q178706": "trade union",
    "Q189004": "government agency",
    "Q327333": "educational institution",
    "Q31855": "university",
    "Q219885": "research institute",
    "Q12973014": "NGO",  # non-governmental organization
    "Q7210356": "television network",
    "Q33231": "military unit",
    "Q15911314": "sports club",
    "Q57660343": "media organization",
    "Q167037": "religious organization",
    "Q4438121": "publishing company",
    "Q2088357": "academic publisher",
}
qid_to_organization_label_keys = set(qid_to_organization_label.keys())