Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/google-research/language
/ functions
Functions
6,154 in github.com/google-research/language
⨍
Functions
6,154
◇
Types & classes
800
↳
Endpoints
12
Function
filter_articles
Filters articles.
language/fruit/beam_pipelines.py:48
Function
filter_claim_fn
Filter out claims/evidence that have zero length.
language/serene/preprocessing.py:65
Function
filter_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
Function
filter_for_generation_pipeline
Returns filter for generation beam pipeline.
language/fruit/beam_pipelines.py:697
Function
filter_question
Apply filtering rules to QA pair.
language/capwap/utils/io_utils.py:156
Function
filter_redirects
Filters redirects.
language/fruit/beam_pipelines.py:55
Function
filter_rekey
Filter merged articles and rekey by entity id.
language/fruit/beam_pipelines.py:388
Function
filter_sparse_rows
Filter rows of a CSR sparse matrix to retain upto max_cols.
language/labs/drkit/preprocessing/preprocess_utils.py:25
Function
find_possible_splits
Implements `NEW` procedure described in paper appendix.
language/compgen/nqg/model/induction/split_utils.py:176
Function
flat_batch_beam_expand
Expands the each batch item by beam_size in batch_dimension.
language/gscan/xattn_model/model/decode.py:75
Function
flat_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
Method
flatten_bsz
(tensor)
language/mentionmemory/tasks/relation_classifier_task.py:207
Function
flatten_config
Flattens config and remove tuple/list values for logging in tboard.
language/gscan/xattn_model/train_utils.py:131
Function
flatten_list
(seq)
language/realm/featurization.py:614
Function
flatten_list
Unpack lists into a single list.
language/boolq/utils/py_utils.py:28
Function
float_feature
(value)
language/capwap/utils/io_utils.py:47
Function
float_feature_list
(values)
language/capwap/utils/io_utils.py:63
Function
follow_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
Method
follow_thru
(x, r)
language/nql/nql/nql_test.py:645
Method
follow_thru_triple
(group_name, x, r)
language/nql/nql/nql_test.py:655
Function
footprint
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
Function
force_multi_devices
Run with set number of CPU devices.
language/mentionmemory/utils/test_utils.py:42
Function
format_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
Function
format_source
(source)
language/compgen/csl/tasks/smcalflow/tools/string_utils.py:20
Method
forward
( self, batch: Dict[str, Array], deterministic: bool, )
language/mentionmemory/encoders/bert_encoder.py:118
Method
forward
(self, batch: Dict[str, Array], deterministic: bool)
language/mentionmemory/encoders/mauto_encoder.py:151
Method
forward
( self, batch: Dict[str, Array], deterministic: bool, )
language/mentionmemory/encoders/mention_memory_encoder.py:373
Method
forward
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
Method
forward
( self, batch: Dict[str, Array], deterministic: bool)
language/mentionmemory/encoders/readtwice_encoder.py:212
Function
frequency_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
Method
from_config
(cls, config, custom_objects=None)
language/search_agents/muzero/transformer_encoder.py:328
Method
from_config
Recreate a NeuralQueryContext from a saved config.
language/nql/nql/__init__.py:626
Method
from_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
Method
from_json
(cls, json_dict: Dict[str, Any])
language/search_agents/muzero/types.py:48
Method
from_json
(self, dictionary)
language/xsp/data_preprocessing/language_utils.py:46
Method
from_json
Converts from a JSON dictionary to a DatabaseTable object.
language/xsp/data_preprocessing/schema_utils.py:94
Method
from_json
(self, dictionary)
language/xsp/data_preprocessing/nl_to_sql_example.py:74
Method
from_json
(self, dictionary)
language/xsp/data_preprocessing/sql_utils.py:95
Method
from_json
Converts from a JSON representation to a SQL action.
language/xsp/data_preprocessing/sql_utils.py:125
Method
from_json_file
Constructs a `BertConfig` from a json file of parameters.
language/canine/bert_modeling.py:99
Method
from_local
(cls, db_path)
language/serene/scrape_db.py:71
Function
from_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
Method
from_representation
(cls, representation)
language/gscan/data/vocabulary.py:81
Function
from_tfrecords
Loads a dataset from TFRecord format to a list of dictionaries.
language/fruit/tf_utils.py:86
Method
fromdict
(cls, grammar_dict: Dict[str, List[str]], *args, **kwargs)
language/search_agents/muzero/state_tree.py:157
Function
func_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
Function
funql_template_fn
Simply returns target since entities are already anonymized in targets.
language/compgen/nqg/tasks/geoquery/gen_template_split.py:40
Function
gather
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
Function
gather_fn
(x)
language/gscan/xattn_model/model/decode.py:96
Function
gelu
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
Function
gelu
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
Function
gen_eae_test_list
()
language/mentionmemory/encoders/eae_encoder_test.py:33
Function
gen_eae_test_list
()
language/mentionmemory/tasks/memory_generation_task_test.py:35
Function
gen_eae_test_list
()
language/mentionmemory/tasks/eae_task_test.py:34
Function
gen_memory_saver_test_list
()
language/mentionmemory/tasks/memory_generation_task_test.py:141
Function
gen_mention_pretraining_sample
Generate test raw decoded input for mention pre-training pipeline.
language/mentionmemory/utils/test_utils.py:63
Method
generate_all_commands
Generate all commands but allow excluding unused templates.
language/gscan/data/grammar.py:480
Function
generate_data_in_process
(arg)
language/labs/consistent_zero_shot_nmt/bin/t2t_datagen.py:229
Function
generate_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
Function
generate_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
Method
generate_encoded_samples
(self, data_dir, tmp_dir, dataset_split)
language/labs/consistent_zero_shot_nmt/data_generators/translate_multilingual.py:91
Function
generate_pages
Generates pages from Wikipedia XML file as dictionaries.
language/fruit/wiki_utils.py:53
Method
generate_samples
(self, data_dir, tmp_dir, dataset_split)
language/labs/consistent_zero_shot_nmt/data_generators/translate_europarl.py:180
Method
generate_samples
(self, data_dir, tmp_dir, dataset_split)
language/labs/consistent_zero_shot_nmt/data_generators/translate_uncorpus.py:238
Method
generate_samples
(self, data_dir, tmp_dir, dataset_split)
language/labs/consistent_zero_shot_nmt/data_generators/translate_uncorpus.py:265
Method
generate_samples
(self, data_dir, tmp_dir, dataset_split)
language/labs/consistent_zero_shot_nmt/data_generators/translate_uncorpus.py:292
Method
generate_samples
(self, data_dir, tmp_dir, dataset_split)
language/labs/consistent_zero_shot_nmt/data_generators/translate_uncorpus.py:317
Method
generate_samples
(self, data_dir, tmp_dir, dataset_split)
language/labs/consistent_zero_shot_nmt/data_generators/translate_iwslt17.py:230
Function
generate_tensors
Generate Tensors.
language/labs/exemplar_decoding/utils/data.py:280
Method
generate_text_for_vocab
(self, data_dir, tmp_dir)
language/labs/consistent_zero_shot_nmt/data_generators/translate_europarl.py:186
Method
generate_text_for_vocab
(self, data_dir, tmp_dir)
language/labs/consistent_zero_shot_nmt/data_generators/translate_uncorpus.py:246
Method
generate_text_for_vocab
(self, data_dir, tmp_dir)
language/labs/consistent_zero_shot_nmt/data_generators/translate_uncorpus.py:273
Method
generate_text_for_vocab
(self, data_dir, tmp_dir)
language/labs/consistent_zero_shot_nmt/data_generators/translate_uncorpus.py:298
Method
generate_text_for_vocab
(self, data_dir, tmp_dir)
language/labs/consistent_zero_shot_nmt/data_generators/translate_uncorpus.py:323
Method
generate_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
Method
generate_text_for_vocab
(self, data_dir, tmp_dir)
language/labs/consistent_zero_shot_nmt/data_generators/translate_iwslt17.py:236
Function
geometric_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
Function
get
Returns an encoder instance of the specified type.
language/labs/consistent_zero_shot_nmt/modules/encoders.py:168
Function
get
Returns a decoder instance of the specified type.
language/labs/consistent_zero_shot_nmt/modules/decoders.py:287
Function
get
Returns a language model instance of the specified type.
language/labs/consistent_zero_shot_nmt/modules/language_models.py:78
Function
get
Returns attention mechanism according to the specified type.
language/labs/consistent_zero_shot_nmt/modules/attention_mechanisms.py:30
Function
get_aggregated_documents
(all_docs: Dict[str, environment_pb2.Document], max_num_aggregated_documents: int
language/search_agents/t5/t5_agent_lib.py:48
Function
get_arity
(rule)
language/compgen/csl/cky/cfg_rule.py:54
Method
get_array_from_tuple
(array_of_tuples, index)
language/mentionmemory/utils/mention_preprocess_utils_test.py:534
Function
get_assignment_map_from_checkpoint
Compute the union of the current variables and checkpoint variables.
language/canine/bert_modeling.py:337
Function
get_bert_config
Returns BertConfig given BERT directory.
language/xsp/model/bert_utils.py:33
Function
get_bert_embeddings
Returns embeddings for BERT.
language/xsp/model/bert_utils.py:48
Function
get_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
Function
get_boolq_question_starters
()
language/bert_extraction/steal_bert_qa/data_generation/preprocess_util.py:34
Function
get_candidate_text
Returns a text representation of the candidate at the given index.
language/canine/tydiqa/data.py:203
Function
get_checkpoint
Return checkpoint path and step, or (None, None).
language/compgen/csl/model/inference/inference_utils.py:25
Function
get_clean_output_mask
Get the masks for generating only clean actions.
language/xsp/model/embeddings.py:148
Function
get_config
Config for training and evaluation.
language/gscan/xattn_model/configs/compositional.py:75
Function
get_config
Config for training and evaluation.
language/gscan/xattn_model/configs/spatial_relation.py:75
Method
get_config
(self)
language/labs/exemplar_decoding/models/linear.py:287
Method
get_config
(self)
language/serene/layers.py:110
Method
get_config
(self)
language/serene/layers.py:157
Method
get_config
(self)
language/serene/layers.py:262
Method
get_config
(self)
language/serene/layers.py:310
Method
get_config
(self)
language/serene/layers.py:371
← previous
next →
3,901–4,000 of 6,154, ranked by callers