MCPcopy Create free account

hub / github.com/google-research/language / functions

Functions6,154 in github.com/google-research/language

Methodtf_map_fn
(example)
language/serene/training.py:661
Functiontf_to_str
Convert a string-like input to python string. Specifically, this is helpful when its unclear whether a function is expected a tf.Tensor wrapping
language/serene/util.py:180
Functiontfhub_export_path
(model_dir, hub_prefix, module_prefix)
language/common/utils/export_utils.py:66
Functiontfrecord_dataset
(path)
language/realm/example_generator.py:337
Functiontile_batch
Tile the batch dimension of a (possibly nested structure of) tensor(s) t. Args: t: Tensor shaped [batch_size, ...] multiplier: <int32> R
language/capwap/utils/tensor_utils.py:102
Functionto_action_tuple
( word: str, grammar: state_tree.NQCFG, tokenizer: transformers.BertTokenizer, valid_actions:
language/search_agents/muzero/env.py:184
Functionto_dict
(p, h, label)
language/boolq/run_recurrent_model_boolq.py:113
Functionto_example
Converts dictionaries to examples.
language/fruit/tf_utils.py:53
Methodto_json
(self)
language/xsp/data_preprocessing/language_utils.py:37
Methodto_json
(self)
language/xsp/data_preprocessing/nl_to_sql_example.py:68
Methodto_json
(self)
language/xsp/data_preprocessing/sql_utils.py:89
Methodto_json
(self)
language/xsp/data_preprocessing/sql_utils.py:117
Methodto_json_string
Serializes this instance to a JSON string.
language/canine/bert_modeling.py:110
Methodto_json_string
Serializes this instance to a JSON string.
language/capwap/utils/transformer_utils.py:102
Functionto_lucene_query
Builds a valid lucene query from a base query, query adjustments, and vocabulary mappings. Args: base_query: str, The base query which is pre
language/search_agents/muzero/state_tree.py:843
Methodto_predicate
Similar to the parent's function but allow returning ref predicate.
language/gscan/data/grammar.py:90
Methodto_rules
In-order travesal for the constituency tree.
language/gscan/data/grammar.py:323
Functionto_tfrecords_pipeline
Beam pipeline for converting article pairs to tfrecords.
language/fruit/beam_pipelines.py:829
Functionto_tydi_example
Converts a TyDi 'entry' from `create_entry_from_json` to `TyDiExample`.
language/canine/tydiqa/data.py:281
Functiontoken_add
Add new tokens at random positions in the original token_list.
language/bert_extraction/steal_bert_classifier/data_generation/preprocess_util.py:194
Functiontoken_drop
Drop tokens at random from the original token_list.
language/bert_extraction/steal_bert_classifier/data_generation/preprocess_util.py:204
Functiontoken_replace
Replace tokens at random one at a time from the vocab.
language/bert_extraction/steal_bert_classifier/data_generation/preprocess_util.py:184
Functiontoken_to_char_ids_mapper
Creates a mapping function to augment a tf.data.Dataset with character ids. Suppose we have a `dataset` with outputs `str1` and `str2` of arbitrary
language/common/inputs/char_utils.py:82
Functiontokenize
Tokenize.
language/question_answering/b2t2/compute_vcr_features.py:109
Methodtokenize
(self, text)
language/serene/tokenizers.py:43
Methodtokenize
(self, text)
language/serene/tokenizers.py:61
Methodtokenize
(self, text)
language/serene/tokenizers.py:138
Methodtokenize
(self, text)
language/serene/tokenizers.py:180
Methodtokenize
(self, x)
language/fruit/rendering_utils_test.py:96
Functiontokenize_sql
(sql_exp)
language/compgen/nqg/tasks/spider/sql_tokenizer.py:24
Functiontokenize_with_mention_spans
Tokenizes and resolves byte-offsets to word-offsets. Given a sentence and a set of inclusive byte-offset spans, applies a BERT tokenizer to the s
language/mentionmemory/utils/tokenization_utils.py:77
Functiontokenize_with_original_mapping
Tokenize with original mapping.
language/orqa/utils/bert_utils.py:59
Methodtokenizer
(self)
language/serene/preprocessing.py:292
Methodtokens
(self)
language/serene/preprocessing.py:280
Functiontokens_ids_to_logits
Token slice to logits from decoder model.
language/gscan/xattn_model/predict.py:84
Functiontop_funcall_processor
Returns the processed (exemplar_outputs, orig_output).
language/casper/augment/casper_formatters.py:211
Functiontop_metrics
Returns eval metrics for TOP and MTOP datasets.
language/casper/evaluate/top_metrics.py:25
Functiontopk_search_fn
Compute topk of inner product search. Args: query_embs: batch_size, hidden_size embeddings_mat: num_vocab, hidden_size k: top k Retu
language/emql/util.py:31
Methodtotal
(self)
language/search_agents/muzero/types.py:306
Functiontpu_scaffold
()
language/labs/drkit/run_dualencoder_qa.py:610
Functiontpu_scaffold
()
language/labs/drkit/run_dualencoder_lsf.py:1469
Functiontpu_scaffold
()
language/labs/drkit/run_multihop_follow.py:463
Functiontpu_scaffold
()
language/labs/drkit/hotpotqa/answer_extractor.py:691
Functiontpu_scaffold
()
language/labs/drkit/hotpotqa/demo.py:416
Functiontpu_scaffold
()
language/bert_extraction/steal_bert_classifier/models/run_classifier_membership.py:632
Functiontpu_scaffold
()
language/bert_extraction/steal_bert_classifier/models/run_classifier_distillation.py:597
Functiontpu_scaffold
()
language/bert_extraction/steal_bert_classifier/models/run_classifier.py:851
Functiontpu_scaffold
()
language/bert_extraction/steal_bert_qa/utils/run_bert_boolq_diff.py:452
Functiontpu_scaffold
()
language/bert_extraction/steal_bert_qa/models/run_squad.py:638
Functiontpu_scaffold
()
language/bert_extraction/steal_bert_qa/models/run_squad_membership.py:561
Functiontpu_scaffold
()
language/bert_extraction/steal_bert_qa/models/run_bert_boolq_distill.py:489
Functiontpu_scaffold
()
language/bert_extraction/steal_bert_qa/models/run_bert_boolq.py:471
Functiontpu_scaffold
()
language/conpono/cpc/run_cc_cpc.py:625
Functiontpu_scaffold
()
language/conpono/cpc/run_bilin_cpc.py:675
Functiontpu_scaffold
()
language/conpono/cpc/run_cpc.py:329
Functiontpu_scaffold
()
language/conpono/evals/run_squad.py:625
Functiontpu_scaffold
()
language/conpono/evals/run_finetune_coherence.py:286
Functiontpu_scaffold
()
language/conpono/evals/run_hellaswag.py:252
Functiontpu_scaffold
()
language/conpono/evals/classifier_utils.py:906
Functiontpu_scaffold
()
language/conpono/evals/run_classifier.py:758
Functiontpu_scaffold
()
language/conpono/evals/run_multichoice.py:247
Functiontpu_scaffold
()
language/conpono/evals/run_record.py:347
Functiontpu_scaffold
()
language/conpono/evals/run_concat_classifier.py:873
Functiontpu_scaffold
()
language/conpono/evals/race_utils.py:366
Functiontpu_scaffold
()
language/conpono/binary_order/run_binary_coherence.py:275
Functiontpu_scaffold
()
language/conpono/reconstruct/run_paragraph_reconstruct.py:335
Functiontpu_scaffold
()
language/multivec/models/ranking_model_experiment_inbatch.py:638
Functiontpu_scaffold
()
language/boolq/run_bert_boolq.py:456
Functiontpu_scaffold
()
language/question_answering/bert_joint/run_nq.py:932
Functiontpu_scaffold
()
language/question_answering/b2t2/run_b2t2.py:375
Functiontpu_scaffold
()
language/question_answering/b2t2/run_dual_encoder.py:227
Functiontpu_scaffold
()
language/capwap/synthetic/generate_answers.py:341
Functiontpu_scaffold
()
language/capwap/synthetic/generate_questions.py:308
Functiontpu_scaffold
()
language/xsp/model/load_from_checkpoint.py:85
Methodtpu_scaffold
()
language/canine/tydiqa/tydi_modeling.py:127
Functiontrain
Constructs encoder and decoder transformation for training and eval. In the shapes described below, B is batch size, L is sequence length, D is t
language/xsp/model/transformer.py:563
Methodtrain
(self, sentences)
language/serene/text_matcher.py:53
Functiontrain_and_evaluate
Runs a training and evaluation loop. Args: config: Configuration to use. workdir: Working directory for checkpoints and TF summaries. If th
language/gscan/xattn_model/train.py:111
Methodtrain_input_fn
()
language/nql/nql/util_test.py:281
Methodtrain_input_fn
()
language/nql/nql/util_test.py:307
Functiontrain_step
Perform a single training step.
language/gscan/xattn_model/train.py:39
Functiontrain_step
Perform a single training step. Args: train_state: contains model params, loss fn, grad update fn. model_vars: model variables that are not
language/mentionmemory/training/trainer.py:115
Functiontransform
Applies all possible transformations by calling a parsing function.
language/compir/transform/apply_transformation_utils.py:24
Methodtransform
(self, value)
language/capwap/preprocessing/text_synthetic_qa.py:145
Methodtransformer_layers
List of Transformer layers in the encoder.
language/search_agents/muzero/transformer_encoder.py:323
Functiontranspose_batch_time
Transposes the batch and time dimensions of the `tensor`. If the `tensor` has less than 2 dimensions, then no operation is performed. Otherwise,
language/common/utils/tensor_utils.py:200
Functiontranspose_lists
Transpose a list of lists.
language/boolq/utils/py_utils.py:40
Methodtriple
(k)
language/nql/nql/__init__.py:718
Functiontrues_like
(t)
language/labs/exemplar_decoding/utils/tensor_utils.py:80
Functiontruncate_contexts
Truncate context based on max_contexts and max_context_words. Drops more than `max_contexts` contexts entirely, and truncates each remaining cont
language/question_answering/decatt_docreader/utils/nq_long_utils.py:24
Functiontruncate_labels
Truncate labels based on max_contexts. Limit non-null labels to only be one of the first 'max_context' contexts. Otherwise mask it to -1 (the NUL
language/question_answering/decatt_docreader/utils/nq_long_utils.py:60
Functiontruncate_long_ctx
Truncates a pair of sequences to a maximum sequence length.
language/conpono/cpc/preproc/preprocessing_utils.py:262
Functiontruncate_paragraph
Truncates a 5 sequences to a maximum sequence length.
language/conpono/cpc/preproc/preprocessing_utils.py:297
Functiontruncated_normal
Truncated normal initializer.
language/mentionmemory/utils/initializers.py:23
Methodtry_model_on_test_instances
(model, sess, feature_ph_dict)
language/nql/nql/util_test.py:322
Functiontuple_dataset
Produce a dataset by parsing lines from a file. Lines are formatted as described in documents for tuple_generator_builder. Args: context: pa
language/nql/nql/dataset.py:112
Functiontuple_generator
Closure produced by tuple_generator_builder.
language/nql/nql/dataset.py:73
Methodtype_lists
(self)
language/search_agents/muzero/utils.py:302
Methodtype_name
Declared object types in the set defined by this. Returns: A string name of the type.
language/nql/nql/__init__.py:178
Functionuniform_sample
Samples k items using uniform sampling without replacement.
language/casper/utils/sample_utils.py:20
← previousnext →6,001–6,100 of 6,154, ranked by callers