SYMBOL INDEX (203 symbols across 21 files) FILE: bert/modeling.py class BertConfig (line 31) | class BertConfig(object): method __init__ (line 34) | def __init__(self, method from_dict (line 83) | def from_dict(cls, json_object): method from_json_file (line 91) | def from_json_file(cls, json_file): method to_dict (line 97) | def to_dict(self): method to_json_string (line 102) | def to_json_string(self): class BertModel (line 107) | class BertModel(object): method __init__ (line 131) | def __init__(self, method get_pooled_output (line 239) | def get_pooled_output(self): method get_sequence_output (line 242) | def get_sequence_output(self): method get_all_encoder_layers (line 251) | def get_all_encoder_layers(self): method get_embedding_output (line 254) | def get_embedding_output(self): method get_embedding_table (line 265) | def get_embedding_table(self): function gelu (line 269) | def gelu(input_tensor): function get_activation (line 285) | def get_activation(activation_string): function get_assignment_map_from_checkpoint (line 322) | def get_assignment_map_from_checkpoint(tvars, init_checkpoint): function dropout (line 348) | def dropout(input_tensor, dropout_prob): function layer_norm (line 366) | def layer_norm(input_tensor, name=None): function layer_norm_and_dropout (line 372) | def layer_norm_and_dropout(input_tensor, dropout_prob, name=None): function create_initializer (line 379) | def create_initializer(initializer_range=0.02): function embedding_lookup (line 384) | def embedding_lookup(input_ids, function embedding_postprocessor (line 433) | def embedding_postprocessor(input_tensor, function create_attention_mask_from_input_mask (line 529) | def create_attention_mask_from_input_mask(from_tensor, to_mask): function attention_layer (line 563) | def attention_layer(from_tensor, function transformer_model (line 759) | def transformer_model(input_tensor, function get_shape_list (line 900) | def get_shape_list(tensor, expected_rank=None, name=None): function reshape_to_matrix (line 937) | def reshape_to_matrix(input_tensor): function reshape_from_matrix (line 951) | def reshape_from_matrix(output_tensor, orig_shape_list): function assert_rank (line 964) | def assert_rank(tensor, expected_rank, name=None): FILE: bert/optimization.py function create_optimizer (line 25) | def create_optimizer(loss, init_lr, num_train_steps, num_warmup_steps, u... class AdamWeightDecayOptimizer (line 87) | class AdamWeightDecayOptimizer(tf.train.Optimizer): method __init__ (line 90) | def __init__(self, method apply_gradients (line 108) | def apply_gradients(self, grads_and_vars, global_step=None, name=None): method _do_use_weight_decay (line 159) | def _do_use_weight_decay(self, param_name): method _get_variable_name (line 169) | def _get_variable_name(self, param_name): FILE: bert/tokenization.py function validate_case_matches_checkpoint (line 28) | def validate_case_matches_checkpoint(do_lower_case, init_checkpoint): function convert_to_unicode (line 78) | def convert_to_unicode(text): function printable_text (line 98) | def printable_text(text): function load_vocab (line 121) | def load_vocab(vocab_file): function convert_by_vocab (line 136) | def convert_by_vocab(vocab, items): function convert_tokens_to_ids (line 144) | def convert_tokens_to_ids(vocab, tokens): function convert_ids_to_tokens (line 148) | def convert_ids_to_tokens(inv_vocab, ids): function whitespace_tokenize (line 152) | def whitespace_tokenize(text): class FullTokenizer (line 161) | class FullTokenizer(object): method __init__ (line 164) | def __init__(self, vocab_file, do_lower_case=True): method tokenize (line 170) | def tokenize(self, text): method convert_tokens_to_ids (line 178) | def convert_tokens_to_ids(self, tokens): method convert_ids_to_tokens (line 181) | def convert_ids_to_tokens(self, ids): class BasicTokenizer (line 185) | class BasicTokenizer(object): method __init__ (line 188) | def __init__(self, do_lower_case=True): method tokenize (line 196) | def tokenize(self, text): method _run_strip_accents (line 220) | def _run_strip_accents(self, text): method _run_split_on_punc (line 231) | def _run_split_on_punc(self, text): method _tokenize_chinese_chars (line 251) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 264) | def _is_chinese_char(self, cp): method _clean_text (line 286) | def _clean_text(self, text): class WordpieceTokenizer (line 300) | class WordpieceTokenizer(object): method __init__ (line 303) | def __init__(self, vocab, unk_token="[UNK]", max_input_chars_per_word=... method tokenize (line 308) | def tokenize(self, text): function _is_whitespace (line 362) | def _is_whitespace(char): function _is_control (line 374) | def _is_control(char): function _is_punctuation (line 386) | def _is_punctuation(char): FILE: data_utils/config_utils.py class ModelConfig (line 17) | class ModelConfig(object): method __init__ (line 18) | def __init__(self, tf_flags, output_dir, model_sign="model"): method logging_configs (line 27) | def logging_configs(self): FILE: data_utils/conll.py function get_doc_key (line 28) | def get_doc_key(doc_id, part): function output_conll (line 32) | def output_conll(input_file, output_file, predictions, subtoken_map): function official_conll_eval (line 88) | def official_conll_eval(gold_path, predicted_path, metric, official_stdo... function evaluate_conll (line 109) | def evaluate_conll(gold_path, predictions, subtoken_maps, official_stdou... FILE: func_builders/input_fn_builder.py function file_based_input_fn_builder (line 15) | def file_based_input_fn_builder(input_file, num_window=None, window_size... FILE: func_builders/model_fn_builder.py function model_fn_builder (line 18) | def model_fn_builder(config, model_sign="mention_proposal"): FILE: models/corefqa.py class CorefQAModel (line 17) | class CorefQAModel(object): method __init__ (line 18) | def __init__(self, config): method get_coreference_resolution_and_loss (line 30) | def get_coreference_resolution_and_loss(self, instance, is_training, u... method marginal_likelihood_loss (line 374) | def marginal_likelihood_loss(self, antecedent_scores, antecedent_labels): method get_query_token_ids (line 391) | def get_query_token_ids(self, nonoverlap_doc_input_ids, sentence_map, ... method get_mention_score_and_loss (line 411) | def get_mention_score_and_loss(self, candidate_mention_span_embs, cand... method compute_mention_score_and_loss (line 438) | def compute_mention_score_and_loss(self, pred_sequence_logits, gold_se... method get_candidate_span_embedding (line 465) | def get_candidate_span_embedding(self, doc_sequence_embeddings, candid... method get_candidate_mention_gold_sequence_label (line 474) | def get_candidate_mention_gold_sequence_label(self, candidate_mention_... method scatter_gold_index_to_label_sequence (line 494) | def scatter_gold_index_to_label_sequence(self, gold_index_labels, expe... method scatter_span_sequence_labels (line 511) | def scatter_span_sequence_labels(self, gold_start_index_labels, gold_e... method get_candidate_cluster_labels (line 532) | def get_candidate_cluster_labels(self, candidate_mention_starts, candi... method transform_overlap_sliding_windows_to_original_document (line 547) | def transform_overlap_sliding_windows_to_original_document(self, overl... method ffnn (line 576) | def ffnn(self, inputs, hidden_size, output_size, dropout=None, name_sc... method boolean_mask_1d (line 596) | def boolean_mask_1d(self, itemtensor, boolmask_indicator, name_scope="... method get_dropout (line 621) | def get_dropout(self, dropout_rate, is_training): method get_shape (line 625) | def get_shape(self, x, dim): method evaluate (line 633) | def evaluate(self, top_span_starts, top_span_ends, predicted_antecedents, FILE: models/mention_proposal.py class MentionProposalModel (line 23) | class MentionProposalModel(object): method __init__ (line 24) | def __init__(self, config): method get_mention_proposal_and_loss (line 29) | def get_mention_proposal_and_loss(self, instance, is_training, use_tpu... method get_gold_mention_sequence_labels_from_pad_index (line 109) | def get_gold_mention_sequence_labels_from_pad_index(self, pad_gold_sta... method scatter_gold_index_to_label_sequence (line 146) | def scatter_gold_index_to_label_sequence(self, gold_index_labels, expe... method scatter_span_sequence_labels (line 163) | def scatter_span_sequence_labels(self, gold_start_index_labels, gold_e... method compute_score_and_loss (line 184) | def compute_score_and_loss(self, pred_sequence_logits, gold_sequence_l... method transform_overlap_windows_to_original_doc (line 211) | def transform_overlap_windows_to_original_doc(self, doc_overlap_window... method ffnn (line 235) | def ffnn(self, inputs, hidden_size, output_size, dropout=None, name_sc... method get_dropout (line 256) | def get_dropout(self, dropout_rate, is_training): method get_shape (line 260) | def get_shape(self, x, dim): method boolean_mask_1d (line 268) | def boolean_mask_1d(self, itemtensor, boolmask_indicator, name_scope="... FILE: run/build_dataset_to_tfrecord.py function prepare_train_dataset (line 87) | def prepare_train_dataset(input_file, output_data_dir, output_filename, ... function write_instance_to_example_file (line 124) | def write_instance_to_example_file(writer, instance, doc_key, window_siz... function create_int_feature (line 164) | def create_int_feature(values): function clip_or_pad (line 169) | def clip_or_pad(var, max_var_len, pad_idx=-1): function flatten_clusters (line 179) | def flatten_clusters(clusters): function read_conll_file (line 194) | def read_conll_file(conll_file_path): function parse_document (line 209) | def parse_document(document, language): function normalize_word (line 242) | def normalize_word(word, language): function coreference_annotations_to_clusters (line 251) | def coreference_annotations_to_clusters(annotations): function checkout_clusters (line 286) | def checkout_clusters(doc_info): function tokenize_document (line 292) | def tokenize_document(genres, doc_info, tokenizer): function convert_to_sliding_window (line 328) | def convert_to_sliding_window(tokenized_document, sliding_window_size): function expand_with_speakers (line 360) | def expand_with_speakers(tokenized_document): function construct_sliding_windows (line 378) | def construct_sliding_windows(sequence_length, sliding_window_size): function parse_args (line 403) | def parse_args(): function main (line 428) | def main(): FILE: run/run_corefqa.py function main (line 85) | def main(_): FILE: run/run_mention_proposal.py function main (line 79) | def main(_): FILE: run/run_squad.py class SquadExample (line 158) | class SquadExample(object): method __init__ (line 164) | def __init__(self, method __str__ (line 180) | def __str__(self): method __repr__ (line 183) | def __repr__(self): class InputFeatures (line 198) | class InputFeatures(object): method __init__ (line 201) | def __init__(self, function read_squad_examples (line 228) | def read_squad_examples(input_file, is_training): function convert_examples_to_features (line 310) | def convert_examples_to_features(examples, tokenizer, max_seq_length, function _improve_answer_span (line 477) | def _improve_answer_span(doc_tokens, input_start, input_end, tokenizer, function _check_is_max_context (line 514) | def _check_is_max_context(doc_spans, cur_span_index, position): function create_model (line 551) | def create_model(bert_config, is_training, input_ids, input_mask, segmen... function model_fn_builder (line 591) | def model_fn_builder(bert_config, init_checkpoint, learning_rate, function input_fn_builder (line 688) | def input_fn_builder(input_file, seq_length, is_training, drop_remainder): function write_predictions (line 742) | def write_predictions(all_examples, all_features, all_results, n_best_size, function get_final_text (line 928) | def get_final_text(pred_text, orig_text, do_lower_case): function _get_best_indexes (line 1024) | def _get_best_indexes(logits, n_best_size): function _compute_softmax (line 1036) | def _compute_softmax(scores): class FeatureWriter (line 1059) | class FeatureWriter(object): method __init__ (line 1062) | def __init__(self, filename, is_training): method process_feature (line 1068) | def process_feature(self, feature): method close (line 1094) | def close(self): function validate_flags_or_throw (line 1098) | def validate_flags_or_throw(bert_config): function main (line 1127) | def main(_): FILE: run/transform_spanbert_pytorch_to_tf.py function load_models (line 30) | def load_models(bert_config_path, ): function copy_checkpoint (line 44) | def copy_checkpoint(source, target): function main (line 49) | def main(bert_config_path, bert_ckpt_path, pytorch_init_checkpoint, outp... function parse_args (line 73) | def parse_args(): FILE: tests/model_fn.py function model_fn (line 13) | def model_fn(config): class Config (line 23) | class Config: FILE: tests/tile_repeat.py function shape (line 12) | def shape(x, dim): FILE: tests/tpu_operation.py function test_top_k (line 32) | def test_top_k(): FILE: utils/load_pytorch_to_tf.py function to_tf_var_name (line 39) | def to_tf_var_name(name: str): function my_convert_keys (line 45) | def my_convert_keys(model): function load_from_pytorch_checkpoint (line 53) | def load_from_pytorch_checkpoint(checkpoint, assignment_map): function print_vars (line 72) | def print_vars(pytorch_ckpt, tf_ckpt): FILE: utils/metrics.py function mention_proposal_prediction (line 11) | def mention_proposal_prediction(config, current_doc_result, concat_only=... function f1 (line 48) | def f1(p_num, p_den, r_num, r_den, beta=1): class CorefEvaluator (line 54) | class CorefEvaluator(object): method __init__ (line 55) | def __init__(self): method update (line 58) | def update(self, predicted, gold, mention_to_predicted, mention_to_gold): method get_f1 (line 62) | def get_f1(self): method get_recall (line 65) | def get_recall(self): method get_precision (line 68) | def get_precision(self): method get_prf (line 71) | def get_prf(self): class Evaluator (line 75) | class Evaluator(object): method __init__ (line 76) | def __init__(self, metric, beta=1): method update (line 84) | def update(self, predicted, gold, mention_to_predicted, mention_to_gold): method get_f1 (line 95) | def get_f1(self): method get_recall (line 98) | def get_recall(self): method get_precision (line 101) | def get_precision(self): method get_prf (line 104) | def get_prf(self): method get_counts (line 107) | def get_counts(self): function evaluate_documents (line 111) | def evaluate_documents(documents, metric, beta=1): function b_cubed (line 118) | def b_cubed(clusters, mention_to_gold): function muc (line 140) | def muc(clusters, mention_to_gold): function phi4 (line 155) | def phi4(c1, c2): function ceafe (line 159) | def ceafe(clusters, gold_clusters): function lea (line 170) | def lea(clusters, mention_to_gold): FILE: utils/radam.py class RAdam (line 14) | class RAdam(Optimizer): method __init__ (line 20) | def __init__(self, method _get_beta_accumulators (line 56) | def _get_beta_accumulators(self): method _get_niter (line 63) | def _get_niter(self): method _create_slots (line 68) | def _create_slots(self, var_list): method _prepare (line 83) | def _prepare(self): method _apply_dense_shared (line 94) | def _apply_dense_shared(self, grad, var): method _apply_dense (line 144) | def _apply_dense(self, grad, var): method _resource_apply_dense (line 147) | def _resource_apply_dense(self, grad, var): method _apply_sparse_shared (line 150) | def _apply_sparse_shared(self, grad, var, indices, scatter_add): method _apply_sparse (line 200) | def _apply_sparse(self, grad, var): method _resource_apply_sparse (line 211) | def _resource_apply_sparse(self, grad, var, indices): method _resource_scatter_add (line 215) | def _resource_scatter_add(self, x, i, v): method _finish (line 220) | def _finish(self, update_ops, name_scope): FILE: utils/util.py function get_model (line 20) | def get_model(config, model_sign="corefqa"): function initialize_from_env (line 27) | def initialize_from_env(eval_test=False, config_params="train_spanbert_b... function copy_checkpoint (line 54) | def copy_checkpoint(source, target): function make_summary (line 59) | def make_summary(value_dict): function flatten (line 63) | def flatten(l): function set_gpus (line 67) | def set_gpus(*gpus): function mkdirs (line 73) | def mkdirs(path): function load_char_dict (line 82) | def load_char_dict(char_vocab_path): function maybe_divide (line 91) | def maybe_divide(x, y): function shape (line 96) | def shape(x, dim): function ffnn (line 100) | def ffnn(inputs, num_hidden_layers, hidden_size, output_size, dropout, function batch_gather (line 114) | def batch_gather(emb, indices):