MCPcopy Create free account

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

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

Functioncandidates_iter
Yields the candidates that should not be skipped in an example.
language/canine/tydiqa/data.py:212
Functioncanonicalize_nts
Follows convention of source indexes being in order.
language/compgen/csl/induction/rule_utils.py:31
Functioncanonicalize_nts
Follows convention of source indexes being in order.
language/compgen/nqg/model/induction/rule_utils.py:32
Functioncaption_example
Convert image caption data into an Example proto. Args: image: A ImageMetadata instance. Returns: example: An Example proto with seriali
language/capwap/utils/io_utils.py:75
Functionccnews_pipeline
Read CCNews filenames and create Beam pipeline.
language/conpono/cpc/preproc/ccnews_preproc_pipeline.py:149
Functionccnews_pipeline
Read Books Corpus filenames and create Beam pipeline.
language/conpono/cpc/preproc/raw_books_preproc_pipeline.py:163
Functioncharacter_cnn
A character-level convolutional neural network with max-pooling. Args: char_ids: tensor<int32> [batch_size, ..., max_word_length] num_chars
language/common/layers/common_layers.py:54
Methodcheck
(self, context: _Context, args_dict: Dict[Text, Any], named_dims: Dict[Text, Union[int, tf.Tensor]
language/canine/tensor_contracts.py:129
Methodcheck
(self, context: _Context, args_dict: Dict[Text, Any], named_dims: Dict[Text, Union[int, tf.Tensor]
language/canine/tensor_contracts.py:721
Methodcheck_dicts
(d1, d2)
language/nql/nql/nql_test.py:452
Methodcheck_one_hot
(self, m, i, typename)
language/nql/nql/util_test.py:180
Functioncheck_preconditions_and_run_func
Invoked by Python when `@contract` is used as a function decorator.
language/canine/tensor_contracts.py:1201
Functionchoose_random_question
Sample a paragraph's words to form a question.
language/bert_extraction/steal_bert_qa/data_generation/preprocess_util.py:126
Functionclean_merge
Cleans up merged articles.
language/fruit/beam_pipelines.py:166
Functionclean_tfhub_exports
(model_dir, hub_prefix, exports_to_keep)
language/common/utils/export_utils.py:74
Functionclean_titles
Cleans article titles.
language/fruit/beam_pipelines.py:42
Methodclose
(self)
language/serene/scrape_db.py:67
Functioncogs_lf_to_funcall
Converts the given COGS logical form into the variable-free form. - Nouns (entities and unaries) become values: Jack --> Jack cat ( x _
language/compgen/csl/tasks/cogs/tools/cogs_converter.py:19
Methodcollater_fn
Collater function for mention classification task. See BaseTask.
language/mentionmemory/tasks/mention_classifier_task.py:89
Methodcollater_fn
(batch: Dict[str, tf.Tensor])
language/mentionmemory/tasks/mention_memory_task.py:385
Methodcollater_fn
(batch: Dict[str, tf.Tensor])
language/mentionmemory/tasks/mauto_task.py:234
Methodcollater_fn
(batch: Dict[str, tf.Tensor])
language/mentionmemory/tasks/example_task.py:105
Methodcollater_fn
Collater function for relation classification task. See BaseTask.
language/mentionmemory/tasks/relation_classifier_task.py:204
Methodcollater_fn
(batch: Dict[Text, tf.Tensor])
language/mentionmemory/tasks/text_classifier.py:197
Methodcollater_fn
(batch: Dict[str, tf.Tensor])
language/mentionmemory/tasks/memory_generation_task.py:165
Methodcollater_fn
(batch: Dict[str, tf.Tensor])
language/mentionmemory/tasks/mention_encoder_task.py:127
Functioncolumn_is_primary_key
Returns whether a column object is marked as a primary key.
language/xsp/data_preprocessing/schema_utils.py:113
Functioncombine_lengths
Aggregates lengths from multiple PCollections.
language/fruit/beam_pipelines.py:803
Functioncompare_decode_steps
Returns tensor of bools indicated whether decode steps are equal.
language/xsp/model/decode_utils.py:123
Functioncompare_fn
(best_eval_result, current_eval_result)
language/labs/consistent_zero_shot_nmt/utils/t2t_tweaks.py:183
Functioncompare_fn
(best_eval_result, current_eval_result)
language/boolq/run_recurrent_model_boolq.py:472
Functioncompare_generating_steps
Compare generating steps only but ignoring target copying steps. Args: target_decode_steps: Target DecodeSteps, Each tensor is expected to be s
language/xsp/model/decode_utils.py:134
Functioncompare_metrics
Compares two evaluation results.
language/question_answering/decatt_docreader/models/nq_long_model.py:237
Functioncompare_metrics
Compares two evaluation results.
language/question_answering/decatt_docreader/models/nq_short_pipeline_model.py:299
Functioncompute_attention_mask
Compute attention mask.
language/capwap/utils/transformer_utils.py:413
Functioncompute_average_precision_at_k
Compute average precision at k. Args: logits: batch_size, nun_candidate labels: batch_size, num_candidate k: scalar Returns: ave
language/emql/util.py:96
Functioncompute_bert_state
Computes the BERT state as in the agent.
language/search_agents/muzero/bert_state_lib.py:80
Functioncompute_cross_entropy_loss_with_positives_and_negatives_masks
Compute (weighted) cross-entropy loss and accuracy-related metrics. The function computes cross entropy loss when there are potentially multiple
language/mentionmemory/utils/metric_utils.py:158
Functioncompute_em
(answer: str, gold_answer: List[str])
language/search_agents/muzero/utils.py:192
Functioncompute_em
Exact match score.
language/capwap/utils/metric_utils.py:210
Functioncompute_f1
Computes F1 score for a single prediction and a list of gold answers. See 'compute_f1_single' for details. Expects all input strings to be unicode.
language/search_agents/muzero/utils.py:87
Functioncompute_f1
F1 score.
language/capwap/utils/metric_utils.py:194
Functioncompute_hits_at_k
Compute hits@1. Args: logits: batch_size, num_candidate labels: batch_size, num_candidate k: top k Returns: hits@k
language/emql/util.py:53
Functioncompute_indicator
Indicator score.
language/capwap/utils/metric_utils.py:215
Methodcompute_input_shapes
Return the expected input shapes of the encoder. Sometimes keras can infer this, but often with named dictionaries it does not infer correctl
language/serene/preprocessing.py:163
Methodcompute_input_shapes
(self)
language/serene/preprocessing.py:413
Methodcompute_label_loss
(logits, labels)
language/canine/tydiqa/tydi_modeling.py:157
Methodcompute_loss
(mention_encodings, mention_batch_positions, mention_target_is_masked, mention_ids)
language/mentionmemory/modules/mention_losses_test.py:119
Methodcompute_loss
(logits, positions)
language/canine/tydiqa/tydi_modeling.py:148
Functioncompute_loss_and_prob_from_probs_with_duplicates
Compute weighted loss and avg correct probability given probs and targets. Args: probs: [batch, length, num_items] float array. classes: [bat
language/mentionmemory/utils/metric_utils.py:127
Functioncompute_match_stats
Compute statistics that are used to compute evaluation metrics. Args: predictions: <int32> [batch_size] labels: <int32> [batch_size, num_an
language/question_answering/decatt_docreader/utils/nq_long_utils.py:113
Functioncompute_metrics
Compute metrics using counts.
language/compgen/csl/model/inference/eval_utils.py:77
Functioncompute_metrics
Compute loss and evaluation metrics.
language/gscan/xattn_model/train_utils.py:181
Functioncompute_null_weights
(labels, null_weight)
language/question_answering/decatt_docreader/utils/nq_long_utils.py:80
Methodcompute_output_shape
(self, input_shape)
language/labs/exemplar_decoding/models/linear.py:278
Methodcompute_output_shape
(self, input_shape)
language/nql/nql/__init__.py:1823
Methodcompute_output_shape
(self, input_shape)
language/common/layers/affine_transform.py:49
Functioncompute_pred_dict
Computes official answer key from raw logits. This function joins three pieces needed for eval script for each example, based on the unique_id:
language/canine/tydiqa/postproc.py:183
Functioncompute_recall_at_k
Compute hits@1. Args: logits: batch_size, num_candidate labels: batch_size, num_candidate k: top k Returns: recall at k
language/emql/util.py:75
Functioncompute_rollouts
Rollout model and compute rewards for each sample. Args: model: utils.transformer_utils.TransformerModel instance. rc_model: TF Hub module
language/capwap/utils/reward_utils.py:478
Functioncompute_sentence_generation_scores
Compute the decontextualization performances.
language/decontext/eval_util.py:257
Functioncompute_split_assignments
(split_points)
language/mentionmemory/modules/kmeans.py:61
Functioncompute_tp_fp_fn_weighted
Compute true positives, false positives and false negatives. Args: predictions: [batch, length] categorical predictions int array. labels: [b
language/mentionmemory/utils/metric_utils.py:87
Functioncompute_weighted_accuracy
Compute weighted accuracy for log probs and targets. Args: scores: [batch, length, num_classes] float array. targets: [batch, length] categor
language/mentionmemory/utils/metric_utils.py:65
Functioncompute_weighted_cross_entropy
Compute weighted cross entropy and entropy for log probs and targets. Args: scores: [batch, length, num_classes] float array. targets: [batch
language/mentionmemory/utils/metric_utils.py:28
Functioncompute_x_in_set
Check if elements in tensor x are in set s. Args: x: batch_size, num_candidate s: batch_size, k (padded with -1) Returns: boolean te
language/emql/util.py:186
Methodconcat_lirs
Concatenates the lossy IR to the utterance.
language/compir/dataset_parsers/dataset_parser.py:166
Functionconcat_logits
(generate_logits, copy_logits)
language/xsp/model/decode_utils.py:119
Functioncondition_fun
(val)
language/mentionmemory/modules/kmeans.py:153
Methodcondition_position_table
(self)
language/capwap/utils/transformer_utils.py:166
Methodconditional_move
(c)
language/nql/nql/nql_test.py:786
Methodconditional_move1
(c)
language/nql/nql/nql_test.py:461
Methodconditional_move2
(c)
language/nql/nql/nql_test.py:466
Methodconfig
(self)
language/capwap/utils/transformer_utils.py:150
Methodconfig_context
(self, context, params=None)
language/nql/nql/util_test.py:109
Methodconfig_context
(self, context, params=None)
language/nql/demos/metaqa/metaqa.py:77
Methodconfig_context
(self, context, params=None)
language/nql/demos/nell995/nell995.py:103
Methodconfig_model_evaluation
(self, model, labels_ph, params=None)
language/nql/nql/util_test.py:131
Methodconfig_model_evaluation
(self, model, labels_ph, params=None)
language/nql/demos/metaqa/metaqa.py:181
Methodconfig_model_evaluation
(self, model, labels_ph, params=None)
language/nql/demos/nell995/nell995.py:203
Methodconfig_model_prediction
(self, model, feature_ph_dict, params=None)
language/nql/nql/util_test.py:118
Methodconfig_model_prediction
(self, model, feature_ph_dict, params=None)
language/nql/demos/metaqa/metaqa.py:100
Methodconfig_model_prediction
(self, model, feature_ph_dict, params=None)
language/nql/demos/nell995/nell995.py:129
Methodconfig_model_training
(self, model, labels_ph, params=None)
language/nql/nql/util_test.py:124
Methodconfig_model_training
(self, model, labels_ph, params=None)
language/nql/demos/metaqa/metaqa.py:165
Methodconfig_model_training
(self, model, labels_ph, params=None)
language/nql/demos/nell995/nell995.py:188
Functionconstruct_grammar
Builds the grammar according to `grammar_config`.
language/search_agents/muzero/grammar_lib.py:142
Functionconstruct_input_ids
Perform the transformations to produce input_ids given untokenized strings. Given a Tensor of untokenized strings and a tokenization function, perf
language/conpono/reconstruct/preprocess.py:146
Methodconstruct_relation_group
Declare a group of relations. Codes to shard the reified KB is presented in the function construct_relation_group(). Triples are constru
language/nql/nql/dist.py:200
Functioncontract
Decorator that specifies the tensor contract for a function. This is the primary API for tensor contracts. See README.md for example usage. A
language/canine/tensor_contracts.py:1183
Methodconvert_entid
(q2b_entid)
language/emql/data_loader.py:1065
Functionconvert_examples_to_features
Convert a set of `InputExample`s to a list of `InputFeatures`.
language/bert_extraction/steal_bert_classifier/models/run_classifier_membership.py:763
Functionconvert_examples_to_features
Convert a set of `InputExample`s to a list of `InputFeatures`.
language/bert_extraction/steal_bert_classifier/models/run_classifier.py:964
Functionconvert_examples_to_features
Convert a set of `InputExample`s to a list of `InputFeatures`.
language/bert_extraction/steal_bert_qa/utils/run_bert_boolq_diff.py:572
Functionconvert_examples_to_features
Convert a set of `InputExample`s to a list of `InputFeatures`.
language/bert_extraction/steal_bert_qa/models/run_bert_boolq_distill.py:609
Functionconvert_examples_to_features
Convert a set of `InputExample`s to a list of `InputFeatures`.
language/bert_extraction/steal_bert_qa/models/run_bert_boolq.py:587
Functionconvert_examples_to_features
Convert a set of `InputExample`s to a list of `InputFeatures`.
language/conpono/evals/run_classifier.py:871
Functionconvert_examples_to_features
Convert a set of `InputExample`s to a list of `InputFeatures`.
language/conpono/evals/run_concat_classifier.py:987
Functionconvert_examples_to_features
Convert a set of `InputExample`s to a list of `InputFeatures`.
language/boolq/run_bert_boolq.py:566
Functionconvert_examples_to_features
Converts `TyDiExample`s into `InputFeatures` and sends them to `output_fn`. Each entry is split into multiple `InputFeatures`, which contains windo
language/canine/tydiqa/preproc.py:312
← previousnext →3,601–3,700 of 6,154, ranked by callers