Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Anery/RSAN
/ functions
Functions
89 in github.com/Anery/RSAN
⨍
Functions
89
◇
Types & classes
13
↓ 6 callers
Method
find_pos
return position list
data_prepare.py:67
↓ 6 callers
Method
reset
(self, prefix)
DataLoader.py:124
↓ 4 callers
Function
pickle_dump
(obj, f)
data_prepare.py:16
↓ 4 callers
Function
pickle_load
(f)
misc/utils.py:8
↓ 3 callers
Method
__len__
(self)
DataLoader.py:17
↓ 3 callers
Function
read_json
(filename)
data/webnlg/util.py:8
↓ 3 callers
Method
read_json
(self, filename)
data_prepare.py:60
↓ 3 callers
Function
save_checkpoint
(model, infos, optimizer, histories=None, append='')
train.py:22
↓ 3 callers
Function
write_data
(f, data)
data/multiNYT/util.py:16
↓ 3 callers
Function
write_data
(f, data)
data/webnlg/util.py:16
↓ 2 callers
Method
__init__
(self, opt)
networks/decoder.py:61
↓ 2 callers
Method
get_batch_dev_test
(self, batch_size, prefix)
DataLoader.py:164
↓ 2 callers
Method
get_batch_train
(self, batch_size)
DataLoader.py:135
↓ 2 callers
Function
get_chunk_type
Args: tok: id of token, ex 4 idx_to_tag: dictionary {4: "B-PER", ...} Returns: tuple: "B", "PER"
misc/utils.py:46
↓ 2 callers
Function
is_EPO
(triples)
Test.py:47
↓ 2 callers
Function
is_normal_triple
normal triples means triples are not over lap in entity. example [[e1,e2,r1], [e3,e4,r2]] :param triples :param is_relation_first
Test.py:15
↓ 2 callers
Method
process_dev_test
(self, dataset)
data_prepare.py:84
↓ 2 callers
Method
process_sentence
(self, sent_text)
data_prepare.py:233
↓ 2 callers
Function
read_json
(filename)
data/multiNYT/util.py:8
↓ 1 callers
Function
Test
(opt)
Test.py:176
↓ 1 callers
Method
__init__
(self, opt)
networks/embedding.py:32
↓ 1 callers
Function
build_labels
parameter :label2id_file: filename of label2id
data/multiNYT/util.py:80
↓ 1 callers
Function
build_labels
parameter :label2id_file: filename of label2id
data/webnlg/util.py:67
↓ 1 callers
Function
build_rel2id
(data, rel2id_file)
data/multiNYT/util.py:66
↓ 1 callers
Function
build_word_dict
(data, out_path)
data/webnlg/util.py:23
↓ 1 callers
Function
eval
Evaluation :parameter :parameter :return: P,R,F1
eval_utils.py:7
↓ 1 callers
Function
get_chunks
Given a sequence of tags, group entities and their position Args: seq: np.array[4, 4, 0, 0, ...] sequence of labels tags: dict["O"
misc/utils.py:64
↓ 1 callers
Method
init
(self)
networks/embedding.py:18
↓ 1 callers
Method
init_weights
(self)
networks/decoder.py:12
↓ 1 callers
Method
init_weights
(self)
networks/decoder.py:37
↓ 1 callers
Method
init_weights
(self)
networks/decoder.py:78
↓ 1 callers
Method
init_weights
(self)
networks/embedding.py:44
↓ 1 callers
Function
is_SEO
(triples)
Test.py:40
↓ 1 callers
Function
load_label
(input_label2id)
train.py:17
↓ 1 callers
Function
load_label
(input_label2id)
Test.py:11
↓ 1 callers
Method
masked_mean
(self, sent, mask)
networks/decoder.py:87
↓ 1 callers
Function
multiple_test
(predictions, targets)
Test.py:104
↓ 1 callers
Method
nn_decode
(self, inputs, sen_len)
networks/decoder.py:92
↓ 1 callers
Function
overlapping_test
(predictions, targets)
Test.py:56
↓ 1 callers
Method
prepare
(self)
data_prepare.py:38
↓ 1 callers
Method
process_train
(self, dataset)
data_prepare.py:121
↓ 1 callers
Function
split
(data)
data/multiNYT/util.py:36
↓ 1 callers
Function
split
(data)
data/webnlg/util.py:37
↓ 1 callers
Function
tag_mapping
parameters predict_tags : np.array, shape: (rel_number, max_sen_len) cur_relation : list of relation id
misc/utils.py:119
↓ 1 callers
Function
train
(opt)
train.py:38
Method
__getitem__
(self, idx)
DataLoader.py:20
Method
__getitem__
(self, idx)
DataLoader.py:47
Method
__init__
(self, opt)
data_prepare.py:25
Method
__init__
(self, root, prefix)
DataLoader.py:12
Method
__init__
(self, opt)
DataLoader.py:27
Method
__init__
(self, opt)
DataLoader.py:107
Method
__init__
(self, opt)
networks/decoder.py:6
Method
__init__
(self, opt)
networks/decoder.py:27
Method
__init__
(self, opt)
networks/encoder.py:6
Method
__init__
(self, opt)
networks/embedding.py:10
Method
__init__
(self, opt)
model/Rel_based_labeling.py:8
Method
__init__
(self)
misc/utils.py:38
Method
__init__
(self, Model, opt)
misc/LossWrapper.py:6
Method
__len__
(self)
DataLoader.py:41
Function
attn_mapping
(attn_scores, gts)
misc/utils.py:113
Function
build_char
()
data/multiNYT/util.py:113
Function
build_char
()
data/webnlg/util.py:100
Function
build_optimizer
(params, opt)
misc/utils.py:20
Function
build_tags
()
data/multiNYT/util.py:105
Function
build_tags
()
data/webnlg/util.py:92
Function
build_word_dict
(data, out_path)
data/multiNYT/util.py:23
Function
clip_gradient
(optimizer, grad_clip)
misc/utils.py:32
Function
dev_test_collate
(features)
DataLoader.py:66
Function
evaluate
(model, loader, label2id, batch_size, rel_num, prefix)
eval_utils.py:20
Method
forward
(self, sent, rel, mask)
networks/decoder.py:15
Method
forward
(self, sent_h, rel, pool, mask)
networks/decoder.py:43
Method
forward
(self, sent, rel, mask, sen_len)
networks/decoder.py:103
Method
forward
(self, x, sen_len)
networks/encoder.py:21
Method
forward
x: one char sequence. shape: (max_len, max_word_len)
networks/embedding.py:21
Method
forward
x,pos : (batch, max_len) char : (batch, max_len, max_word_len)
networks/embedding.py:52
Method
forward
(self, sent, sen_len, rel, mask, poses=None, chars=None)
model/Rel_based_labeling.py:15
Method
forward
(self, input, target, mask)
misc/utils.py:41
Method
forward
(self, sent, sen_len, rel, mask, label, mask2, poses=None, chars=None)
misc/LossWrapper.py:12
Function
parse_opt
()
config.py:3
Function
parse_opt
()
data/webnlg/config.py:3
Function
pickle_dump
(obj, f)
misc/utils.py:14
Function
pickle_load
(f)
data_prepare.py:10
Function
run_split
(origin_train, train, test, valid)
data/multiNYT/util.py:57
Function
run_split
(origin_train, train, test, valid)
data/webnlg/util.py:58
Function
save_relation_freq
(data, rel2count_filename)
data/multiNYT/util.py:141
Function
save_relation_freq
(data, rel2count_filename)
data/webnlg/util.py:127
Function
set_lr
(optimizer, lr)
misc/utils.py:28
Function
setup
(opt)
model/__init__.py:5
Function
train_collate
(features)
DataLoader.py:84