MCPcopy Create free account

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

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

↓ 3 callersFunctionid2text
(seq, vocab, use_bpe=False)
language/labs/exemplar_decoding/utils/data.py:92
↓ 3 callersFunctionids_tensor
Creates a random int32 tensor of the shape within the vocab size.
language/canine/modeling_test.py:201
↓ 3 callersFunctioninit_from_checkpoint
Initializes all of the variables using `init_checkpoint.
language/labs/drkit/search_utils.py:207
↓ 3 callersMethodinput_fn
Create tf.dataset for estimator. Returns: tf dataset
language/emql/data_loader.py:655
↓ 3 callersFunctioninput_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
language/bert_extraction/steal_bert_qa/models/run_squad_membership.py:637
↓ 3 callersMethodis_nested_frame
Test if x is a CVT-node-like frame, for an indirect relation.
language/templama/sling2facts.py:351
↓ 3 callersFunctionlayer_norm
Run layer normalization on the last dimension of the tensor.
language/canine/bert_modeling.py:382
↓ 3 callersMethodload_array
Load sharded array as if it was loaded from multiple processes.
language/mentionmemory/encoders/mention_memory_encoder.py:59
↓ 3 callersFunctionload_batched_dataset
Loads a dataset that has been batched and preprocessed.
language/boolq/run_recurrent_model_boolq.py:404
↓ 3 callersFunctionload_dataset_file
(dataset_file)
language/bert_extraction/steal_bert_qa/utils/evaluate_squad.py:169
↓ 3 callersMethodload_from_file
(cls, filename_prefix)
language/serene/tokenizers.py:33
↓ 3 callersFunctionload_preds_file
(prediction_file)
language/bert_extraction/steal_bert_qa/utils/evaluate_squad.py:175
↓ 3 callersFunctionlog_variables
(name, var_names)
language/labs/drkit/search_utils.py:202
↓ 3 callersFunctionlog_variables
(name, var_names)
language/capwap/utils/checkpoint_utils.py:25
↓ 3 callersFunctionmake_dset_fn
Return a data_fn usable for an estimator. Args: context: a NeuralQueryContext filename: name of a file in FLAGS.rootdir shuffle: if Tru
language/nql/demos/metaqa/metaqa.py:195
↓ 3 callersFunctionmake_dset_fn
Return a data_fn usable for an estimator. Args: context: a NeuralQueryContext filename: name of a file in FLAGS.rootdir shuffle: if Tru
language/nql/demos/nell995/nell995.py:216
↓ 3 callersFunctionmake_eval_dict
Final formatting for the output.
language/bert_extraction/steal_bert_qa/utils/evaluate_squad_2.py:129
↓ 3 callersFunctionmake_feature_label_ph_pair
Return a dict of feature placeholders paired with label placeholder. Args: context: a NeuralQueryContext Returns: a pair feature_ph_dict
language/nql/demos/metaqa/metaqa.py:239
↓ 3 callersFunctionmake_feature_label_ph_pair
Return a dict of feature placeholders paired with label placeholder. Args: context: a NeuralQueryContext Returns: a pair feature_ph_dict
language/nql/demos/nell995/nell995.py:247
↓ 3 callersFunctionmake_hash_fn
()
language/orqa/preprocessing/create_data_splits.py:104
↓ 3 callersFunctionmake_tokenizer
()
language/canine/tydiqa/preproc_test.py:34
↓ 3 callersMethodmask_query
Applies masking to a query. Args: query: a Query object. Returns: A dict with the attributes described below. Raises:
language/realm/featurization.py:95
↓ 3 callersFunctionmaybe_decode
Decodes bytes to strings if neccessary.
language/fruit/tf_utils.py:38
↓ 3 callersFunctionmaybe_encode
Encodes strings to bytes if neccessary.
language/fruit/tf_utils.py:43
↓ 3 callersMethodmaybe_get_child
(self, symbol)
language/compgen/csl/cky/cfg_parser.py:54
↓ 3 callersFunctionmetric_max_over_ground_truths
Take the average best score against all ground truth answers. This is a bit different than SQuAD in that there are multiple answers **and** predi
language/capwap/utils/metric_utils.py:220
↓ 3 callersMethodmodel_follow
Compute logits for follow operation. A follow operation is considered as the intersection of a set of facts with correct subjects and a set o
language/emql/model.py:254
↓ 3 callersMethodmodel_intersection
Compute logits for intersection. A representation of intersection is the sum of representations of sets that are being intersected. Args
language/emql/model.py:209
↓ 3 callersMethodmodel_membership
Compute logits for set membership. A representation of set is the average of embeddings of entities in the set. Args: features:
language/emql/model.py:171
↓ 3 callersFunctionmulti_hop
Two hops of propagation from input to output entities.
language/labs/drkit/model_fns.py:807
↓ 3 callersFunctionnormalize_whitespace
(source)
language/compgen/nqg/tasks/spider/write_dataset.py:40
↓ 3 callersMethodpad_to_vocab_size
Force the maximum vocabulary size to be n. Args: n: a positive integer Raises: IndexError: When n is smaller than the existing v
language/nql/nql/symbol.py:80
↓ 3 callersFunctionpopulate_fn
(span_begin, span_end, parser_rule, children)
language/compgen/nqg/model/qcfg/qcfg_parser.py:86
↓ 3 callersFunctionpopulate_utterance
Sets the model input for a NLToSQLExample.
language/xsp/data_preprocessing/nl_to_sql_example.py:98
↓ 3 callersMethodpostprocess_fn
Function that prepares model's input and output for serialization.
language/mentionmemory/tasks/base_task.py:203
↓ 3 callersMethodpredict
Runs a prediction on a set of features. Calling multiple times does *not* regenerate the graph which makes predict much faster. Args:
language/labs/drkit/hotpotqa/demo.py:319
↓ 3 callersFunctionpreprocess_sql
Preprocesses a SQL query into a clean string form.
language/xsp/data_preprocessing/sql_utils.py:77
↓ 3 callersFunctionprocess_eval2
Determine the result of each pairwise comparison in Evaluation 2 ("tie" vs "left" vs "right"). If comparison is not made or made incorrecntly (mo
language/asqa/human_annotation/analysis.py:26
↓ 3 callersMethodprocess_text
(self, text)
language/conpono/evals/race_utils.py:92
↓ 3 callersFunctionread_data
Read Wiki-A eval dataset. Args: data_file: data file to read from long_para_max: max size required to capture entire paragraph Returns:
language/conpono/evals/coherence_eval.py:70
↓ 3 callersFunctionread_schema
Loads a database schema from a CSV representation.
language/xsp/data_preprocessing/michigan_preprocessing.py:92
↓ 3 callersFunctionread_squad_examples
Read a SQuAD json file into a list of SquadExample.
language/labs/drkit/run_dualencoder_lsf.py:509
↓ 3 callersFunctionread_squad_examples
Read a SQuAD json file into a list of SquadExample.
language/bert_extraction/steal_bert_qa/models/run_squad_membership.py:223
↓ 3 callersFunctionremove_special_tokens
(tokens, eos_idx)
language/gscan/xattn_model/predict.py:59
↓ 3 callersMethodrestore_state
Restore from a induction state and set current partition and step.
language/compgen/csl/induction/induction_utils.py:61
↓ 3 callersMethodresults
(self, max_to_yield=float('inf'))
language/realm/parallel.py:147
↓ 3 callersMethodretrieve_all
Batches the examples, retrieves the neighbors, and yields the results.
language/casper/retrieve/query_retrievers.py:217
↓ 3 callersMethodrun_tester
(self, tester, check_reachable=True)
language/canine/modeling_test.py:159
↓ 3 callersFunctionsafe_open
Open the path safely. If in write model, make intermediate directories. Args: path: path to open mode: mode to use Returns: file han
language/serene/util.py:67
↓ 3 callersFunctionsafe_zip
Like builtin `zip`, but checks that iterables have same length.
language/conpono/reconstruct/preprocess.py:197
↓ 3 callersFunctionsanitize
(s)
language/canine/tydiqa/debug.py:64
↓ 3 callersMethodsave
(self, path)
language/gscan/xattn_model/dataset/preprocess.py:155
↓ 3 callersMethodsave_sharded_array
(self, array: Array, name: str)
language/mentionmemory/tasks/mention_based_entity_qa_task_test.py:166
↓ 3 callersMethodsave_sharded_array
(self, array: Array, name: str)
language/mentionmemory/tasks/mention_memory_task_test.py:113
↓ 3 callersMethodsave_to_file
(self, filename_prefix)
language/serene/tokenizers.py:29
↓ 3 callersFunctionsave_tsv_table
Save dict of expt() outputs in a TSV file.
language/nql/demos/gridworld_scaling/scaling_eval.py:430
↓ 3 callersMethodserialize_fact
Create JSON object with distantly supervised fact.
language/labs/drkit/wikidata/preprocessing/distantly_supervise.py:262
↓ 3 callersMethodshard_files
Return file paths that correspond to the given shard. Args: shard: Shard to make paths for tmp: Whether to return tmp version or not
language/serene/wiki_index.py:106
↓ 3 callersFunctionsparse_to_dense_1d
Convert sparse tensor ([0, 1, 4]) to dense tensor ([1, 1, 0, 0, 1]).
language/mentionmemory/utils/mention_preprocess_utils.py:29
↓ 3 callersMethodsubmit
(self, x)
language/realm/parallel.py:134
↓ 3 callersMethodto_dict
Translates class into dictionary, excluding unspecified values.
language/diffqg/metrics.py:48
↓ 3 callersMethodto_lossy
Transforms examples to their lossy (and maybe also reversible) IR. Args: is_rir: if True, the input is a reversible IR, in comparison to a
language/compir/dataset_parsers/dataset_parser.py:96
↓ 3 callersMethodto_predicate
(self, predicate)
language/gscan/data/grammar.py:123
↓ 3 callersMethodto_reversible
Transforms all examples to their reversible intermediate representation.
language/compir/dataset_parsers/dataset_parser.py:84
↓ 3 callersMethodtokenize
Return list of tokens for input.
language/quest/common/vocab_utils.py:27
↓ 3 callersFunctiontokenizer
(text)
language/decontext/eval.py:77
↓ 3 callersMethodtransitively_close
Find transitive closure under given relation of the set of frames xs.
language/templama/sling2facts.py:291
↓ 3 callersMethodupdate_data_statistics
(self, data_example, split="train")
language/gscan/data/dataset.py:197
↓ 3 callersMethodvalid_object
Should a slot with this object be turned into a triple.
language/templama/sling2facts.py:391
↓ 3 callersFunctionwrite_examples
Writes examples to sharded TSV or TFRecord files.
language/casper/augment/cached_retrieval_to_dataset_lib.py:62
↓ 3 callersFunctionwrite_predictions
Write predictions to file.
language/totto/prepare_predictions_for_eval.py:30
↓ 3 callersFunctionwrite_references
Write single and multiple references to file.
language/totto/prepare_references_for_eval.py:97
↓ 2 callersMethod__init__
(self, span_begin, span_end, target_string, rule, children)
language/compgen/csl/model/data/parsing_utils.py:36
↓ 2 callersMethod__init__
(self, span_begin, span_end, target_string, rule, children)
language/compgen/nqg/model/parser/data/parsing_utils.py:26
↓ 2 callersMethod__init__
(self, vocab_model_file)
language/fruit/beam_pipelines.py:785
↓ 2 callersMethod__mul__
Component-wise multiply the underlying expressions. Args: other: A NeuralQueryExpression Returns: A NeuralQueryExpression.
language/nql/nql/__init__.py:436
↓ 2 callersMethod__str__
(self)
language/gscan/data/grammar.py:49
↓ 2 callersFunction_add_adjusted_col_offsets
Add adjusted column offsets to take into account multi-column cells.
language/totto/baseline_preprocessing/preprocess_utils.py:19
↓ 2 callersFunction_aggregate_counts
Return aggregated node count as int.
language/compgen/nqg/model/induction/codelength_utils.py:38
↓ 2 callersFunction_analyze
Analyzes the syntactic role of a word in a sentence.
language/wino_dict/utils.py:322
↓ 2 callersFunction_batched_range
Produces multiple tf.range stacked along the `axis` `batch_size` times.
language/mentionmemory/utils/mention_preprocess_utils.py:508
↓ 2 callersFunction_bilinear_score
Compute a bilinear score between the context and question embeddings. Args: context_emb: <float32> [batch_size, max_context_len, hidden_size]
language/question_answering/decatt_docreader/layers/document_reader.py:79
↓ 2 callersMethod_bracket_atomic_action
Wraps atomic actions (without "and"/"after") with parentheses. Args: utterance: the question. program: a program where "twice" occurs
language/compir/dataset_parsers/scan_parser.py:35
↓ 2 callersMethod_bracket_complex_action
Wraps complex actions (separated by "and"/"after") with parentheses.
language/compir/dataset_parsers/scan_parser.py:65
↓ 2 callersMethod_build_aux_sequences
Builds sequences in an auxiliary language.
language/labs/consistent_zero_shot_nmt/models/agreement.py:178
↓ 2 callersMethod_build_lm_inputs
Builds inputs and targets for LM training.
language/labs/consistent_zero_shot_nmt/models/agreement.py:424
↓ 2 callersMethod_build_rnn_cell
Builds RNN cell for decoding.
language/labs/consistent_zero_shot_nmt/modules/decoders.py:103
↓ 2 callersFunction_build_template
Replaces a span in the text with a marker.
language/wino_dict/utils.py:273
↓ 2 callersMethod_build_tokenizer
Build the correct tokenizer depending on model encoder. Returns: Tokenizer for model
language/serene/training.py:301
↓ 2 callersFunction_bytes_feature
(value: bytes)
language/casper/augment/cached_retrieval_to_dataset_lib.py:39
↓ 2 callersMethod_call_rpc
(self, stub_method, request)
language/search_agents/muzero/server.py:54
↓ 2 callersFunction_can_maybe_derive_from
Return True if rule can potentially be used to derive goal_rule.
language/compgen/nqg/model/induction/derivation_utils.py:87
↓ 2 callersMethod_cast_value
(self, target: Any, value: JsonAtomicValue)
language/canine/config_utils.py:195
↓ 2 callersFunction_cell_list
Create a list of RNN cells.
language/labs/consistent_zero_shot_nmt/utils/model_utils.py:84
↓ 2 callersMethod_check_2_2_neighbors
(self, y_vec)
language/nql/nql/nql_test.py:303
↓ 2 callersFunction_check_answers
(sp_vec, answers)
language/labs/drkit/hotpotqa/preprocessing/link_questions.py:173
↓ 2 callersFunction_check_preconditions
Check preconditions, returning any ops needed for dynamic checks.
language/canine/tensor_contracts.py:1097
↓ 2 callersFunction_combine_heads
Inverse of split_heads. Args: x: a Tensor with shape [batch, num_heads, length, emb_size / num_heads] Returns: a Tensor with shape [batc
language/xsp/model/common_layers.py:178
↓ 2 callersMethod_compile
Compile the keras model using the correct scope.
language/serene/training.py:370
↓ 2 callersFunction_compute_batch_indices
Computes the i'th coodinate that contains the batch index for gathers. Batch pos is a tensor like [[0,0,0,0,],[1,1,1,1],..]. It says which batch
language/xsp/model/beam_search.py:60
← previousnext →601–700 of 6,154, ranked by callers