MCPcopy Create free account

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

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

↓ 3 callersFunction_split_heads
Split dimension 3 into multiple heads. Attempts to preserve static shape information. Args: x: a Tensor with shape [batch, length, emb_size]
language/xsp/model/common_layers.py:159
↓ 3 callersFunction_split_punc
Split leading or trailing punctuation.
language/compgen/nqg/tasks/spider/nqg_tokenization.py:27
↓ 3 callersFunction_term_to_str
(term: Term, operator: str)
language/search_agents/t5/t5_agent_lib.py:57
↓ 3 callersMethod_test_words
(self, words, expected_char_ids, word_length)
language/common/inputs/char_utils_test.py:66
↓ 3 callersFunction_transpose
Transpose list of lists.
language/compgen/csl/model/data/example_converter.py:57
↓ 3 callersFunction_truncate_seq
Truncates a sequence in place to the maximum length.
language/multivec/preprocessing/create_training_data.py:377
↓ 3 callersMethodadd_history_entry
(self, history_entry: HistoryEntry)
language/search_agents/muzero/types.py:210
↓ 3 callersFunctionadd_int64_feature
(key, values, example)
language/orqa/preprocessing/wiki_preprocessor.py:35
↓ 3 callersMethodapply_actions_to_stack
Expand `stack` with the rules corresponding to `actions`. Args: stack: A sequence of `nltk.Nonterminal`s representing the current stack.
language/search_agents/muzero/state_tree.py:497
↓ 3 callersMethodapply_production
(self, production: nltk.Production)
language/search_agents/muzero/state_tree.py:294
↓ 3 callersFunctionarray_to_sentence
(array, vocab)
language/gscan/xattn_model/predict.py:68
↓ 3 callersMethodas_dicts
Return dicts mapping entity-names to weights for each row of a matrix. Args: matrix: numpy ndarray of shape (num_entity_sets, entity_index)
language/nql/nql/__init__.py:772
↓ 3 callersMethodassertArrayAlmostEqual
(self, actual: np.ndarray, expected: np.ndarray,
language/mentionmemory/utils/test_utils.py:33
↓ 3 callersMethodassertCreateEntryFromJsonResult
( self, json_dict, result, expected_context: Text, expected_answer_type: Text,
language/canine/tydiqa/preproc_test.py:219
↓ 3 callersFunctionbatch_gather
Gather a batch of indices from a batch of params.
language/labs/drkit/model_fns.py:145
↓ 3 callersFunctionbert_format
Combines multiple sequences of tokens into a single sequence for BERT. The format is: [CLS] first seq [SEP] second seq [SEP] third_seq [SEP] ...
language/realm/featurization.py:555
↓ 3 callersMethodbuild_model_fn
Return a function suitable for use in creating an Estimator. Will call self.build_model Returns: a Python function
language/nql/nql/util.py:175
↓ 3 callersFunctionbyte_len
(text)
language/canine/tydiqa/data.py:119
↓ 3 callersMethodcheck_output
(self, result)
language/canine/modeling_test.py:108
↓ 3 callersFunctioncheck_topk_fact_eligible
Extract probs from sketch. Args: topk_subj_ids: batch_size, topk query_entity_sketch: batch_size, depth, width all_entity_sketches: num
language/emql/module.py:140
↓ 3 callersFunctionclean
Postprocessing.
language/capwap/synthetic/filter_round_trip.py:62
↓ 3 callersMethodclean_escape_characters
(word)
language/search_agents/muzero/state_tree.py:374
↓ 3 callersMethodclose
(self)
language/labs/drkit/hotpotqa/preprocessing/create_tfrecords.py:235
↓ 3 callersMethodclose
(self)
language/bert_extraction/steal_bert_qa/models/run_squad_membership.py:716
↓ 3 callersFunctioncollapse_dims
Collapses the specified axis of a RaggedTensor. Suppose we have a RaggedTensor like this: [[1, 2, 3], [4, 5], [6]] If we flatten the 0th
language/conpono/reconstruct/preprocess.py:34
↓ 3 callersMethodcombine_and_expand
Expands each element of `fragments` and returns encoder input lists.
language/search_agents/muzero/utils.py:360
↓ 3 callersMethodcompute_image_transformer
Build the image transformer.
language/capwap/utils/transformer_utils.py:221
↓ 3 callersFunctioncompute_loss
(logits, positions, slen)
language/labs/drkit/hotpotqa/answer_extractor.py:711
↓ 3 callersFunctioncompute_loss_sparse
Cross-entropy loss when only 1 label per example.
language/labs/drkit/model_fns.py:555
↓ 3 callersMethodconvert
Convert QCFGRule to JointRule.
language/compgen/csl/augment/joint_sampler.py:206
↓ 3 callersMethodconvert
Return tf.Example or Raise.
language/compgen/nqg/model/parser/data/example_converter.py:192
↓ 3 callersFunctionconvert_examples_to_features
Loads a data file into a list of `InputBatch`s.
language/bert_extraction/steal_bert_qa/models/run_squad_membership.py:301
↓ 3 callersMethodconvert_fbid
(self, fbid)
language/emql/data_loader.py:1234
↓ 3 callersFunctioncreate_augmented_examples
Creates AugmentedExamples from the raw JSONLs. Args: orig_examples: An Iterable of deserialzied JSONs. converter: A subclass of BaseExample
language/casper/augment/cached_retrieval_to_dataset_lib.py:88
↓ 3 callersFunctioncreate_cpc_input_from_text
Parse text into BERT input.
language/conpono/evals/coherence_eval.py:261
↓ 3 callersFunctioncreate_int_feature
(values)
language/relation_learning/models/bert_fewshot_classifier.py:130
↓ 3 callersMethoddeclare_relation
Declare the domain and range types for a relation. Args: rel_name: string naming a relation domain_type: string naming the type of su
language/nql/nql/dist.py:160
↓ 3 callersMethoddecode
(self, targets, encoded, targets_mask, inputs_mask)
language/gscan/xattn_model/model/models.py:288
↓ 3 callersFunctiondense_layer_3d
A dense layer with 3D kernel. Args: input_tensor: float Tensor of shape [batch, seq_length, hidden_size]. num_attention_heads: Number of at
language/canine/bert_modeling.py:581
↓ 3 callersMethodembed_batch
Embeds a batch of examples. Args: examples: A batch of N examples. Returns: numpy array of shape (N, D) where D is the embedding
language/casper/retrieve/query_retrievers.py:288
↓ 3 callersMethodemit
Make an InputExample from the query+caniddates.
language/multivec/preprocessing/create_training_data.py:774
↓ 3 callersFunctionevaluate
Run evaluation.
language/multivec/models/ranking_model_experiment_inbatch.py:843
↓ 3 callersFunctionevaluate_stopping
Evaluate whether flipping needs to stop or not.
language/bert_extraction/steal_bert_classifier/embedding_perturbations/discrete_invert_embeddings.py:77
↓ 3 callersMethodexport
Actually performs the export of registered Modules.
language/common/utils/exporters.py:177
↓ 3 callersFunctionexpt
Run an experiment.
language/nql/demos/gridworld_scaling/scaling_eval.py:298
↓ 3 callersFunctionfile_based_convert_examples_to_features
Convert a set of `InputExample`s to a TFRecord file.
language/bert_extraction/steal_bert_classifier/models/run_classifier_membership.py:426
↓ 3 callersFunctionfile_based_convert_examples_to_features
Convert a set of `InputExample`s to a TFRecord file.
language/bert_extraction/steal_bert_classifier/models/run_classifier_distillation.py:415
↓ 3 callersFunctionfile_based_convert_examples_to_features
Convert a set of `InputExample`s to a TFRecord file.
language/bert_extraction/steal_bert_classifier/models/run_classifier.py:673
↓ 3 callersFunctionfile_based_convert_examples_to_features
Convert a set of `InputExample`s to a TFRecord file.
language/bert_extraction/steal_bert_qa/models/run_bert_boolq_distill.py:316
↓ 3 callersFunctionfile_based_convert_examples_to_features
Convert a set of `InputExample`s to a TFRecord file.
language/bert_extraction/steal_bert_qa/models/run_bert_boolq.py:304
↓ 3 callersFunctionfile_based_convert_examples_to_features
Convert a set of `InputExample`s to a TFRecord file.
language/conpono/evals/run_classifier.py:580
↓ 3 callersFunctionfile_based_convert_examples_to_features
Convert a set of `InputExample`s to a TFRecord file.
language/conpono/evals/run_concat_classifier.py:585
↓ 3 callersFunctionfile_based_input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
language/bert_extraction/steal_bert_classifier/models/run_classifier_membership.py:457
↓ 3 callersFunctionfile_based_input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
language/bert_extraction/steal_bert_classifier/models/run_classifier_distillation.py:452
↓ 3 callersFunctionfile_based_input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
language/bert_extraction/steal_bert_classifier/models/run_classifier.py:704
↓ 3 callersFunctionfile_based_input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
language/bert_extraction/steal_bert_qa/models/run_bert_boolq_distill.py:348
↓ 3 callersFunctionfile_based_input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
language/bert_extraction/steal_bert_qa/models/run_bert_boolq.py:331
↓ 3 callersFunctionfile_based_input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
language/conpono/evals/run_classifier.py:611
↓ 3 callersFunctionfile_based_input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
language/conpono/evals/run_concat_classifier.py:616
↓ 3 callersFunctionfile_based_input_fn_builder_files
(input_files, seq_length, seq_length_query, num_candidates, is_training,
language/multivec/models/ranking_model_experiment_inbatch.py:181
↓ 3 callersFunctionfind_and_add_copy_from_text
Finds a substring in the utterance and adds a copying action.
language/xsp/data_preprocessing/sql_parsing.py:420
↓ 3 callersFunctionfind_and_add_copy_from_text
Finds a substring in the utterance and adds a copying action.
language/xsp/data_preprocessing/abstract_sql_converters.py:84
↓ 3 callersFunctionfn
Builds the output tensor dictionary.
language/boolq/run_recurrent_model_boolq.py:178
↓ 3 callersFunctionfollow
Sparse implementation of the relation follow operation. Args: batch_entities: [batch_size, num_entities] SparseTensor of incoming entities
language/labs/drkit/model_fns.py:392
↓ 3 callersFunctionforest_score_function
Iterate over nodes in forest and return score for root. Note that the returned score is not exponentiated, i.e. it is equivalent to the log o
language/compgen/nqg/model/parser/training/forest_utils.py:31
↓ 3 callersMethodgenerate_data
Generate data pairs given situations and assign them to corresponding splits.
language/gscan/data/dataset.py:623
↓ 3 callersFunctionget_2d_index
(positions: tf.Tensor)
language/mentionmemory/utils/mention_preprocess_utils.py:658
↓ 3 callersMethodget_all_encoder_layers
(self)
language/canine/bert_modeling.py:254
↓ 3 callersFunctionget_assignment_map_from_checkpoint
Compute the union of the current variables and checkpoint variables.
language/labs/drkit/run_dualencoder_qa.py:516
↓ 3 callersMethodget_decode_func
Return a closure for decoding.
language/labs/consistent_zero_shot_nmt/models/agreement.py:315
↓ 3 callersMethodget_doc_embeddings
Run BERT to get features for docs. Args: docs: List of list of tokens. Returns: embeddings: Numpy array of token features.
language/labs/drkit/bert_utils.py:265
↓ 3 callersMethodget_encode_func
Return a closure for encoding.
language/labs/consistent_zero_shot_nmt/models/agreement.py:302
↓ 3 callersFunctionget_feature
(sample, feature_name, idx=0)
language/mentionmemory/data/prepare_webred.py:283
↓ 3 callersMethodget_frame_id
Returns the WikiData identifier for a property or entity.
language/labs/drkit/wikidata/preprocessing/distantly_supervise.py:126
↓ 3 callersMethodget_id
Retrieve the index of entity with given name and type. Args: entity_name: string name of the entity type_name: string name of declare
language/nql/nql/__init__.py:1625
↓ 3 callersMethodget_instances
(self, type_name)
language/nql/nql/nql_test.py:71
↓ 3 callersFunctionget_loss_per_group
Computes loss per sample within a group of labels.
language/mentionmemory/tasks/ultra_fine_entity_typing_task.py:46
↓ 3 callersMethodget_nearby_positions
Return a list of available positions that are next to the given position.
language/gscan/data/world.py:44
↓ 3 callersFunctionget_new_positions
(old_positions)
language/mentionmemory/utils/mention_preprocess_utils.py:572
↓ 3 callersFunctionget_nl_sql_pairs
Gets pairs of natural language and corresponding gold SQL for Michigan.
language/xsp/data_preprocessing/michigan_preprocessing.py:30
↓ 3 callersMethodget_output
Returns (one-best target string, score) or (None, None).
language/compgen/nqg/model/parser/inference/inference_wrapper.py:86
↓ 3 callersMethodget_params
Returns a variable with the embeddings and a scaffold to initialize them. Args: trainable: Boolean indicating whether the params should be
language/common/inputs/embedding_utils.py:164
↓ 3 callersMethodget_relative_position
Return a position that has relative position to given position.
language/gscan/data/world.py:87
↓ 3 callersMethodget_sampler
Returns the exemplar sampler based on the config.
language/casper/augment/casper_converters.py:77
↓ 3 callersFunctionget_tag_id
Given the tag string, returns its index in the vocabulary.
language/labs/consistent_zero_shot_nmt/data_generators/translate_multilingual.py:40
↓ 3 callersMethodget_test_examples
Gets a collection of `InputExample`s for prediction.
language/bert_extraction/steal_bert_classifier/models/run_classifier.py:196
↓ 3 callersFunctionget_text
Retrieves text from article pairs w/ logic for new articles.
language/fruit/beam_pipelines.py:198
↓ 3 callersFunctionget_text_module_input_name
Get the tag used for inputs to the text module. Returns: a string, probably "default"
language/nql/demos/metaqa/metaqa.py:257
↓ 3 callersMethodget_tf_model
Select model. Args: name: model name features: features candidate_subj_ids -- batch_size, num_candidate params: hyper-p
language/emql/model.py:138
↓ 3 callersMethodget_underlying_parameter
The Tensorflow parameter that will be learned for a trainable relation. Args: rel_name: a string naming a declared relation. Returns:
language/nql/nql/__init__.py:1220
↓ 3 callersMethodget_vocab
Returns a list of all the words in the vocabulary of this object. Words are in the same order as their embeddings in the `embedding_weights`
language/common/inputs/embedding_utils.py:230
↓ 3 callersFunctionget_weight_per_group
Computes which samples have at least one labels within a group.
language/mentionmemory/tasks/ultra_fine_entity_typing_task.py:38
↓ 3 callersFunctionget_weighted_sum
(values)
language/mentionmemory/utils/metric_utils.py:116
↓ 3 callersMethodget_window_around_substr
Produces a span of limited length from `text` centered around `substr`. Args: text: The document context containing the substr. subst
language/search_agents/muzero/types.py:122
↓ 3 callersMethodget_wordpiece_encodings
Returns contextualized encodings for a batch of wordpieces. Args: wordpiece_ids_batch: <int>[batch_size, max_num_wordpieces] num_word
language/compgen/nqg/model/parser/nqg_model.py:188
↓ 3 callersFunctionget_wordpieces
Sets the wordpieces for a NLToSQLExample.
language/xsp/data_preprocessing/language_utils.py:56
↓ 3 callersMethodgold_query_string
Generates a query string from the decoder actions for an example.
language/xsp/data_preprocessing/nl_to_sql_example.py:81
↓ 3 callersFunctionhamming_loss
Implements hamming loss. Args: preds: Tensor of predicted values. targets: Tensor of target values. sign (bool): Set to True if targets
language/labs/memory/model_utils.py:57
↓ 3 callersMethodhas_id
Test if symbol has been inserted into the table. Args: symbol: a string Returns: boolean indicating if the symbol appears in the
language/nql/nql/symbol.py:139
↓ 3 callersFunctionhas_terms
(terms)
language/search_agents/t5/t5_agent_lib.py:141
← previousnext →501–600 of 6,154, ranked by callers