MCPcopy Create free account

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

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

Functiondset_fn
Construct a tf dataset. Returns: a tf dataset
language/nql/demos/metaqa/metaqa.py:211
Functiondset_fn
()
language/nql/demos/nell995/nell995.py:234
Methoddummy_input
Produces model-specific dummy input batch. See BaseTask for details.
language/mentionmemory/tasks/mention_classifier_task.py:229
Methoddummy_input
Produces model-specific dummy input batch. See BaseTask.
language/mentionmemory/tasks/mention_memory_task.py:394
Methoddummy_input
Produces model-specific dummy input batch. See BaseTask.
language/mentionmemory/tasks/mauto_task.py:321
Methoddummy_input
Produces model-specific dummy input batch. See BaseTask.
language/mentionmemory/tasks/example_task.py:123
Methoddummy_input
Produces model-specific dummy input batch. See BaseTask.
language/mentionmemory/tasks/entity_qa_task.py:81
Methoddummy_input
Produces model-specific dummy input batch. See BaseTask for details.
language/mentionmemory/tasks/relation_classifier_task.py:360
Methoddummy_input
Produces model-specific dummy input batch. See BaseTask.
language/mentionmemory/tasks/text_classifier.py:281
Methoddummy_input
Produces model-specific dummy input batch. See BaseTask.
language/mentionmemory/tasks/memory_generation_task.py:210
Methoddummy_input
Produces model-specific dummy input batch. See BaseTask.
language/mentionmemory/tasks/mention_encoder_task.py:199
Functiondummy_predictor
(_)
language/orqa/predict/orqa_demo.py:74
Functionedit_rouge
Measures a variety of different ROUGE scores.
language/fruit/metrics.py:26
Methodembed
Embed a list of evidence text. Args: examples: A list of evidence text to embed. as_claim: Whether to embed examples as claims
language/serene/training.py:595
Methodembed_batch
(self, examples: List[Example])
language/casper/retrieve/query_retrievers.py:349
Methodembed_batch
(self, examples: List[Example])
language/casper/retrieve/query_retrievers.py:386
Methodembed_batch
Returns an embedding matrix with embedding size 51.
language/casper/retrieve/query_retrievers_test.py:135
Functionembed_documents_using_multiple_tpu_workers
Embeds documents using multiple TPU workers. Args: shard_paths: a list of file paths, each specifying a GZIP'd TFRecord file containing d
language/realm/retrieval.py:496
Functionembedding_lookup_with_padding
Wrapper of tf.nn.embedding_lookup with padding. Args: embeddings_mat: embedding table ids: ids of elements padding: padded value Ret
language/emql/util.py:162
Methodembedding_table
(self)
language/capwap/utils/transformer_utils.py:154
Methodempty_buffer
()
language/nql/nql/__init__.py:1401
Functionenable_add_function_variable_scopes
Add tf.variable_scope with the function name in each `tc.contract`? This is disabled by default because it will *CHANGE THE NAMES OF YOUR VARIABL
language/canine/tensor_contracts.py:87
Methodencode_example
(self, *, claim, evidence, claim_label, evidence_label, metadata, wikipedia_url, sentence
language/serene/preprocessing.py:328
Methodencode_example
(self, *, claim, evidence, claim_label, evidence_label, metadata, wikipedia_url, sentence
language/serene/preprocessing.py:439
Methodencode_from_json
(self, example)
language/serene/preprocessing.py:109
Methodencode_func
A closure that builds encoder outputs.
language/labs/consistent_zero_shot_nmt/models/agreement.py:305
Methodencode_map_fn
Read example from tfds and constructed named tensor inputs.
language/serene/preprocessing.py:380
Methodencode_map_fn
Read example from tfds and constructed named tensor inputs.
language/serene/preprocessing.py:498
Functionencode_op
Encode set to EmQL representations. Args: params: a dictionary of hyper-parameters. set_ids: a tf.Tensor of element ids in the set. set
language/emql/module.py:81
Functionencoder
Model function. Atttention seq2seq model, augmented with an encoder over the targets of the nearest neighbors. Args: features: Dictionary
language/labs/exemplar_decoding/models/baselines.py:62
Methodend_idx
(self)
language/gscan/xattn_model/dataset/preprocess.py:122
Functionensure_unicode
Convert `x` to unicode, if it is not unicode already.
language/boolq/utils/py_utils.py:45
Functionentity_linking_loss
Compute entity linking loss. Args: mention_encodings: [n_mentions, hidden_size] mention encodings to be used for computing the loss.
language/mentionmemory/modules/mention_losses.py:423
Functionescape_for_lucene
Reimplementation of QueryParser.escape. See https://github.com/apache/lucene-solr/blob/d894a7e8d75967fd0574bc1c98860b6062c21773/lucene/queryparse
language/search_agents/muzero/utils.py:405
Methodeval_metrics
(self)
language/labs/consistent_zero_shot_nmt/data_generators/translate_multilingual.py:144
Functioneval_model
Compute counts on examples.
language/compgen/csl/model/inference/eval_utils.py:22
Functioneval_periodically_callback
(fd, latest_loss, elapsed_time)
language/nql/demos/metaqa/metaqa.py:326
Functioneval_periodically_callback
(fd, latest_loss, elapsed_time)
language/nql/demos/nell995/nell995.py:318
Functioneval_step
Compute the metrics for the given model in inference mode.
language/gscan/xattn_model/train.py:80
Functioneval_step
Calculate evaluation metrics on a batch. Args: train_state: contains model params, loss fn, grad update fn. model_vars: model variables tha
language/mentionmemory/training/trainer.py:42
Functionevaluate_captions
Evaluate reference-based metrics on predicted captions. Args: caption_file: Path to predicted captions. coco_annotations: Path to COCO data
language/capwap/utils/metric_utils.py:329
Functionevaluate_checkpoints
Continuously loops while checking for checkpoints to evaluate. Args: estimator: Instance of Estimator. caption_input_fn: Estimator input fu
language/capwap/utils/experiment_utils.py:211
Functionevaluate_predictions
Calculates and returns metrics.
language/orqa/utils/eval_utils.py:97
Functionevaluate_predictions
Postprocesses predictions and calculates EM against gold programs.
language/compir/evaluate/evaluate_predictions_utils.py:51
Functionevaluate_questions
Evaluate QA-based metrics on predicted captions. If multiple captions are associated with an image/question pair, the average max metric score wi
language/capwap/utils/metric_utils.py:368
Functionexact_match
Sequence exact match averaged over batch size.
language/gscan/xattn_model/evaluation.py:21
Functionexact_match
Measures exact match of targets and predictions.
language/fruit/metrics.py:65
Functionexact_match_score
Compute EM score.
language/labs/drkit/evaluate.py:355
Functionexact_match_score
(prediction, ground_truth)
language/orqa/utils/eval_utils.py:45
Functionexact_match_score
(prediction, ground_truth)
language/bert_extraction/steal_bert_qa/utils/evaluate_squad.py:84
Functionexample_from_json_line
(line, html_parser, preprocessor)
language/orqa/preprocessing/wiki_preprocessor.py:99
Methodexample_reading_spec
(self)
language/labs/consistent_zero_shot_nmt/data_generators/translate_multilingual.py:64
Functionexecute_action
Execute an action.
language/compgen/csl/induction/induction_utils.py:94
Methodexpand
(self, root)
language/compgen/csl/induction/search_main_beam.py:64
Methodexpand
Turns this fragment into encoder-compatible inputs. - Maps the `text` tokens to integer ids, also expanding contextual pre-terminals such as
language/search_agents/muzero/utils.py:314
Methodexpand
(self, input_or_inputs)
language/fruit/beam_pipelines.py:147
Methodexpand
(self, collection)
language/capwap/preprocessing/text_synthetic_qa.py:91
Methodexpand
(self, collection)
language/capwap/preprocessing/text_synthetic_qa.py:161
Functionexpand_example
Expand nested tensor protos into multiple examples.
language/capwap/datasets/wsp_dataset.py:56
Functionexpand_example
Expand nested tensor protos into multiple examples.
language/capwap/datasets/vqa_dataset.py:61
Functionexpand_unit_rules
Removes unit rules, i.e. X -> Y where X and Y are non-terminals. Args: rules: List of rule objects. lhs_fn: Returns `lhs` of a rule.
language/compgen/csl/cky/cfg_converter.py:76
Functionexperiment_function
An experiment function satisfying the tf.estimator API. Args: run_config: A learn_running.EstimatorConfig object. hparams: Unused set of hy
language/labs/memory/run_models.py:277
Functionexperiment_functions
Get the necessary functions to run an experiment.
language/question_answering/decatt_docreader/models/nq_long_model.py:281
Functionexperiment_functions
Get the necessary functions to run an experiment.
language/question_answering/decatt_docreader/models/nq_short_pipeline_model.py:304
Methodexport
(self, estimator, export_path, checkpoint_path, eval_result, is_the_final_export)
language/boolq/utils/best_checkpoint_exporter.py:60
Methodexport
Implements Exporter.export().
language/common/utils/exporters.py:80
Methodexport
(self, estimator, export_path, checkpoint_path=None, eval_
language/common/utils/exporters.py:123
Functionexporter
Create exporters.
language/orqa/models/ict_model.py:192
Functionexporter
Create exporters.
language/orqa/models/text_classifier_model.py:180
Functionexporter
Create exporters.
language/orqa/models/orqa_model.py:477
Functionextract_additions
Simple heuristic for extracting added text from normalized inputs/outputs.
language/fruit/rendering_utils.py:747
Functionf
(example: Dict[str, tf.Tensor])
language/mentionmemory/utils/data_utils.py:150
Functionf1_metric
Computes F1 based on precision and recall. Args: precision: <float> [batch_size] precision_op: Update op for precision. recall: <float>
language/question_answering/decatt_docreader/utils/nq_long_utils.py:141
Functionf1_score
Compute F1 score.
language/labs/drkit/evaluate.py:340
Functionf1_score_multiple
Calculate word level F1 score across multiple predictions.
language/bert_extraction/steal_bert_qa/utils/evaluate_squad.py:75
Methodf_lossy
Transforms a single program to its lossy IR.
language/compir/dataset_parsers/cfq_parser.py:155
Methodf_lossy
Transforms a single program to its lossy IR.
language/compir/dataset_parsers/scan_parser.py:95
Methodf_lossy
Transforms a single program to its lossy IR.
language/compir/dataset_parsers/sql_parser.py:45
Methodf_reversible
Transforms a single program to its reversible IR.
language/compir/dataset_parsers/cfq_parser.py:79
Methodf_reversible
Transforms a single program to its reversible IR.
language/compir/dataset_parsers/scan_parser.py:80
Methodf_reversible
Transforms a single program to its reversible IR.
language/compir/dataset_parsers/sql_parser.py:32
Methodf_reversible_inverse
Invert a SPARQL program from its IR back to its original representation.
language/compir/dataset_parsers/cfq_parser.py:235
Methodf_reversible_inverse
Removes all parenthesis from the program.
language/compir/dataset_parsers/scan_parser.py:182
Methodf_reversible_inverse
Adds 'alias' back to the names of tables.
language/compir/dataset_parsers/sql_parser.py:76
Methodfact_follow_generator
Generate set intersections. Yields: a tuple
language/emql/data_loader.py:763
Functionfalses_like
(t)
language/labs/exemplar_decoding/utils/tensor_utils.py:84
Methodfeature_lists
(self)
language/search_agents/muzero/utils.py:308
Methodfeature_vals
(key: Text)
language/canine/tydiqa/tf_io_test.py:258
Methodfeaturize
(doc_dict)
language/realm/retrieval.py:371
Functionff_layer
Single hidden-layer feed-forward network. Args: x: <float>[batch_size, length, input_size] hidden_size: Integer number of dimensions for hi
language/xsp/model/common_layers.py:384
Functionffnn
A simple feed-forward neural network. Dropout is applied before each linear layer. Non-linearities are not applied to the final hidden layer.
language/common/layers/common_layers.py:27
Functionfile_based_convert_examples_for_bilinear
Convert a set of `InputExample`s to a TFRecord file.
language/conpono/evals/model_builder.py:330
Functionfile_based_convert_examples_record
Convert record json data to tfrecord.
language/conpono/evals/model_builder.py:376
Functionfile_based_convert_examples_to_features
Convert a set of `InputExample`s to a TFRecord file.
language/conpono/evals/classifier_utils.py:700
Functionfile_based_convert_examples_to_features
Convert a set of `InputExample`s to a TFRecord file.
language/conpono/evals/race_utils.py:244
Functionfile_based_convert_examples_to_features
Convert a set of `InputExample`s to a TFRecord file.
language/conpono/evals/model_builder.py:298
Functionfile_based_input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
language/conpono/evals/classifier_utils.py:736
Functionfile_based_input_fn_builder
(input_file, seq_length, seq_length_query, num_candidates, is_training, drop_r
language/multivec/models/ranking_model_experiment_inbatch.py:196
Functionfile_based_input_fn_builder_single
Creates an `input_fn` closure to be passed to TPUEstimator.
language/multivec/models/ranking_model_experiment_inbatch.py:285
Methodfiles
Return the files for the sharded embeddings. Args: tmp: Whether to return paths in /tmp or not Returns: Paths of all sharded fil
language/serene/wiki_index.py:78
← previousnext →3,801–3,900 of 6,154, ranked by callers