Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/google-research/language
/ functions
Functions
6,154 in github.com/google-research/language
⨍
Functions
6,154
◇
Types & classes
800
↳
Endpoints
12
↓ 1 callers
Function
create_optimizer
Creates an optimizer training op, optionally excluding BERT vars.
language/labs/drkit/run_multihop_follow.py:293
↓ 1 callers
Function
create_optimizer
Creates an optimizer training op.
language/conpono/evals/run_concat_classifier.py:766
↓ 1 callers
Function
create_placeholder_inputs
Generate model input with a placeholder for serialized SequenceExample.
language/xsp/model/input_pipeline.py:268
↓ 1 callers
Function
create_queries
Construct queries for most popular subjects for each relation. Args: out_dir: Path to store all queries as well as yearly slices. all_facts
language/templama/templama.py:364
↓ 1 callers
Function
create_segment_ids
Creates segment IDs. Args: segment_tokens (RaggedTensor): 2-D RaggedTensor. One row for each segment. Each row is a list of tokens. Re
language/conpono/reconstruct/preprocess.py:310
↓ 1 callers
Function
create_session
(db_path)
language/serene/scrape_db.py:36
↓ 1 callers
Function
create_session
(db_path)
language/serene/wiki_db.py:35
↓ 1 callers
Function
create_string_feature
(values)
language/relation_learning/models/bert_fewshot_classifier.py:134
↓ 1 callers
Function
create_tf_examples
Creates TF examples for the given VCR example and image feature vector.
language/question_answering/b2t2/compute_vcr_features.py:190
↓ 1 callers
Function
create_training_dataset
Returns `tf.data.Dataset` for training.
language/compgen/csl/model/training/input_utils.py:54
↓ 1 callers
Function
create_training_dataset
Returns `tf.data.Dataset` for training.
language/compgen/nqg/model/parser/training/input_utils.py:42
↓ 1 callers
Function
create_val_dataset
Create validataion dataset. Args: config: ml_collections.ConfigDict to use. split: The validation split. batch_size: The batch size.
language/gscan/xattn_model/dataset/input_pipeline.py:26
↓ 1 callers
Function
creation_wrapper
Wrapper for creating the TFRecords files.
language/xsp/data_preprocessing/convert_to_tfrecords.py:426
↓ 1 callers
Function
cross_shard_pad
Cross shard pad. Assuming `input_tensor` is replicated over different TPU cores across the zeroth dimension, this creates a global tensor with un
language/common/utils/tpu_utils.py:44
↓ 1 callers
Function
dataset_fn
Returns tf.data.Dataset for distributed BERT pretraining.
language/compgen/csl/model/training/input_utils.py:100
↓ 1 callers
Function
dataset_fn
Returns tf.data.Dataset for distributed BERT pretraining.
language/compgen/nqg/model/parser/training/input_utils.py:109
↓ 1 callers
Function
decode
Decode from estimator. Interactive, from file, or from dataset.
language/labs/consistent_zero_shot_nmt/bin/t2t_decoder.py:89
↓ 1 callers
Function
decode_fn
Decodes tf examples.
language/mentionmemory/utils/data_utils.py:79
↓ 1 callers
Function
deformat_serialized
Undoes the process in format_serialized.
language/casper/utils/top_utils.py:154
↓ 1 callers
Function
dense_layer_3d
A dense layer with 3D kernel. Args: input_tensor: float Tensor of shape [batch, seq_length, hidden_size]. num_attention_heads: Number of at
language/capwap/utils/transformer_utils.py:300
↓ 1 callers
Function
dense_layer_3d_proj
A dense layer with 3D kernel for projection. Args: input_tensor: float Tensor of shape [batch,from_seq_length, num_attention_heads, size_
language/canine/bert_modeling.py:622
↓ 1 callers
Function
dense_layer_3d_proj
A dense layer with 3D kernel for projection. Args: input_tensor: float Tensor of shape [batch,from_seq_length, num_attention_heads, size_
language/capwap/utils/transformer_utils.py:341
↓ 1 callers
Function
deserialize_top
Deserializes the logical form string into a TopLF object. Args: serialized: Serialized logical form string. Returns: a TopLF object if t
language/casper/utils/top_utils.py:57
↓ 1 callers
Method
deserialize_trained
Restore the current value of all trainable relations from a file. Args: input_file: Filename string or FileLike object.
language/nql/nql/__init__.py:1487
↓ 1 callers
Function
detokenize
(input_ids, tokenizer)
language/bert_extraction/steal_bert_classifier/embedding_perturbations/embedding_util.py:488
↓ 1 callers
Function
detokenize
(text_ids, tokenizer)
language/mentionmemory/data/prepare_complexwq.py:81
↓ 1 callers
Function
detokenize_wordpiece
Combine split tokens from worpiece.
language/labs/drkit/hotpotqa/demo.py:350
↓ 1 callers
Function
dfs
(node)
language/compgen/csl/tasks/cogs/tools/cogs_converter.py:84
↓ 1 callers
Function
dict2string
Convert a dictionary to a printable string.
language/nql/demos/gridworld_scaling/scaling_eval.py:180
↓ 1 callers
Function
disc_coherence_scores
Get discriminative coherence scores.
language/conpono/evals/discriminative_eval.py:95
↓ 1 callers
Method
discard_equivalent_examples
Faster version to discard equivalent examples that already in training set.
language/gscan/data/dataset.py:156
↓ 1 callers
Function
dropout
(x, dropout_rate, is_train)
language/boolq/run_recurrent_model_boolq.py:312
↓ 1 callers
Method
dump_neighbors
Dumps the neighbors to a JSONL file. Args: examples: A stream of examples outfile: JSONL filename. neighbor_filter: A NeighborF
language/casper/retrieve/query_retrievers.py:232
↓ 1 callers
Method
echo_frame
For debug, log triples for a subject with given string id.
language/templama/sling2facts.py:277
↓ 1 callers
Method
embed
Embeds a batch of queries. Args: query_batch: a list of Query instances. Returns: embeds: a [batch_size, embed_dim] float Tensor
language/realm/retrieval.py:268
↓ 1 callers
Method
embed
Embeds a Dataset of documents using Estimator. Args: get_documents_dataset: a function that returns a TF Dataset, where each elemen
language/realm/retrieval.py:311
↓ 1 callers
Function
embed_claims
Embed the claims using the given model checkpoint. Args: claim_tfds_data: path to claim tfds data train_claim_ids_npy_filename: Path to wri
language/serene/fever_cli.py:111
↓ 1 callers
Function
embed_docs
Compute document features for given TFRecords.
language/labs/drkit/run_dualencoder_lsf.py:2236
↓ 1 callers
Function
embed_documents
Embeds documents either locally (CPU/GPU) or with a TPU worker. Note: TPUEstimator.predict currently requires the TPU worker to have a single "ho
language/realm/retrieval.py:562
↓ 1 callers
Method
embed_only
( self, inputs, *, embed_claim, embed_evidence, project = True)
language/serene/model.py:282
↓ 1 callers
Function
embed_qrys
Compute query features for given TFRecords.
language/labs/drkit/run_dualencoder_lsf.py:2270
↓ 1 callers
Function
embed_wiki
Embed wikipedia using the given model checkpoint. Args: data_dir: Data directory for Wiki TFDS dataset model_checkpoint: Checkpoint of mode
language/serene/fever_cli.py:81
↓ 1 callers
Method
embed_wiki_dataset
Embed the wikipedia/evidence only dataset. Args: dataset: The wikipedia only dataset (e.g. wiki_tfds.py) Returns: Aligned wikipe
language/serene/training.py:642
↓ 1 callers
Function
embedding_lookup
Looks up words embeddings for id tensor. Args: input_ids: int32 Tensor of shape [batch_size, seq_length] containing word ids. vocab_s
language/canine/bert_modeling.py:400
↓ 1 callers
Function
embedding_lookup
Looks up embeddings for id tensor. Args: embedding_table: float Tensor of shape [vocab_size, embedding_size] input_ids: int32 Tensor of sha
language/xsp/model/common_layers.py:51
↓ 1 callers
Function
embedding_postprocessor
Performs various post-processing on a word embedding tensor. Args: input_tensor: float Tensor of shape [batch_size, seq_length, embedding
language/canine/bert_modeling.py:448
↓ 1 callers
Method
empty_command_statistics
()
language/gscan/data/grammar.py:470
↓ 1 callers
Function
enable_dynamic_asserts
Turn on or off using dynamic (graph execution time) checks. Enabled by default, but can be disabled to ensure we aren't doing any extraneous comp
language/canine/tensor_contracts.py:43
↓ 1 callers
Function
enable_predicates
Turn on or off whether predicates (`RequireTrue`/`EnsureTrue`) are used. Enabled by default, but can be disabled to ensure we aren't doing any ex
language/canine/tensor_contracts.py:61
↓ 1 callers
Method
encode
(self, batch)
language/gscan/xattn_model/model/models.py:285
↓ 1 callers
Method
encode_example
Encode a single example from text/integers to a single TF example. Args: claim: Text of the claim evidence: Text of the evidence
language/serene/preprocessing.py:119
↓ 1 callers
Function
encoder
Model function. Atttention seq2seq model, augmented with an encoder over the targets of the nearest neighbors. Args: features: Dictionary
language/labs/exemplar_decoding/models/hypernet.py:69
↓ 1 callers
Method
enforce_mention_constraints
(self, annotated_mentions)
language/fruit/beam_pipelines.py:634
↓ 1 callers
Function
enhance_data
Enhance the setup.tsv file with additional information necessary to build the annotation interfance. Args: raw_df: Dataframe representing the s
language/asqa/human_annotation/preparation.py:50
↓ 1 callers
Function
ensure_values_in_mat
Ensure indices are present in the rows of mat. This replaces the last value in each row of mat with the corresponding value in values, IF that va
language/labs/drkit/model_fns.py:205
↓ 1 callers
Function
eval_step_partial
(model_params)
language/mentionmemory/training/trainer.py:60
↓ 1 callers
Function
evaluate
Compute F1 and EM scores.
language/labs/drkit/evaluate.py:390
↓ 1 callers
Function
evaluate
Evaluate on the given dataset.
language/gscan/xattn_model/train.py:96
↓ 1 callers
Function
evaluate
Evaluate current parameters and return a dictionary with metrics. Args: eval_step_fn: partial eval step that takes in model params and inputs o
language/mentionmemory/training/trainer.py:76
↓ 1 callers
Function
evaluate
Evaluate a model on the dev set.
language/boolq/run_recurrent_model_boolq.py:487
↓ 1 callers
Function
evaluate
Call estimator.evaluatior with a given checkpoint.
language/xsp/training/train_model.py:85
↓ 1 callers
Function
evaluate_dataset_dataset
Evaluate word level metrics.
language/bert_extraction/steal_bert_qa/utils/evaluate_squad.py:142
↓ 1 callers
Function
evaluate_dataset_preds
Evaluate word level metrics.
language/bert_extraction/steal_bert_qa/utils/evaluate_squad.py:118
↓ 1 callers
Function
evaluate_entity_linking
Evaluate how often answers can be reached from linked entities.
language/labs/drkit/hotpotqa/preprocessing/link_questions.py:170
↓ 1 callers
Function
evaluate_predictions_impl
Calculates and returns metrics.
language/orqa/utils/eval_utils.py:77
↓ 1 callers
Function
evaluate_preds_preds
Evaluate word level metrics.
language/bert_extraction/steal_bert_qa/utils/evaluate_squad.py:96
↓ 1 callers
Function
evaluate_sequence_accuracy
Evaluate classification on the given dataset.
language/gscan/xattn_model/predict.py:125
↓ 1 callers
Function
exact_match
Compute exact match score between answer tokens and prediction tokens. Args: answer_ids: <int32> [batch_size, answer_length] prediction_ids
language/capwap/utils/reward_utils.py:252
↓ 1 callers
Method
execute_action
(self, action, current_rules)
language/compgen/csl/induction/search_main_beam.py:92
↓ 1 callers
Function
execute_prediction
Executes a single example's prediction(s). If more than one prediction is available, the most likely executable prediction is used as the "offici
language/xsp/evaluation/official_evaluation.py:194
↓ 1 callers
Function
execute_predictions
Executes predicted/gold queries and computes performance. Writes results to ofile. Args: predictions: A list of dictionaries defining the pr
language/xsp/evaluation/official_evaluation.py:273
↓ 1 callers
Function
execute_step
Induce rules for one step.
language/compgen/csl/induction/search_main.py:50
↓ 1 callers
Function
expand_nonterminal
(nonterminal, recursion=0)
language/compgen/csl/cky/cfg_sampler.py:64
↓ 1 callers
Function
expand_path_patterns
Expands the glob patterns in the given list.
language/casper/augment/cached_retrieval_to_dataset_lib.py:31
↓ 1 callers
Function
expand_unit_rules
Removes unit rules, i.e. X -> Y where X and Y are non-terminals.
language/compgen/nqg/tasks/spider/sql_parser.py:118
↓ 1 callers
Method
extract_property_names
Store names of properties in a dict.
language/labs/drkit/wikidata/preprocessing/distantly_supervise.py:76
↓ 1 callers
Function
extract_relation_representations
Extracts relation representation from sentence sequence layer.
language/relation_learning/models/bert_fewshot_classifier.py:219
↓ 1 callers
Function
f1_score
Calculate word level F1 score.
language/bert_extraction/steal_bert_qa/utils/evaluate_squad.py:59
↓ 1 callers
Function
f1_score
Calculate word level F1 score.
language/bert_extraction/steal_bert_qa/data_generation/preprocess_util.py:219
↓ 1 callers
Function
f1_score
Compute F1 score between answer tokens and prediction tokens. Args: answer_ids: <int32> [batch_size, answer_length] prediction_ids: <int32>
language/capwap/utils/reward_utils.py:297
↓ 1 callers
Method
f_reversible
Transforms a single program to its reversible IR.
language/compir/dataset_parsers/dataset_parser.py:35
↓ 1 callers
Method
f_reversible_inverse
Inverts a program from its reversibe IR to its original representation.
language/compir/dataset_parsers/dataset_parser.py:43
↓ 1 callers
Function
feature_dict_mapper
(q, s)
language/nql/demos/metaqa/metaqa.py:226
↓ 1 callers
Method
featurize_document
Featurizes a Document. Args: doc: a Document instance. fmt: can be either 'dict' or 'bert_inputs'. Default is 'dict'. Returns:
language/realm/featurization.py:191
↓ 1 callers
Method
featurize_document_tf
Featurizes a document using only TF ops (for non-eager execution). Args: title_token_ids: a 1-D int Tensor. body_token_ids: a 1-D int
language/realm/featurization.py:213
↓ 1 callers
Method
featurize_query_and_docs
Converts query and candidates into a set of final features for training. Args: query: a Query object. docs: a list of Documents.
language/realm/featurization.py:275
↓ 1 callers
Method
fetch_aliases
(self, alias_file_patterns)
language/labs/drkit/wikidata/preprocessing/distantly_supervise.py:65
↓ 1 callers
Function
file_based_convert_examples_to_features
Convert a set of `InputExample`s to a TFRecord file.
language/bert_extraction/steal_bert_qa/utils/run_bert_boolq_diff.py:279
↓ 1 callers
Function
file_based_convert_examples_to_features
(examples, label_list, max_seq_length, tokenizer,
language/multivec/preprocessing/create_training_data.py:978
↓ 1 callers
Function
file_based_convert_examples_to_features
Convert a set of `InputExample`s to a TFRecord file.
language/relation_learning/models/bert_fewshot_classifier.py:126
↓ 1 callers
Function
file_based_convert_examples_to_features_dual
Convert a set of `InputExample`s to a TFRecord file.
language/multivec/preprocessing/create_training_data.py:1040
↓ 1 callers
Function
file_based_convert_examples_to_features_single
Convert a set of `InputExample`s to a TFRecord file.
language/multivec/preprocessing/create_training_data.py:990
↓ 1 callers
Function
file_based_input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
language/bert_extraction/steal_bert_qa/utils/run_bert_boolq_diff.py:311
↓ 1 callers
Function
file_based_input_fn_builder
Creates an `input_fn` closure to be passed to tf.Estimator.
language/relation_learning/models/bert_fewshot_classifier.py:174
↓ 1 callers
Function
file_based_input_fn_builder_dual_files
Creates an `input_fn` closure to be passed to TPUEstimator.
language/multivec/models/ranking_model_experiment_inbatch.py:204
↓ 1 callers
Function
file_based_input_fn_builder_single_files
Creates an `input_fn` closure to be passed to TPUEstimator.
language/multivec/models/ranking_model_experiment_inbatch.py:340
↓ 1 callers
Method
fill_example
Add an example to the list of examples for the specified split.
language/gscan/data/dataset.py:182
↓ 1 callers
Method
filter_legal_actions_for_vsh_node_crossed_search_boundary
( self, legal_actions: Tuple[int], is_recursive: bool, word_prefix: Tuple[int])
language/search_agents/muzero/state_tree.py:462
↓ 1 callers
Method
filter_legal_actions_for_vw_node_crossed_search_boundary
( self, legal_actions: Tuple[int], is_recursive: bool)
language/search_agents/muzero/state_tree.py:437
↓ 1 callers
Function
filter_nodes
(nodes, target_string)
language/compgen/csl/model/data/parsing_utils.py:118
← previous
next →
1,901–2,000 of 6,154, ranked by callers