Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/LowinLi/Text-Summarizer-Pytorch-Chinese
/ functions
Functions
74 in github.com/LowinLi/Text-Summarizer-Pytorch-Chinese
⨍
Functions
74
◇
Types & classes
14
↳
Endpoints
1
↓ 25 callers
Function
get_cuda
(tensor)
train_util.py:6
↓ 23 callers
Method
word2id
(self, word)
data_util/data.py:61
↓ 15 callers
Method
size
(self)
data_util/data.py:71
↓ 4 callers
Method
__init__
(self)
model.py:203
↓ 4 callers
Function
make_folder
(folder_path)
make_data_files.py:25
↓ 3 callers
Method
abstract
(self, article)
eval.py:127
↓ 3 callers
Function
get_enc_data
(batch)
train_util.py:12
↓ 3 callers
Function
init_linear_wt
(linear)
model.py:24
↓ 3 callers
Method
next_batch
(self)
data_util/batcher.py:216
↓ 2 callers
Function
beam_search
(enc_hid, enc_out, enc_padding_mask, ct_e, extra_zeros, enc_batch_extend_vocab, model, start_i
beam_search.py:87
↓ 2 callers
Function
chunk_file
(set_name, chunks_dir, bin_file)
make_data_files.py:103
↓ 2 callers
Function
delete_folder
(folder_path)
make_data_files.py:30
↓ 2 callers
Method
evaluate_batch
(self, article)
eval.py:55
↓ 2 callers
Method
get_dec_inp_targ_seqs
(self, sequence, max_len, start_id, stop_id)
data_util/batcher.py:69
↓ 2 callers
Function
init_lstm_wt
(lstm)
model.py:9
↓ 2 callers
Function
preprocess
(x)
make_data_files.py:125
↓ 2 callers
Method
reward_function
(self, decoded_sents, original_sents)
train.py:203
↓ 2 callers
Method
setup_valid
(self)
eval.py:36
↓ 2 callers
Function
shuffle_text_data
(unshuffled_art, unshuffled_abs, shuffled_art, shuffled_abs)
make_data_files.py:35
↓ 2 callers
Method
train_batch_RL
Generate sentences from decoder entirely using sampled tokens as input. These sentences are used for ROUGE evaluation Args :param enc_
train.py:117
↓ 2 callers
Function
write_to_bin
(article_path, abstract_path, out_file, vocab_counter=None)
make_data_files.py:56
↓ 1 callers
Method
advance
Perform beam search: Considering the probabilites of given n_beam x n_extended_vocab words, select first n_beam words that give high total scores
beam_search.py:32
↓ 1 callers
Function
creating_finished_data
()
make_data_files.py:90
↓ 1 callers
Method
fill_example_queue
(self)
data_util/batcher.py:227
↓ 1 callers
Method
get_best
(self)
beam_search.py:70
↓ 1 callers
Function
get_cuda
(tensor)
eval.py:19
↓ 1 callers
Method
get_current_state
(self)
beam_search.py:25
↓ 1 callers
Function
get_dec_data
(batch)
train_util.py:41
↓ 1 callers
Method
id2word
(self, word_id)
data_util/data.py:66
↓ 1 callers
Method
init_decoder_seq
(self, example_list)
data_util/batcher.py:138
↓ 1 callers
Method
init_encoder_seq
(self, example_list)
data_util/batcher.py:104
↓ 1 callers
Function
init_wt_normal
(wt)
model.py:30
↓ 1 callers
Function
just_test
()
ci-test/test_case.py:1
↓ 1 callers
Function
main
()
test_web.py:7
↓ 1 callers
Method
pad_decoder_inp_targ
(self, max_len, pad_id)
data_util/batcher.py:80
↓ 1 callers
Method
pad_encoder_input
(self, max_len, pad_id)
data_util/batcher.py:86
↓ 1 callers
Method
print_original_predicted
(self, decoded_sents, ref_sents, article_sents, loadfile)
eval.py:45
↓ 1 callers
Method
save_model
(self, iter)
train.py:38
↓ 1 callers
Method
setup_train
(self)
train.py:47
↓ 1 callers
Method
store_orig_strings
(self, example_list)
data_util/batcher.py:159
↓ 1 callers
Method
text_generator
(self, example_generator)
data_util/batcher.py:297
↓ 1 callers
Method
trainIters
(self)
train.py:296
↓ 1 callers
Method
train_batch_MLE
Calculate Negative Log Likelihood Loss for the given batch. In order to reduce exposure bias, pass the previous generated token as in
train.py:65
↓ 1 callers
Method
train_one_batch
(self, batch, iter)
train.py:235
Method
__init__
(self, data_path, opt, batch_size=config.batch_size)
eval.py:26
Method
__init__
(self, opt)
eval.py:109
Method
__init__
(self, opt)
train.py:24
Method
__init__
(self, start_id, end_id, unk_id, hidden_state, context)
beam_search.py:6
Method
__init__
(self)
model.py:35
Method
__init__
(self)
model.py:64
Method
__init__
(self)
model.py:115
Method
__init__
(self)
model.py:151
Method
__init__
(self, vocab_file, max_size)
data_util/data.py:23
Method
__init__
(self, article, abstract_sentences, vocab)
data_util/batcher.py:19
Method
__init__
(self, example_list, vocab, batch_size)
data_util/batcher.py:94
Method
__init__
(self, data_path, vocab, mode, batch_size, single_pass)
data_util/batcher.py:173
Function
abstract
curl http://localhost:5000/abstract \ -XPOST \ -d '{"test": "文本"}' \ -H 'Content-Type: application/json'
web.py:24
Function
abstract2ids
(abstract_words, vocab, article_oovs)
data_util/data.py:128
Function
abstract2sents
(abstract)
data_util/data.py:165
Function
article2ids
(article_words, vocab)
data_util/data.py:108
Method
evaluate
(self, article, ref)
eval.py:114
Function
example_generator
(data_path, single_pass)
data_util/data.py:83
Method
fill_batch_queue
(self)
data_util/batcher.py:247
Method
forward
(self, x, seq_lens)
model.py:50
Method
forward
Perform attention over encoder hidden states :param st_hat: decoder hidden state at current time step :param h: encoder hidden states
model.py:72
Method
forward
Perform intra_decoder attention Args :param s_t: hidden state of decoder at current time step :param prev_s: If intra_decoder
model.py:124
Method
forward
(self, x_t, s_t, enc_out, enc_padding_mask, ct_e, extra_zeros, enc_batch_extend_vocab, sum_tem
model.py:169
Method
get_all
(self)
beam_search.py:80
Function
outputids2words
(id_list, vocab, article_oovs)
data_util/data.py:145
Function
show_abs_oovs
(abstract, vocab, article_oovs)
data_util/data.py:188
Function
show_art_oovs
(article, vocab)
data_util/data.py:179
Method
test_case
(self)
ci-test/test.py:6
Method
watch_threads
(self)
data_util/batcher.py:275
Method
write_metadata
(self, fpath)
data_util/data.py:74