MCPcopy Create free account

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

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

↓ 1 callersFunctionis_whitespace
(c)
language/conpono/evals/run_squad.py:231
↓ 1 callersFunctionis_whitespace
(c)
language/question_answering/bert_joint/run_nq.py:480
↓ 1 callersMethodis_wikidata_entity
Check if this is wikidata entity.
language/templama/sling2facts.py:347
↓ 1 callersFunctioniter_rc_examples
Join examples by id and yield.
language/capwap/datasets/rc_dataset.py:51
↓ 1 callersMethodjson_repr
(self)
language/search_agents/muzero/types.py:213
↓ 1 callersMethodjump_to_all
A universal set containing all entities of some type. Args: type_name: the string type name Returns: A NeuralQueryExpression for
language/nql/nql/__init__.py:484
↓ 1 callersMethodjump_to_none
An empty set for some type. Args: type_name: the string type name Returns: A NeuralQueryExpression for an all-zeros vector for
language/nql/nql/__init__.py:495
↓ 1 callersFunctionk_func
(targ, sent_idx)
language/conpono/cpc/preproc/preprocessing_utils.py:193
↓ 1 callersFunctionk_hot_array_from_string_list
Create a numpy array encoding a k-hot set. Args: context: a NeuralExpressionContext typename: type of entity_names entity_names: list o
language/nql/nql/dataset.py:182
↓ 1 callersMethodkey_annotation
(self)
language/diffqg/annotation.py:39
↓ 1 callersFunctionl2_distance
Compute l2 distance between arrays.
language/mentionmemory/modules/kmeans.py:26
↓ 1 callersMethodlayer_factory
()
language/mentionmemory/modules/transformer.py:147
↓ 1 callersFunctionlayer_norm_and_dropout
Runs layer normalization followed by dropout.
language/canine/bert_modeling.py:388
↓ 1 callersMethodlegal_actions_for_stack
(self, stack: Sequence[nltk.Nonterminal])
language/search_agents/muzero/state_tree.py:519
↓ 1 callersMethodlexical_rules
Instantiate the lexical rules using new LexicalRule class.
language/gscan/data/grammar.py:368
↓ 1 callersMethodlink_documents
Load n documents and link them to facts.
language/labs/drkit/wikidata/preprocessing/distantly_supervise.py:323
↓ 1 callersFunctionload_answers
Load gold answers from file. Wordpieces are converted back (approximately) into PTB-style tokens. Args: question_ids: Question ids to load.
language/capwap/utils/metric_utils.py:75
↓ 1 callersFunctionload_boolq_file
Build a tf.data.Data from a file of boolq examples.
language/boolq/run_recurrent_model_boolq.py:92
↓ 1 callersFunctionload_captions
Loads image ids and processes the captions. Args: captions_file: JSON file containing caption annotations. vocab: A text_utils.Vocab instan
language/capwap/preprocessing/coco_synthetic_qa.py:86
↓ 1 callersFunctionload_captions
Loads image ids and processes the captions. Args: captions_file: JSON file containing caption annotations. vocab: A text_utils.Vocab instan
language/capwap/preprocessing/coco_ood_captions.py:62
↓ 1 callersMethodload_corpus
Load self.corpus.
language/labs/drkit/wikidata/preprocessing/distantly_supervise.py:87
↓ 1 callersFunctionload_data
Loads the tf.data.Dataset to run on.
language/boolq/run_recurrent_model_boolq.py:157
↓ 1 callersFunctionload_database
Load variable from checkpoint.
language/labs/drkit/search_utils.py:246
↓ 1 callersFunctionload_dataset
Create TF dataset from one or more file patterns. Args: patterns: one or more file pattern strings from which to load data. decode_fn: deco
language/mentionmemory/utils/data_utils.py:163
↓ 1 callersFunctionload_dataset_file
(dataset_file)
language/bert_extraction/steal_bert_qa/utils/evaluate_squad_watermark.py:61
↓ 1 callersFunctionload_documents
Loads Documents from a GZIP-ed TFRecords file into a Python list.
language/realm/retrieval.py:174
↓ 1 callersFunctionload_entity_matrices
Load entity co-occurrence and co-reference matrices.
language/labs/drkit/hotpotqa/preprocessing/link_questions.py:133
↓ 1 callersFunctionload_eval_dataset
(shard_paths)
language/realm/example_generator.py:325
↓ 1 callersFunctionload_example_from_jsonl
Load Decontext input jsonl file into DecontextExample.
language/decontext/decontext_util.py:43
↓ 1 callersFunctionload_examples
Load SCAN examples from original data file.
language/compgen/nqg/tasks/scan/convert_to_tsv.py:31
↓ 1 callersFunctionload_featurizer
Loads a featurizer from hyperparams specified in model_dir.
language/realm/refresh_doc_embeds.py:69
↓ 1 callersMethodload_from_file
(cls, filename_prefix)
language/serene/preprocessing.py:646
↓ 1 callersFunctionload_json
(filepath)
language/compgen/nqg/model/parser/inference/targets/generate_spider_grammars.py:89
↓ 1 callersFunctionload_json
(filepath)
language/compgen/nqg/tasks/spider/print_database_counts.py:32
↓ 1 callersFunctionload_json
(filepath)
language/compgen/nqg/tasks/spider/append_schema.py:36
↓ 1 callersFunctionload_json
(filepath)
language/compgen/nqg/tasks/spider/write_dataset.py:45
↓ 1 callersFunctionload_json_data
(input_path)
language/realm/generate_retrieval_corpus.py:105
↓ 1 callersFunctionload_kb
Load KB into dictionary. Args: kb_filename: kb filename Returns: A dictionary {subject: {rel: objects}}
language/labs/drkit/metaqa/preprocessing/metaqa_preprocess.py:45
↓ 1 callersFunctionload_kb
Load KB into dictionary. Args: kb_filename: kb filename Returns: A dictionary {subject: {rel: objects}}
language/emql/preprocess/metaqa_preprocess.py:45
↓ 1 callersMethodload_kb
Load sling KB.
language/labs/drkit/wikidata/preprocessing/distantly_supervise.py:49
↓ 1 callersMethodload_kb
r"""Load KB from file. We store KB as a dictionary of dictionaries, where keys are subjects and values are dictionaries of facts. Each dictio
language/emql/data_loader.py:118
↓ 1 callersFunctionload_latest_retriever
Returns the latest Retriever and a model timestamp.
language/realm/example_generator.py:391
↓ 1 callersMethodload_memory
Load all necessary memory arrays.
language/mentionmemory/encoders/mention_memory_encoder.py:73
↓ 1 callersMethodload_memory
Load mention memory.
language/mentionmemory/encoders/mention_memory_encoder.py:509
↓ 1 callersFunctionload_nli_file
Build a tf.data.Data from a file of NLI examples.
language/boolq/run_recurrent_model_boolq.py:146
↓ 1 callersFunctionload_np_embeddings
Load numpy embeddings into the format expected by save_as_tsv. Files are read in the format used by np.save/load Args: urls_path: Path to nu
language/serene/export_embeddings.py:70
↓ 1 callersFunctionload_pickle_from_file
(path: str)
language/search_agents/muzero/utils.py:229
↓ 1 callersFunctionload_preds_file
(prediction_file)
language/bert_extraction/steal_bert_qa/utils/evaluate_squad_watermark.py:67
↓ 1 callersFunctionload_questions
Load and process VQA questions. Args: questions_file: JSON file containing VQA questions. annotations_file: JSON file containing VQA answer
language/capwap/preprocessing/vqa_qa.py:61
↓ 1 callersFunctionload_questions
Load and process V7W questions. Args: questions_file: JSON file containing V7W questions. vocab: A text_utils.Vocab instance. Returns:
language/capwap/preprocessing/v7w_qa.py:61
↓ 1 callersFunctionload_questions
Load and process VIZWIZ questions. Args: questions_file: JSON file containing VIZWIZ questions. vocab: A text_utils.Vocab instance. Retu
language/capwap/preprocessing/vizwiz_qa.py:57
↓ 1 callersFunctionload_references
Load COCO references from file. References are tokenized in the PTB-style. Args: image_ids: Image ids to load references for. coco_annot
language/capwap/utils/metric_utils.py:105
↓ 1 callersFunctionload_retriever
Constructs a Retriever based on the specified embedder.
language/realm/example_generator.py:376
↓ 1 callersMethodload_schema
Load relation type declarations from a file. Each line in the file tab-separated with fields relation_name domain_type range_type Arg
language/nql/nql/__init__.py:1351
↓ 1 callersFunctionload_sling_mappings
Loads entity names, number of facts and wiki page titles from SLING. Args: sling_kb_file: kb.sling file generated from SLING wikidata processor
language/templama/templama.py:140
↓ 1 callersFunctionload_spans
Load spans from file. Wordpieces are converted back (approximately) into PTB-style tokens. Args: filename: Path to predicted spans file.
language/capwap/utils/metric_utils.py:133
↓ 1 callersFunctionload_splits
Reads a JSON file containing split IDs. Returns: A dictionary where keys are a split name (e.g. `train` or `test`) and values are a list of
language/compgen/nqg/tasks/split_dataset.py:36
↓ 1 callersFunctionload_synthetic_captions
Loads weakly supervised examples. Args: generation_file: Path to output of conditional generation (text planner). vocab: Instance of text_u
language/capwap/preprocessing/weakly_supervised.py:60
↓ 1 callersFunctionload_synthetic_questions
Loads synthetic question generation data from disk. Args: pattern: Glob file pattern for question generation output files. Returns: imag
language/capwap/preprocessing/coco_text_planner.py:51
↓ 1 callersFunctionload_train_dataset
(shard_paths, num_shards_to_sample)
language/realm/example_generator.py:317
↓ 1 callersFunctionload_wikisql_tables
Loads the WikiSQL tables from a path and reformats as the format.
language/xsp/data_preprocessing/wikisql_preprocessing.py:124
↓ 1 callersFunctionload_xml_tree
(corpus)
language/compgen/nqg/tasks/geoquery/xml_file_utils.py:36
↓ 1 callersFunctionlocal_attention_layer
A fork of BERT's `attention_layer` that performs local attention. This attention is local in that attention happens only within each block (as de
language/canine/local_attention.py:49
↓ 1 callersFunctionlower
(text)
language/labs/drkit/evaluate.py:334
↓ 1 callersFunctionlower
(text)
language/orqa/utils/eval_utils.py:39
↓ 1 callersFunctionlower
(text)
language/bert_extraction/steal_bert_qa/utils/evaluate_squad_2.py:61
↓ 1 callersFunctionlower
(text)
language/bert_extraction/steal_bert_qa/utils/evaluate_squad.py:53
↓ 1 callersFunctionlower
(text)
language/bert_extraction/steal_bert_qa/data_generation/preprocess_util.py:213
↓ 1 callersFunctionlower
(text)
language/search_agents/muzero/utils.py:46
↓ 1 callersFunctionlower
(text)
language/asqa/scoring.py:44
↓ 1 callersFunctionlower
(text)
language/capwap/utils/metric_utils.py:188
↓ 1 callersFunctionmain
()
language/nql/demos/metaqa/preprocess_data.py:20
↓ 1 callersFunctionmain
()
language/nql/demos/nell995/preprocess_data.py:29
↓ 1 callersFunctionmain
(db_to_del)
language/xsp/data_utils/empty_database.py:45
↓ 1 callersFunctionmain
(db_name)
language/xsp/data_utils/add_indices.py:24
↓ 1 callersFunctionmain
(dataset_name, cache_path, errors_filepath, splits)
language/xsp/data_utils/create_cache.py:26
↓ 1 callersFunctionmain
(predictions_filepath, output_filepath, cache_filepath, verbose, update_cache)
language/xsp/evaluation/official_evaluation.py:518
↓ 1 callersFunctionmake_attention_mask
Returns an attention mask for question generation. Args: batch_size: number of windows per batch. query_length: length of question includin
language/capwap/synthetic/generate_questions.py:162
↓ 1 callersFunctionmake_bert_state_impl
Computes the BERT state.
language/search_agents/muzero/bert_state_lib.py:220
↓ 1 callersFunctionmake_bytes_feature
(v)
language/question_answering/b2t2/compute_vcr_features.py:95
↓ 1 callersFunctionmake_decode_fn
Make function to decode TF examples. Args: name_to_features: features to decode from a record in binary format. samples_per_example: how ma
language/mentionmemory/utils/data_utils.py:62
↓ 1 callersFunctionmake_estimator_from_flags
Builds TPUEstimator from args, FLAGS, and the model_fn_builder method.
language/capwap/synthetic/generate_answers.py:436
↓ 1 callersFunctionmake_grid_context
Create a KG encoding a 2-d grid with four+ relations.
language/nql/demos/gridworld_scaling/scaling_eval.py:190
↓ 1 callersFunctionmake_nq_answer
Makes an Answer object following NQ conventions. Args: contexts: string containing the context answer: dictionary with `span_start` and `in
language/question_answering/bert_joint/run_nq.py:444
↓ 1 callersFunctionmake_qid_to_has_ans
(dataset)
language/bert_extraction/steal_bert_qa/utils/evaluate_squad_2.py:38
↓ 1 callersMethodmake_scored_ngram
(self, max_length: int, seed: Optional[int] = None)
language/wino_dict/create_new_words.py:148
↓ 1 callersFunctionmake_sentencepiece_tokenizer
Splits on punctuation and whitespace, then does Sentencepiece tokenization.
language/decontext/eval.py:72
↓ 1 callersFunctionmake_splits
r"""Make train, validation, and test splits. The following rules are used: train = (karpathy_train U v7w_train) \ (karpathy_val U karpathy_test
language/capwap/preprocessing/v7w_qa.py:95
↓ 1 callersFunctionmake_tydi_answer
Makes an Answer object following TyDi conventions. Args: contexts: String containing the context. answer: Dictionary with `span_start` and
language/canine/tydiqa/data.py:218
↓ 1 callersMethodmake_word
(self, max_length: int, seed: Optional[int] = None)
language/wino_dict/create_new_words.py:144
↓ 1 callersMethodmap_constraint_logits
Map constraint logits to original if ids match. constraint_logits is logits for constraint_ids. If an id in constrain_ids also appear in orig
language/emql/model.py:837
↓ 1 callersFunctionmap_type
(tf_type)
language/gscan/xattn_model/train_utils.py:44
↓ 1 callersMethodmarked_tokenize
Return text tokenized with indicators if each token is reserved. Args: text: Text to tokenize Returns: List of text tokens and l
language/serene/tokenizers.py:93
↓ 1 callersFunctionmarkup_evidence
Make entities bold and highlight evidence sentences.
language/labs/drkit/hotpotqa/demo.py:968
↓ 1 callersFunctionmask_attention
Masks an attention matrix. Args: attention: <tf.float32>[batch, seq_len1, seq_len2] seq_len1: <tf.int32>[batch] seq_len2: <tf.int32>[ba
language/boolq/run_recurrent_model_boolq.py:267
↓ 1 callersFunctionmask_duplicate_ids
Zero out duplicate items within the same batch position. The function is a variation of a `unique` function applied to ids array batch_position-w
language/mentionmemory/utils/mention_utils.py:94
↓ 1 callersFunctionmask_joint_logits
Masks logits based on input mask and valid start/end combinations.
language/capwap/synthetic/generate_answers.py:289
↓ 1 callersFunctionmatch_and_save
Loads an original dataset and matches with a predictions file.
language/xsp/model/run_inference.py:369
↓ 1 callersFunctionmatch_sents
Finds best matching between two lists of sentences.
language/fruit/rendering_utils.py:357
↓ 1 callersFunctionmatmul_any_tensor_dense_tensor
Like tf.matmul except that first argument might be a SparseTensor. Args: a: SparseTensor or Tensor b: Tensor a_is_sparse: true if a is
language/nql/nql/__init__.py:1728
← previousnext →2,301–2,400 of 6,154, ranked by callers