bstds commited on
Commit
8fc43d5
·
1 Parent(s): 703174e

Update modeling_re_bert.py

Browse files
Files changed (1) hide show
  1. modeling_re_bert.py +15 -15
modeling_re_bert.py CHANGED
@@ -6,21 +6,21 @@ import torch.nn as nn
6
  from transformers import BertConfig, BertModel, BertPreTrainedModel
7
 
8
  FEW_REL_DEFINITIONS = [
9
- {"name": "sport", "description": "sport in which the subject participates or belongs to", "relation_type": "P641"}
10
- {"name": "member of", "description": "organization or club to which the subject belongs. Do not use for membership in ethnic or social groups, nor for holding a position such as a member of parliament (use P39 for that).", "relation_type": "P463"}
11
- {"name": "constellation", "description": "the area of the celestial sphere of which the subject is a part (from a scientific standpoint, not an astrological one)", "relation_type": "P59"}
12
- {"name": "follows", "description": "immediately prior item in a series of which the subject is a part [if the subject has replaced the preceding item, e.g. political offices, use \"replaces\" (P1365)]", "relation_type": "P155"}
13
- {"name": "spouse", "description": "the subject has the object as their spouse (husband, wife, partner, etc.). Use \"partner\" (P451) for non-married companions", "relation_type": "P26"}
14
- {"name": "military rank", "description": "military rank achieved by a person (should usually have a \"start time\" qualifier), or military rank associated with a position", "relation_type": "P410"}
15
- {"name": "crosses", "description": "obstacle (body of water, road, ...) which this bridge crosses over or this tunnel goes under", "relation_type": "P177"}
16
- {"name": "competition class", "description": "official classification by a regulating body under which the subject (events, teams, participants, or equipment) qualifies for inclusion", "relation_type": "P2094"}
17
- {"name": "located in or next to body of water", "description": "sea, lake or river", "relation_type": "P206"}
18
- {"name": "voice type", "description": "person's voice type. expected values: soprano, mezzo-soprano, contralto, countertenor, tenor, baritone, bass (and derivatives)", "relation_type": "P412"}
19
- {"name": "child", "description": "subject has object as biological, foster, and/or adoptive child", "relation_type": "P40"}
20
- {"name": "mother", "description": "female parent of the subject. For stepmother, use \"stepparent\" (P3448)", "relation_type": "P25"}
21
- {"name": "main subject", "description": "primary topic of a work (see also P180: depicts)", "relation_type": "P921"}
22
- {"name": "position played on team / speciality", "description": "position or specialism of a player on a team, e.g. Small Forward", "relation_type": "P413"}
23
- {"name": "part of", "description": "object of which the subject is a part (it's not useful to link objects which are themselves parts of other objects already listed as parts of the subject). Inverse property of \"has part\" (P527, see also \"has parts of the class\" (P2670)).", "relation_type": "P361"}
24
  {"name": "original language of film or TV show", "description": "language in which a film or a performance work was originally created. Deprecated for written works; use P407 (\"language of work or name\") instead.", "relation_type": "P364"}
25
  ]
26
 
 
6
  from transformers import BertConfig, BertModel, BertPreTrainedModel
7
 
8
  FEW_REL_DEFINITIONS = [
9
+ {"name": "sport", "description": "sport in which the subject participates or belongs to", "relation_type": "P641"},
10
+ {"name": "member of", "description": "organization or club to which the subject belongs. Do not use for membership in ethnic or social groups, nor for holding a position such as a member of parliament (use P39 for that).", "relation_type": "P463"},
11
+ {"name": "constellation", "description": "the area of the celestial sphere of which the subject is a part (from a scientific standpoint, not an astrological one)", "relation_type": "P59"},
12
+ {"name": "follows", "description": "immediately prior item in a series of which the subject is a part [if the subject has replaced the preceding item, e.g. political offices, use \"replaces\" (P1365)]", "relation_type": "P155"},
13
+ {"name": "spouse", "description": "the subject has the object as their spouse (husband, wife, partner, etc.). Use \"partner\" (P451) for non-married companions", "relation_type": "P26"},
14
+ {"name": "military rank", "description": "military rank achieved by a person (should usually have a \"start time\" qualifier), or military rank associated with a position", "relation_type": "P410"},
15
+ {"name": "crosses", "description": "obstacle (body of water, road, ...) which this bridge crosses over or this tunnel goes under", "relation_type": "P177"},
16
+ {"name": "competition class", "description": "official classification by a regulating body under which the subject (events, teams, participants, or equipment) qualifies for inclusion", "relation_type": "P2094"},
17
+ {"name": "located in or next to body of water", "description": "sea, lake or river", "relation_type": "P206"},
18
+ {"name": "voice type", "description": "person's voice type. expected values: soprano, mezzo-soprano, contralto, countertenor, tenor, baritone, bass (and derivatives)", "relation_type": "P412"},
19
+ {"name": "child", "description": "subject has object as biological, foster, and/or adoptive child", "relation_type": "P40"},
20
+ {"name": "mother", "description": "female parent of the subject. For stepmother, use \"stepparent\" (P3448)", "relation_type": "P25"},
21
+ {"name": "main subject", "description": "primary topic of a work (see also P180: depicts)", "relation_type": "P921"},
22
+ {"name": "position played on team / speciality", "description": "position or specialism of a player on a team, e.g. Small Forward", "relation_type": "P413"},
23
+ {"name": "part of", "description": "object of which the subject is a part (it's not useful to link objects which are themselves parts of other objects already listed as parts of the subject). Inverse property of \"has part\" (P527, see also \"has parts of the class\" (P2670)).", "relation_type": "P361"},
24
  {"name": "original language of film or TV show", "description": "language in which a film or a performance work was originally created. Deprecated for written works; use P407 (\"language of work or name\") instead.", "relation_type": "P364"}
25
  ]
26