MCPcopy Create free account

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

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

↓ 1 callersFunctionfilter_nodes
(nodes, target_string)
language/compgen/nqg/model/parser/data/parsing_utils.py:91
↓ 1 callersMethodfind_substr
Locates the substr in the text independent of surface variations. Args: text: A string that might contain the substr. substr: The sub
language/search_agents/muzero/types.py:77
↓ 1 callersFunctionflat_dict_to_nest
Convert a nested structure into a flat dictionary. Args: flat_dict: A dictionary with string keys. structure: A nested structure. Return
language/common/utils/nest_utils.py:122
↓ 1 callersFunctionflatten
Collapse all dimensions of a tensor but the last. This function also returns a function to unflatten any tensors to recover the original shape (a
language/common/utils/tensor_utils.py:163
↓ 1 callersFunctionflatten_and_filter_evidence_to_fever
Convert flattened, ranked evidence to fever format. This filters out gold examples not present in the retrieval scrape, and converts to the forma
language/serene/callbacks.py:61
↓ 1 callersFunctionflatten_recursive
Flattens (potentially nested) a tuple/dictionary/list to a list.
language/canine/modeling_test.py:289
↓ 1 callersMethodform_commands_from_template
Similar to parent's function but use new Derivation class.
language/gscan/data/grammar.py:502
↓ 1 callersFunctionformat_prompt
Constructs a retrieval-augmented input string. Args: orig_input: Input of the original example. exemplar_inputs: Inputs of the exemplars.
language/casper/augment/casper_formatters.py:237
↓ 1 callersFunctionformat_target
Reformat targets.
language/compgen/csl/tasks/smcalflow/tools/format_for_t5.py:29
↓ 1 callersMethodfrom_core_node
(cls, node: mzcore.Node, stack=None, leaves=None)
language/search_agents/muzero/types.py:332
↓ 1 callersMethodfrom_dict
(cls, params)
language/serene/training.py:123
↓ 1 callersMethodfrom_dict
Constructs a `BertConfig` from a Python dictionary of parameters.
language/canine/bert_modeling.py:87
↓ 1 callersMethodfrom_file
(cls, file_path, overrides = None)
language/serene/training.py:127
↓ 1 callersMethodfrom_root_with_history
Make a VisNode frmo a root.
language/search_agents/muzero/types.py:344
↓ 1 callersMethodfrom_rules
Recursively form a derivation from a rule list.
language/gscan/data/grammar.py:306
↓ 1 callersMethodfrom_string
(cls, rule_string)
language/compgen/nqg/tasks/spider/sql_parser.py:48
↓ 1 callersFunctiongather_indexes
Gathers the vectors at the specific positions over a minibatch.
language/conpono/cpc/bilin_model_builder.py:69
↓ 1 callersFunctiongather_indexes
Gathers the vectors at the specific positions over a minibatch.
language/conpono/cpc/model_builder.py:126
↓ 1 callersFunctiongather_indexes
Gathers the vectors at the specific positions over a minibatch.
language/conpono/reconstruct/model_builder.py:167
↓ 1 callersFunctiongather_topk_beams
Gathers the top-k beam slices given by score_or_log_prob array. Args: nested: pytree of arrays or scalars (the latter ignored). score_or_lo
language/gscan/xattn_model/model/decode.py:104
↓ 1 callersFunctiongenerate
Generates memories.
language/mentionmemory/experiments/memory_generation_main.py:101
↓ 1 callersMethodgenerate_all_commands
(self)
language/gscan/data/dataset.py:277
↓ 1 callersFunctiongenerate_article_pairs
Generates article pairs from multiple jsonl files.
language/fruit/scripts/get_topics.py:38
↓ 1 callersMethodgenerate_block_info
(self, title, text)
language/orqa/preprocessing/wiki_preprocessor.py:84
↓ 1 callersFunctiongenerate_data
Generate data.
language/gscan/data/main.py:178
↓ 1 callersFunctiongenerate_data_for_problem
Generate data for a problem in _SUPPORTED_PROBLEM_GENERATORS.
language/labs/consistent_zero_shot_nmt/bin/t2t_datagen.py:199
↓ 1 callersFunctiongenerate_data_for_registered_problem
Generate data for a registered problem.
language/labs/consistent_zero_shot_nmt/bin/t2t_datagen.py:235
↓ 1 callersMethodgenerate_distract_objects
Generate and place distract objects based on target and its reference.
language/gscan/data/dataset.py:405
↓ 1 callersFunctiongenerate_examples
Read data. Args: base_path: base path to the files. one instance per line. hps: hyperparameters is_train: Is training or not. R
language/labs/exemplar_decoding/utils/data.py:194
↓ 1 callersFunctiongenerate_examples
Generates serialized TF Examples.
language/realm/generate_retrieval_corpus.py:113
↓ 1 callersFunctiongenerate_examples_parallel
Same as `generate_examples`, but runs in parallel.
language/realm/generate_retrieval_corpus.py:122
↓ 1 callersFunctiongenerate_kb
Recover KB from processed pkl file.
language/emql/preprocess/query2box_preprocess.py:29
↓ 1 callersFunctiongenerate_lines_for_shared_vocab
Generate lines for a shared vocabulary generation.
language/labs/consistent_zero_shot_nmt/data_generators/translate_multilingual.py:162
↓ 1 callersFunctiongenerate_ngram_examples
Generates a sorted list of scored new words based on the requirements. Args: model: Trained model to create and score words. min_length: Th
language/wino_dict/create_new_words.py:189
↓ 1 callersFunctiongenerate_pattern_data
Generates a sequence of patterns followed by a degraded query pattern. Args: num_patterns (int): Number of unique patterns in the sequence
language/labs/memory/synthetic_dataset.py:39
↓ 1 callersFunctiongenerate_pattern_data_selective
Generates a sequence of patterns followed by a degraded query pattern. Args: num_patterns (int): Number of unique patterns in the sequence
language/labs/memory/synthetic_dataset.py:74
↓ 1 callersFunctiongenerate_queries
Returns a generator over Query objects.
language/realm/example_generator.py:117
↓ 1 callersFunctiongenerate_queries_and_candidates
Returns a generator over (Query, List[Document]) pairs.
language/realm/example_generator.py:142
↓ 1 callersFunctiongenerate_realm_examples
Generates examples for REALM pre-training. Args: featurizer: instance of featurization.Featurizer retriever: instance of retrieval.Retrieve
language/realm/example_generator.py:162
↓ 1 callersFunctiongenerate_realm_examples_with_model_refresh
Generates REALM examples, checking for new models periodically.
language/realm/example_generator.py:427
↓ 1 callersMethodgenerate_samples
Generates samples. Must be implemented by a subclass.
language/labs/consistent_zero_shot_nmt/data_generators/translate_multilingual.py:119
↓ 1 callersFunctiongenerate_samples_v2
Enum. (query, List<passage>, List<passage>, List<label>, List<score>).
language/multivec/preprocessing/create_training_data.py:271
↓ 1 callersMethodgenerate_sentences
Generate sentences in each block from text.
language/orqa/preprocessing/wiki_preprocessor.py:48
↓ 1 callersFunctiongenerate_split
Place queries in sets of training, dev, test, and heldout train. Args: queries_path : str name of file containing json table of queries f
language/multivec/preprocessing/create_training_data.py:932
↓ 1 callersFunctiongenerate_symbolic_data
Generates a sequence of key-value pairs followed by a query key. Args: num_pairs (int): Number of pairs Returns: seq_text (str): Sequenc
language/labs/memory/synthetic_dataset.py:121
↓ 1 callersFunctionget_activation
Maps a string to a Python function, e.g., "relu" => `tf.nn.relu`. Args: activation_string: String name of the activation function. Returns:
language/canine/bert_modeling.py:300
↓ 1 callersFunctionget_all_atoms
(examples, get_atoms_fn)
language/compgen/nqg/tasks/mcd_utils.py:283
↓ 1 callersMethodget_answers
(self, q_key)
language/multivec/preprocessing/create_training_data.py:758
↓ 1 callersFunctionget_assignment_map_from_checkpoint
Compute the union of the current variables and checkpoint variables.
language/labs/drkit/run_dualencoder_lsf.py:1342
↓ 1 callersFunctionget_assignment_map_from_checkpoint
Compute the union of the current variables and checkpoint variables.
language/labs/drkit/run_multihop_follow.py:361
↓ 1 callersFunctionget_assignment_map_from_checkpoint
Compute the union of the current variables and checkpoint variables.
language/labs/drkit/hotpotqa/demo.py:840
↓ 1 callersFunctionget_assignment_map_from_checkpoint_conpono
Compute the union of the current variables and checkpoint variables.
language/conpono/evals/run_concat_classifier.py:738
↓ 1 callersFunctionget_atoms
Use individual tokens as atoms.
language/compgen/nqg/tasks/geoquery/tmcd_utils.py:96
↓ 1 callersFunctionget_atoms
Simply return tokens in the SQL query as atoms.
language/compgen/nqg/tasks/spider/tmcd_utils.py:26
↓ 1 callersFunctionget_atoms_with_num_arguments
Consider symbols and their number of arguments.
language/compgen/nqg/tasks/geoquery/tmcd_utils.py:105
↓ 1 callersMethodget_attention_masks
(self, inputs, targets)
language/gscan/xattn_model/model/models.py:257
↓ 1 callersFunctionget_batch_and_retrievals_entity_overlap
Compute the overlap between entities in the batch and in retrievals. Args: mention_target_batch_positions: [n_target_mentions] position of a me
language/mentionmemory/modules/mention_losses.py:487
↓ 1 callersFunctionget_bboxes
Extracts bounding boxes relevant to the given tokens. Args: tokens: list of string tokens where objects with bounding boxes are denoted [
language/question_answering/b2t2/compute_vcr_features.py:138
↓ 1 callersFunctionget_bert_embeddings
Extract embeddings from BERT model.
language/labs/drkit/model_fns.py:602
↓ 1 callersMethodget_bleurt
(self, paired_anno: annotation.PairedAnnotation)
language/diffqg/metrics.py:271
↓ 1 callersFunctionget_bytes_feature
(value)
language/gscan/xattn_model/dataset/preprocess.py:284
↓ 1 callersFunctionget_candidate_type
Returns the candidate's type: Table, Paragraph, List or Other.
language/question_answering/bert_joint/run_nq.py:294
↓ 1 callersFunctionget_candidate_type_and_position
Returns type and position info for the candidate at the given index.
language/canine/tydiqa/preproc.py:269
↓ 1 callersMethodget_canonical_property
Returns true if the prop and tail are canonical WikiData properties.
language/labs/drkit/wikidata/preprocessing/distantly_supervise.py:151
↓ 1 callersFunctionget_checkpoint
()
language/compgen/nqg/model/parser/inference/generate_predictions.py:66
↓ 1 callersFunctionget_compounds
Use combinations of 2 atoms as compounds.
language/compgen/nqg/tasks/geoquery/tmcd_utils.py:89
↓ 1 callersFunctionget_compounds
(sql_expr)
language/compgen/nqg/tasks/spider/tmcd_utils.py:110
↓ 1 callersFunctionget_context_features
()
language/xsp/model/input_pipeline.py:71
↓ 1 callersFunctionget_custom
(filename)
language/bert_extraction/steal_bert_qa/utils/run_bert_boolq_diff.py:181
↓ 1 callersFunctionget_custom
(filename)
language/bert_extraction/steal_bert_qa/models/run_bert_boolq_distill.py:218
↓ 1 callersFunctionget_custom
(filename)
language/bert_extraction/steal_bert_qa/models/run_bert_boolq.py:208
↓ 1 callersMethodget_custom_examples
See base class.
language/bert_extraction/steal_bert_classifier/models/run_classifier.py:281
↓ 1 callersFunctionget_data_files
Get list of data files from data_sources. Args: data_sources: a list or tuple of data file paths. Returns: A list of file paths. Rais
language/xsp/model/input_utils.py:37
↓ 1 callersMethodget_data_pairs
Generate a set of situations and generate all possible commands.
language/gscan/data/dataset.py:775
↓ 1 callersFunctionget_dataset
Converts a dataset file to a dataset tensor.
language/xsp/model/input_utils.py:75
↓ 1 callersFunctionget_dataset_config
Config for dataset and input pipeline.
language/gscan/xattn_model/configs/compositional.py:20
↓ 1 callersFunctionget_dataset_config
Config for dataset and input pipeline.
language/gscan/xattn_model/configs/spatial_relation.py:20
↓ 1 callersFunctionget_dataset_test_config
Returns the test config for dataset.
language/gscan/xattn_model/test_utils.py:25
↓ 1 callersMethodget_date_property
Returns date if property accepts '/w/time' as target.
language/labs/drkit/wikidata/preprocessing/distantly_supervise.py:137
↓ 1 callersFunctionget_datetime_exact_match
Return seed rules based on exact match for dates and times.
language/compgen/csl/tasks/smcalflow/tools/generate_identity_rules.py:51
↓ 1 callersFunctionget_dense_is_inside_for_sparse_spans
Dense mask whether position is inside span given sparse starts / ends.
language/mentionmemory/utils/mention_preprocess_utils.py:63
↓ 1 callersFunctionget_dense_span_ends_from_starts
For every mention start positions finds the corresponding end position.
language/mentionmemory/utils/mention_preprocess_utils.py:358
↓ 1 callersFunctionget_descriptor
()
language/search_agents/muzero/env.py:82
↓ 1 callersFunctionget_dev
()
language/bert_extraction/steal_bert_qa/models/run_bert_boolq_distill.py:206
↓ 1 callersFunctionget_dev
()
language/bert_extraction/steal_bert_qa/models/run_bert_boolq.py:196
↓ 1 callersFunctionget_dev
()
language/boolq/run_bert_boolq.py:185
↓ 1 callersMethodget_dev_examples
Gets a collection of `InputExample`s for the dev set.
language/bert_extraction/steal_bert_classifier/models/run_classifier_membership.py:189
↓ 1 callersMethodget_dev_examples
Gets a collection of `InputExample`s for the dev set.
language/bert_extraction/steal_bert_classifier/models/run_classifier_distillation.py:192
↓ 1 callersMethodget_dev_examples
Gets a collection of `InputExample`s for the dev set.
language/bert_extraction/steal_bert_classifier/models/run_classifier.py:192
↓ 1 callersMethodget_dev_examples
See base class.
language/conpono/evals/run_classifier.py:393
↓ 1 callersMethodget_dev_examples
See base class.
language/conpono/evals/run_concat_classifier.py:398
↓ 1 callersMethodget_dev_examples
Gets a collection of `InputExample`s for the dev set.
language/conpono/evals/race_utils.py:80
↓ 1 callersMethodget_dims
Returns the dimension size of word embeddings in this object. Returns: dims: Integer dimension of word embeddings. None if no embeddings we
language/common/inputs/embedding_utils.py:241
↓ 1 callersMethodget_docs_and_scores
Retrieve documents based on BM25 scores. Args: query: The query to retrieve documents for. topk: Return top-k document ids. Retu
language/quest/bm25/bm25_retriever.py:48
↓ 1 callersMethodget_documents
Get k best documents from search environment for given query. Args: query: str, Query for the retrieval. original_query: str, Origina
language/search_agents/muzero/server.py:70
↓ 1 callersFunctionget_documents_dataset
()
language/realm/retrieval.py:621
↓ 1 callersMethodget_downsampled_layers
Gets a sequence representation, one position per character.
language/canine/modeling.py:601
↓ 1 callersFunctionget_dynamic_dataset
Get dataset generated dynamically by a preprocessing job.
language/realm/model.py:324
↓ 1 callersMethodget_empty_data_statistics
(self)
language/gscan/data/dataset.py:192
↓ 1 callersFunctionget_eval_dictionary
run inference and get eval results.
language/multivec/models/ranking_model_experiment_inbatch.py:866
← previousnext →2,001–2,100 of 6,154, ranked by callers