SYMBOL INDEX (197 symbols across 22 files) FILE: albert/albert_xxlarge.py function answer (line 6) | def answer(question, text): FILE: app.py function index (line 17) | def index(): function get_answer (line 22) | def get_answer(): FILE: electra/configure_finetuning.py class FinetuningConfig (line 27) | class FinetuningConfig(object): method __init__ (line 30) | def __init__(self, model_name, data_dir, **kwargs): method update (line 166) | def update(self, kwargs): FILE: electra/finetune/feature_spec.py function get_shared_feature_specs (line 28) | def get_shared_feature_specs(config: electra.configure_finetuning.Finetu... class FeatureSpec (line 38) | class FeatureSpec(object): method __init__ (line 41) | def __init__(self, name, shape, default_value_fn=None, is_int_feature=... method get_parsing_spec (line 47) | def get_parsing_spec(self): method get_default_values (line 51) | def get_default_values(self): FILE: electra/finetune/preprocessing.py class Preprocessor (line 37) | class Preprocessor(object): method __init__ (line 40) | def __init__(self, config: electra.configure_finetuning.FinetuningConf... method prepare_train (line 54) | def prepare_train(self): method prepare_predict (line 57) | def prepare_predict(self, tasks, split): method _serialize_dataset (line 60) | def _serialize_dataset(self, tasks, is_training, split): method serialize_examples (line 93) | def serialize_examples(self, examples, is_training, output_file, batch... method _example_to_tf_example (line 113) | def _example_to_tf_example(self, example, is_training, log=False): method _make_tf_example (line 121) | def _make_tf_example(self, **kwargs): method _input_fn_builder (line 145) | def _input_fn_builder(self, input_file, is_training): method _decode_tfrecord (line 159) | def _decode_tfrecord(self, record): FILE: electra/finetune/qa/qa_metrics.py class SpanBasedQAScorer (line 41) | class SpanBasedQAScorer(scorer.Scorer): method __init__ (line 44) | def __init__(self, config: electra.configure_finetuning.FinetuningConf... method update (line 58) | def update(self, results): method get_loss (line 73) | def get_loss(self): method _get_results (line 76) | def _get_results(self): method write_predictions (line 82) | def write_predictions(self): function _get_best_indexes (line 269) | def _get_best_indexes(logits, n_best_size): function _compute_softmax (line 281) | def _compute_softmax(scores): function get_final_text (line 304) | def get_final_text(config: electra.configure_finetuning.FinetuningConfig... FILE: electra/finetune/qa/qa_tasks.py class QAExample (line 38) | class QAExample(task.Example): method __init__ (line 41) | def __init__(self, method __str__ (line 63) | def __str__(self): method __repr__ (line 66) | def __repr__(self): function _check_is_max_context (line 81) | def _check_is_max_context(doc_spans, cur_span_index, position): function _improve_answer_span (line 118) | def _improve_answer_span(doc_tokens, input_start, input_end, tokenizer, function is_whitespace (line 155) | def is_whitespace(c): class QATask (line 159) | class QATask(task.Task): method __init__ (line 164) | def __init__(self, config: electra.configure_finetuning.FinetuningConf... method _add_examples (line 171) | def _add_examples(self, examples, example_failures, paragraph, split): method get_feature_specs (line 253) | def get_feature_specs(self): method featurize (line 261) | def featurize(self, example: QAExample, is_training, log=False, method get_prediction_module (line 421) | def get_prediction_module(self, bert_model, features, is_training, method get_scorer (line 539) | def get_scorer(self, split="dev"): class SQuADTask (line 575) | class SQuADTask(QATask): method __init__ (line 578) | def __init__(self, config: electra.configure_finetuning.FinetuningConf... method get_examples (line 582) | def get_examples(self, split): method get_scorer (line 603) | def get_scorer(self, split="dev"): class SQuAD (line 607) | class SQuAD(SQuADTask): method __init__ (line 608) | def __init__(self, config: electra.configure_finetuning.FinetuningConf... class SQuADv1 (line 612) | class SQuADv1(SQuADTask): method __init__ (line 613) | def __init__(self, config: electra.configure_finetuning.FinetuningConf... FILE: electra/finetune/qa/squad_official_eval.py function parse_args (line 43) | def parse_args(): function set_opts (line 61) | def set_opts(config: configure_finetuning.FinetuningConfig, split): function make_qid_to_has_ans (line 78) | def make_qid_to_has_ans(dataset): function normalize_answer (line 86) | def normalize_answer(s): function get_tokens (line 100) | def get_tokens(s): function compute_exact (line 104) | def compute_exact(a_gold, a_pred): function compute_f1 (line 107) | def compute_f1(a_gold, a_pred): function get_raw_scores (line 122) | def get_raw_scores(dataset, preds): function apply_no_ans_threshold (line 143) | def apply_no_ans_threshold(scores, na_probs, qid_to_has_ans, na_prob_thr... function make_eval_dict (line 153) | def make_eval_dict(exact_scores, f1_scores, qid_list=None): function merge_eval (line 169) | def merge_eval(main_eval, new_eval, prefix): function plot_pr_curve (line 173) | def plot_pr_curve(precisions, recalls, out_image, title): function make_precision_recall_eval (line 184) | def make_precision_recall_eval(scores, na_probs, num_true_pos, qid_to_ha... function run_precision_recall_analysis (line 207) | def run_precision_recall_analysis(main_eval, exact_raw, f1_raw, na_probs, function histogram_na_prob (line 231) | def histogram_na_prob(na_probs, qid_list, image_dir, name): function find_best_thresh (line 243) | def find_best_thresh(preds, scores, na_probs, qid_to_has_ans): function find_all_best_thresh (line 264) | def find_all_best_thresh(main_eval, preds, exact_raw, f1_raw, na_probs, ... function main (line 272) | def main(): FILE: electra/finetune/qa/squad_official_eval_v1.py function normalize_answer (line 35) | def normalize_answer(s): function f1_score (line 53) | def f1_score(prediction, ground_truth): function exact_match_score (line 66) | def exact_match_score(prediction, ground_truth): function metric_max_over_ground_truths (line 70) | def metric_max_over_ground_truths(metric_fn, prediction, ground_truths): function evaluate (line 78) | def evaluate(dataset, predictions): function main (line 102) | def main(config: configure_finetuning.FinetuningConfig, split): FILE: electra/finetune/scorer.py class Scorer (line 25) | class Scorer(object): method __init__ (line 30) | def __init__(self): method update (line 35) | def update(self, results): method get_loss (line 39) | def get_loss(self): method _get_results (line 43) | def _get_results(self): method get_results (line 52) | def get_results(self, prefix=""): method results_str (line 58) | def results_str(self): FILE: electra/finetune/task.py class Example (line 31) | class Example(object): method __init__ (line 34) | def __init__(self, task_name): class Task (line 38) | class Task(object): method __init__ (line 43) | def __init__(self, config: electra.configure_finetuning.FinetuningConf... method get_test_splits (line 47) | def get_test_splits(self): method get_examples (line 51) | def get_examples(self, split): method get_scorer (line 55) | def get_scorer(self) -> scorer.Scorer: method get_feature_specs (line 59) | def get_feature_specs(self) -> List[feature_spec.FeatureSpec]: method featurize (line 63) | def featurize(self, example: Example, is_training: bool, method get_prediction_module (line 68) | def get_prediction_module( method __repr__ (line 73) | def __repr__(self): FILE: electra/finetune/task_builder.py function get_tasks (line 27) | def get_tasks(config: electra.configure_finetuning.FinetuningConfig): function get_task (line 34) | def get_task(config: electra.configure_finetuning.FinetuningConfig, task... FILE: electra/model/modeling.py class BertConfig (line 35) | class BertConfig(object): method __init__ (line 38) | def __init__(self, method from_dict (line 87) | def from_dict(cls, json_object): method from_json_file (line 95) | def from_json_file(cls, json_file): method to_dict (line 101) | def to_dict(self): method to_json_string (line 106) | def to_json_string(self): class BertModel (line 111) | class BertModel(object): method __init__ (line 136) | def __init__(self, method get_pooled_output (line 254) | def get_pooled_output(self): method get_sequence_output (line 257) | def get_sequence_output(self): method get_all_encoder_layers (line 266) | def get_all_encoder_layers(self): method get_embedding_output (line 269) | def get_embedding_output(self): method get_embedding_table (line 280) | def get_embedding_table(self): function gelu (line 284) | def gelu(input_tensor): function get_activation (line 300) | def get_activation(activation_string): function get_assignment_map_from_checkpoint (line 337) | def get_assignment_map_from_checkpoint(tvars, init_checkpoint, prefix=""): function dropout (line 360) | def dropout(input_tensor, dropout_prob): function layer_norm (line 378) | def layer_norm(input_tensor, name=None): function layer_norm_and_dropout (line 384) | def layer_norm_and_dropout(input_tensor, dropout_prob, name=None): function create_initializer (line 391) | def create_initializer(initializer_range=0.02): function embedding_lookup (line 396) | def embedding_lookup(input_ids, function embedding_postprocessor (line 453) | def embedding_postprocessor(input_tensor, function create_attention_mask_from_input_mask (line 549) | def create_attention_mask_from_input_mask(from_tensor, to_mask): function attention_layer (line 583) | def attention_layer(from_tensor, function transformer_model (line 779) | def transformer_model(input_tensor, function get_shape_list (line 916) | def get_shape_list(tensor, expected_rank=None, name=None): function reshape_to_matrix (line 961) | def reshape_to_matrix(input_tensor): function reshape_from_matrix (line 975) | def reshape_from_matrix(output_tensor, orig_shape_list): function assert_rank (line 988) | def assert_rank(tensor, expected_rank, name=None): FILE: electra/model/optimization.py function create_optimizer (line 30) | def create_optimizer( class AdamWeightDecayOptimizer (line 85) | class AdamWeightDecayOptimizer(tf.train.Optimizer): method __init__ (line 88) | def __init__(self, method _apply_gradients (line 106) | def _apply_gradients(self, grads_and_vars, learning_rate): method apply_gradients (line 154) | def apply_gradients(self, grads_and_vars, global_step=None, name=None): method _do_use_weight_decay (line 175) | def _do_use_weight_decay(self, param_name): method _get_variable_name (line 185) | def _get_variable_name(self, param_name): function _get_layer_lrs (line 193) | def _get_layer_lrs(learning_rate, layer_decay, n_layers): FILE: electra/model/tokenization.py function convert_to_unicode (line 29) | def convert_to_unicode(text): function printable_text (line 49) | def printable_text(text): function load_vocab (line 72) | def load_vocab(vocab_file): function convert_by_vocab (line 87) | def convert_by_vocab(vocab, items): function convert_tokens_to_ids (line 95) | def convert_tokens_to_ids(vocab, tokens): function convert_ids_to_tokens (line 99) | def convert_ids_to_tokens(inv_vocab, ids): function whitespace_tokenize (line 103) | def whitespace_tokenize(text): class FullTokenizer (line 112) | class FullTokenizer(object): method __init__ (line 115) | def __init__(self, vocab_file, do_lower_case=True): method tokenize (line 121) | def tokenize(self, text): method convert_tokens_to_ids (line 129) | def convert_tokens_to_ids(self, tokens): method convert_ids_to_tokens (line 132) | def convert_ids_to_tokens(self, ids): class BasicTokenizer (line 136) | class BasicTokenizer(object): method __init__ (line 139) | def __init__(self, do_lower_case=True): method tokenize (line 147) | def tokenize(self, text): method _run_strip_accents (line 171) | def _run_strip_accents(self, text): method _run_split_on_punc (line 182) | def _run_split_on_punc(self, text): method _tokenize_chinese_chars (line 202) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 215) | def _is_chinese_char(self, cp): method _clean_text (line 237) | def _clean_text(self, text): class WordpieceTokenizer (line 251) | class WordpieceTokenizer(object): method __init__ (line 254) | def __init__(self, vocab, unk_token="[UNK]", max_input_chars_per_word=... method tokenize (line 259) | def tokenize(self, text): function _is_whitespace (line 313) | def _is_whitespace(char): function _is_control (line 325) | def _is_control(char): function _is_punctuation (line 337) | def _is_punctuation(char): FILE: electra/util/training_utils.py class ETAHook (line 31) | class ETAHook(tf.estimator.SessionRunHook): method __init__ (line 34) | def __init__(self, to_log, n_steps, iterations_per_loop, on_tpu, method begin (line 48) | def begin(self): method before_run (line 51) | def before_run(self, run_context): method after_run (line 56) | def after_run(self, run_context, run_values): method end (line 64) | def end(self, session): method log (line 68) | def log(self, run_values=None): function secs_to_str (line 87) | def secs_to_str(secs): function get_bert_config (line 96) | def get_bert_config(config): FILE: electra/util/utils.py function load_json (line 29) | def load_json(path): function write_json (line 34) | def write_json(o, path): function load_pickle (line 41) | def load_pickle(path): function write_pickle (line 46) | def write_pickle(o, path): function mkdir (line 53) | def mkdir(path): function rmrf (line 58) | def rmrf(path): function rmkdir (line 64) | def rmkdir(path): function log (line 69) | def log(*args): function log_config (line 75) | def log_config(config): function heading (line 81) | def heading(*args): function nest_dict (line 87) | def nest_dict(d, prefixes, delim="_"): function flatten_dict (line 101) | def flatten_dict(d, delim="_"): FILE: qa_predict.py class FinetuningModel (line 29) | class FinetuningModel(object): method __init__ (line 32) | def __init__(self, config: electra.configure_finetuning.FinetuningConf... function model_fn_builder (line 68) | def model_fn_builder(config: electra.configure_finetuning.FinetuningConf... class ModelRunner (line 120) | class ModelRunner(object): method __init__ (line 123) | def __init__(self, config: electra.configure_finetuning.FinetuningConf... method predict (line 163) | def predict(self, split="dev", return_results=False): function init_model (line 175) | def init_model(): function predict (line 188) | def predict(question, context, model): FILE: rank_models/bm25_model.py function word_token (line 13) | def word_token(tokens, lemma=False): function get_similarity (line 23) | def get_similarity(query, documents): FILE: rank_models/tfidf.py function take_verb (line 15) | def take_verb(text): function word_token (line 18) | def word_token(tokens, lemma=False): function get_similarity (line 27) | def get_similarity(query, documents): FILE: rank_models/use.py function encode (line 54) | def encode(x): function cosine (line 74) | def cosine(A, B): function get_similarity (line 77) | def get_similarity(query, documents): FILE: util.py function get_url_text (line 10) | def get_url_text(text):