MCPcopy Create free account

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

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

Functionfilter_articles
Filters articles.
language/fruit/beam_pipelines.py:48
Functionfilter_claim_fn
Filter out claims/evidence that have zero length.
language/serene/preprocessing.py:65
Functionfilter_evidence_fn
Filter out claims/evidence that have zero length. Args: example: The encoded example y_input: Unused, contains the label, included for API
language/serene/preprocessing.py:80
Functionfilter_for_generation_pipeline
Returns filter for generation beam pipeline.
language/fruit/beam_pipelines.py:697
Functionfilter_question
Apply filtering rules to QA pair.
language/capwap/utils/io_utils.py:156
Functionfilter_redirects
Filters redirects.
language/fruit/beam_pipelines.py:55
Functionfilter_rekey
Filter merged articles and rekey by entity id.
language/fruit/beam_pipelines.py:388
Functionfilter_sparse_rows
Filter rows of a CSR sparse matrix to retain upto max_cols.
language/labs/drkit/preprocessing/preprocess_utils.py:25
Functionfind_possible_splits
Implements `NEW` procedure described in paper appendix.
language/compgen/nqg/model/induction/split_utils.py:176
Functionflat_batch_beam_expand
Expands the each batch item by beam_size in batch_dimension.
language/gscan/xattn_model/model/decode.py:75
Functionflat_dict_to_tf_example
Convert a flat dictionary to a tf.Example. Args: inputs: A dictionary of flat numpy arrays. structure: A nested structure of placeholders t
language/common/utils/nest_utils.py:41
Methodflatten_bsz
(tensor)
language/mentionmemory/tasks/relation_classifier_task.py:207
Functionflatten_config
Flattens config and remove tuple/list values for logging in tboard.
language/gscan/xattn_model/train_utils.py:131
Functionflatten_list
(seq)
language/realm/featurization.py:614
Functionflatten_list
Unpack lists into a single list.
language/boolq/utils/py_utils.py:28
Functionfloat_feature
(value)
language/capwap/utils/io_utils.py:47
Functionfloat_feature_list
(values)
language/capwap/utils/io_utils.py:63
Functionfollow_op
Run follow() operation with EmQL representations. This module executes the follow() operations by retrieving facts against the subjects and relat
language/emql/module.py:294
Methodfollow_thru
(x, r)
language/nql/nql/nql_test.py:645
Methodfollow_thru_triple
(group_name, x, r)
language/nql/nql/nql_test.py:655
Functionfootprint
Union of dataset features for multi-tasking. Combining datasets is only possible if each has the same input features footprint, so here we define
language/capwap/datasets/__init__.py:36
Functionforce_multi_devices
Run with set number of CPU devices.
language/mentionmemory/utils/test_utils.py:42
Functionformat_serialized
Formats the serialized logical form to reduce the number of tokens. The intent and slot labels are lower-cased and broken into words. Example: "[
language/casper/utils/top_utils.py:125
Functionformat_source
(source)
language/compgen/csl/tasks/smcalflow/tools/string_utils.py:20
Methodforward
( self, batch: Dict[str, Array], deterministic: bool, )
language/mentionmemory/encoders/bert_encoder.py:118
Methodforward
(self, batch: Dict[str, Array], deterministic: bool)
language/mentionmemory/encoders/mauto_encoder.py:151
Methodforward
( self, batch: Dict[str, Array], deterministic: bool, )
language/mentionmemory/encoders/mention_memory_encoder.py:373
Methodforward
The forward pass of the encoder. Models that use an encoder should call this method to encode a passage. Args: batch: input to the enc
language/mentionmemory/encoders/base_encoder.py:35
Methodforward
( self, batch: Dict[str, Array], deterministic: bool)
language/mentionmemory/encoders/readtwice_encoder.py:212
Functionfrequency_sampling_paragraph
Sample words according to a unigram frequency to build a paragraph.
language/bert_extraction/steal_bert_qa/data_generation/preprocess_util.py:106
Methodfrom_config
(cls, config, custom_objects=None)
language/search_agents/muzero/transformer_encoder.py:328
Methodfrom_config
Recreate a NeuralQueryContext from a saved config.
language/nql/nql/__init__.py:626
Methodfrom_dict
Constructs a ConverterConfig from the given dict. Args: converter_kwargs: A dict with attributes of FormatterConfig as keys. Option
language/casper/augment/casper_formatters.py:98
Methodfrom_json
(cls, json_dict: Dict[str, Any])
language/search_agents/muzero/types.py:48
Methodfrom_json
(self, dictionary)
language/xsp/data_preprocessing/language_utils.py:46
Methodfrom_json
Converts from a JSON dictionary to a DatabaseTable object.
language/xsp/data_preprocessing/schema_utils.py:94
Methodfrom_json
(self, dictionary)
language/xsp/data_preprocessing/nl_to_sql_example.py:74
Methodfrom_json
(self, dictionary)
language/xsp/data_preprocessing/sql_utils.py:95
Methodfrom_json
Converts from a JSON representation to a SQL action.
language/xsp/data_preprocessing/sql_utils.py:125
Methodfrom_json_file
Constructs a `BertConfig` from a json file of parameters.
language/canine/bert_modeling.py:99
Methodfrom_local
(cls, db_path)
language/serene/scrape_db.py:71
Functionfrom_lucene_str
Returns an abstract string from a lucene string. Args: lucene_str: str, A valid lucene string. Returns: A tuple of string and adjustment
language/search_agents/muzero/state_tree.py:889
Methodfrom_representation
(cls, representation)
language/gscan/data/vocabulary.py:81
Functionfrom_tfrecords
Loads a dataset from TFRecord format to a list of dictionaries.
language/fruit/tf_utils.py:86
Methodfromdict
(cls, grammar_dict: Dict[str, List[str]], *args, **kwargs)
language/search_agents/muzero/state_tree.py:157
Functionfunc_name_scope
Decorator that adds the current function name as a variable scope. WARNING: EXPERIMENTAL (may conflict with other decorators). This makes things
language/canine/tensor_contracts.py:1362
Functionfunql_template_fn
Simply returns target since entities are already anonymized in targets.
language/compgen/nqg/tasks/geoquery/gen_template_split.py:40
Functiongather
A partial implementation of PyTorch gather, for dim=1. Given a src tensor of variable size, this function gathers multiple elements along the 2nd
language/capwap/utils/tensor_utils.py:125
Functiongather_fn
(x)
language/gscan/xattn_model/model/decode.py:96
Functiongelu
Gaussian Error Linear Unit. This is a smoother version of the RELU. Original paper: https://arxiv.org/abs/1606.08415 Args: x: float Tensor
language/serene/model.py:22
Functiongelu
Gaussian Error Linear Unit. This is a smoother version of the RELU. Original paper: https://arxiv.org/abs/1606.08415 Args: x: float Tensor
language/canine/bert_modeling.py:284
Functiongen_eae_test_list
()
language/mentionmemory/encoders/eae_encoder_test.py:33
Functiongen_eae_test_list
()
language/mentionmemory/tasks/memory_generation_task_test.py:35
Functiongen_eae_test_list
()
language/mentionmemory/tasks/eae_task_test.py:34
Functiongen_memory_saver_test_list
()
language/mentionmemory/tasks/memory_generation_task_test.py:141
Functiongen_mention_pretraining_sample
Generate test raw decoded input for mention pre-training pipeline.
language/mentionmemory/utils/test_utils.py:63
Methodgenerate_all_commands
Generate all commands but allow excluding unused templates.
language/gscan/data/grammar.py:480
Functiongenerate_data_in_process
(arg)
language/labs/consistent_zero_shot_nmt/bin/t2t_datagen.py:229
Functiongenerate_dataset
Generates and writes retrieval-augmented dataset files. Args: orig_train: Iterable of deserialized JSONs for training data. orig_dev: Itera
language/casper/augment/cached_retrieval_to_dataset_lib.py:113
Functiongenerate_derivation
Attempt to find derivation of goal_rule given current_rules. Args: config: Config dict. goal_rule: Goal QCFGRule to derive. current_rul
language/compgen/csl/induction/derivation_utils.py:55
Methodgenerate_encoded_samples
(self, data_dir, tmp_dir, dataset_split)
language/labs/consistent_zero_shot_nmt/data_generators/translate_multilingual.py:91
Functiongenerate_pages
Generates pages from Wikipedia XML file as dictionaries.
language/fruit/wiki_utils.py:53
Methodgenerate_samples
(self, data_dir, tmp_dir, dataset_split)
language/labs/consistent_zero_shot_nmt/data_generators/translate_europarl.py:180
Methodgenerate_samples
(self, data_dir, tmp_dir, dataset_split)
language/labs/consistent_zero_shot_nmt/data_generators/translate_uncorpus.py:238
Methodgenerate_samples
(self, data_dir, tmp_dir, dataset_split)
language/labs/consistent_zero_shot_nmt/data_generators/translate_uncorpus.py:265
Methodgenerate_samples
(self, data_dir, tmp_dir, dataset_split)
language/labs/consistent_zero_shot_nmt/data_generators/translate_uncorpus.py:292
Methodgenerate_samples
(self, data_dir, tmp_dir, dataset_split)
language/labs/consistent_zero_shot_nmt/data_generators/translate_uncorpus.py:317
Methodgenerate_samples
(self, data_dir, tmp_dir, dataset_split)
language/labs/consistent_zero_shot_nmt/data_generators/translate_iwslt17.py:230
Functiongenerate_tensors
Generate Tensors.
language/labs/exemplar_decoding/utils/data.py:280
Methodgenerate_text_for_vocab
(self, data_dir, tmp_dir)
language/labs/consistent_zero_shot_nmt/data_generators/translate_europarl.py:186
Methodgenerate_text_for_vocab
(self, data_dir, tmp_dir)
language/labs/consistent_zero_shot_nmt/data_generators/translate_uncorpus.py:246
Methodgenerate_text_for_vocab
(self, data_dir, tmp_dir)
language/labs/consistent_zero_shot_nmt/data_generators/translate_uncorpus.py:273
Methodgenerate_text_for_vocab
(self, data_dir, tmp_dir)
language/labs/consistent_zero_shot_nmt/data_generators/translate_uncorpus.py:298
Methodgenerate_text_for_vocab
(self, data_dir, tmp_dir)
language/labs/consistent_zero_shot_nmt/data_generators/translate_uncorpus.py:323
Methodgenerate_text_for_vocab
Generates text lines for vocab. Must be implemented by a subclass.
language/labs/consistent_zero_shot_nmt/data_generators/translate_multilingual.py:131
Methodgenerate_text_for_vocab
(self, data_dir, tmp_dir)
language/labs/consistent_zero_shot_nmt/data_generators/translate_iwslt17.py:236
Functiongeometric_sample
Samples k items using geometric sampling without replacement. At each step, item #i will be sampled with probability sample_prob^i (except the la
language/casper/utils/sample_utils.py:27
Functionget
Returns an encoder instance of the specified type.
language/labs/consistent_zero_shot_nmt/modules/encoders.py:168
Functionget
Returns a decoder instance of the specified type.
language/labs/consistent_zero_shot_nmt/modules/decoders.py:287
Functionget
Returns a language model instance of the specified type.
language/labs/consistent_zero_shot_nmt/modules/language_models.py:78
Functionget
Returns attention mechanism according to the specified type.
language/labs/consistent_zero_shot_nmt/modules/attention_mechanisms.py:30
Functionget_aggregated_documents
(all_docs: Dict[str, environment_pb2.Document], max_num_aggregated_documents: int
language/search_agents/t5/t5_agent_lib.py:48
Functionget_arity
(rule)
language/compgen/csl/cky/cfg_rule.py:54
Methodget_array_from_tuple
(array_of_tuples, index)
language/mentionmemory/utils/mention_preprocess_utils_test.py:534
Functionget_assignment_map_from_checkpoint
Compute the union of the current variables and checkpoint variables.
language/canine/bert_modeling.py:337
Functionget_bert_config
Returns BertConfig given BERT directory.
language/xsp/model/bert_utils.py:33
Functionget_bert_embeddings
Returns embeddings for BERT.
language/xsp/model/bert_utils.py:48
Functionget_bert_pooled_output
Returns embeddings for BERT pooled for each input. Args: input_ids: <int32>[batch_size, max_seq_len]. input_mask: <int32>[batch_size, m
language/xsp/model/bert_utils.py:67
Functionget_boolq_question_starters
()
language/bert_extraction/steal_bert_qa/data_generation/preprocess_util.py:34
Functionget_candidate_text
Returns a text representation of the candidate at the given index.
language/canine/tydiqa/data.py:203
Functionget_checkpoint
Return checkpoint path and step, or (None, None).
language/compgen/csl/model/inference/inference_utils.py:25
Functionget_clean_output_mask
Get the masks for generating only clean actions.
language/xsp/model/embeddings.py:148
Functionget_config
Config for training and evaluation.
language/gscan/xattn_model/configs/compositional.py:75
Functionget_config
Config for training and evaluation.
language/gscan/xattn_model/configs/spatial_relation.py:75
Methodget_config
(self)
language/labs/exemplar_decoding/models/linear.py:287
Methodget_config
(self)
language/serene/layers.py:110
Methodget_config
(self)
language/serene/layers.py:157
Methodget_config
(self)
language/serene/layers.py:262
Methodget_config
(self)
language/serene/layers.py:310
Methodget_config
(self)
language/serene/layers.py:371
← previousnext →3,901–4,000 of 6,154, ranked by callers