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
↓ 1 callers
Function
_process_file
(filename, kbid2id, num_mentions, fo)
language/labs/drkit/hotpotqa/preprocessing/parse_wiki.py:94
↓ 1 callers
Method
_process_index
Preprocesses the retrieval index.
language/casper/augment/casper_converters.py:117
↓ 1 callers
Function
_process_item
Process single wiki abstract.
language/labs/drkit/hotpotqa/preprocessing/parse_wiki.py:44
↓ 1 callers
Function
_ragged_where
(cond, x)
language/realm/preprocessing.py:144
↓ 1 callers
Method
_read_json
Reads a JSON encoded file.
language/relation_learning/data/fewrel.py:112
↓ 1 callers
Method
_read_lines_from_file
(cls, filename)
language/serene/preprocessing.py:666
↓ 1 callers
Function
_rearrange_nts
Rearrange cfg_nts to match qcfg_idxs.
language/compgen/csl/augment/joint_sampler.py:119
↓ 1 callers
Method
_record_fever_metrics
Compute and record fever metrics. Args: ranked_evidence: Evidence grouped and sorted by claim_id epoch: Current epoch n_evidenc
language/serene/callbacks.py:350
↓ 1 callers
Method
_record_recall_metrics
Compute and record recall metrics. Args: ranked_evidence: Grouped and sorted evidence epoch: Current epoch scrape_type: The sou
language/serene/callbacks.py:410
↓ 1 callers
Function
_recursion
Recursive approach for finding best matches.
language/fruit/rendering_utils.py:343
↓ 1 callers
Function
_regroup_tokens
Returns recursive list of sqlparse.Token for nested statements.
language/xsp/data_preprocessing/abstract_sql.py:347
↓ 1 callers
Function
_remove_keys
Remove given keys from list of keys. Args: keys: List of keys to subtract from. keys_to_remove: List of keys to remove. Returns: A l
language/xsp/model/input_pipeline.py:183
↓ 1 callers
Method
_repeat_molecules
Repeats molecules to make them the same length as the char sequence.
language/canine/modeling.py:344
↓ 1 callers
Function
_replace_from_placeholder
Replace 'FROM' with placeholder symbol in tokens.
language/xsp/data_preprocessing/abstract_sql.py:403
↓ 1 callers
Function
_replace_nts
Replace NTs in `symbols`.
language/compgen/csl/induction/unification_utils.py:277
↓ 1 callers
Function
_replace_tmp_nt
(source, target, nts)
language/compgen/nqg/model/induction/split_utils.py:47
↓ 1 callers
Function
_resolve_reference
Resolves an ambiguous token that matches multiple annotations. Args: item: position in the SQL parse where the search will start. example:
language/xsp/data_preprocessing/sql_parsing.py:262
↓ 1 callers
Function
_restore_checkpoint
Restore parameters from checkpoint.
language/conpono/evals/coherence_eval.py:62
↓ 1 callers
Function
_restore_checkpoint
Restore parameters from checkpoint.
language/conpono/evals/discriminative_eval.py:55
↓ 1 callers
Function
_rouge_calculation
Internal function for rouge scoring. If two references are provided, the best score is chosen for each instance. Args: hypotheses: list of
language/asqa/scoring.py:50
↓ 1 callers
Function
_run_model
(config, dataset_fn)
language/compgen/csl/model/training/training_utils_test.py:65
↓ 1 callers
Function
_run_model
(config, bert_config, dataset_fn)
language/compgen/nqg/model/parser/training/training_utils_test.py:71
↓ 1 callers
Method
_run_on_features
Run predictions for given features.
language/labs/drkit/hotpotqa/demo.py:614
↓ 1 callers
Function
_run_parser
Run bottom up parser.
language/compgen/nqg/tasks/spider/sql_parser.py:168
↓ 1 callers
Method
_sample_batch
(self, batch_index, batch_size, n_mentions_per_batch)
language/mentionmemory/tasks/memory_generation_task_test.py:174
↓ 1 callers
Function
_sample_examples
(pipeline)
language/compgen/csl/augment/generate_synthetic_examples_beam.py:72
↓ 1 callers
Method
_sample_rule
Sample a rule.
language/compgen/csl/augment/qcfg_sampler.py:88
↓ 1 callers
Method
_sample_rule
Sample a rule.
language/compgen/csl/augment/joint_sampler.py:432
↓ 1 callers
Method
_save_dev_predictions
Save model predictions for the dev set. This is used to compute Fever F1 as stopping metric Args: val_batched: The batched validation
language/serene/training.py:535
↓ 1 callers
Method
_save_encoder
Save only the text encoder to disk.
language/serene/training.py:267
↓ 1 callers
Method
_save_model_config
Save only the Model configuration to disk.
language/serene/training.py:260
↓ 1 callers
Method
_save_predictions
(self, epoch, examples, claim_predictions, evidence_predictions)
language/serene/callbacks.py:275
↓ 1 callers
Method
_select_exemplars
Selects lists of exemplars to be augmented to the given example. This method should be overridden. Args: example: a preprocessed RawEx
language/casper/augment/casper_converters.py:182
↓ 1 callers
Function
_sequence_correct
Computes a per-example sequence accuracy.
language/xsp/model/metrics.py:20
↓ 1 callers
Function
_set_initializer
Set initializer used for all model variables.
language/xsp/model/transformer.py:34
↓ 1 callers
Method
_set_value
Sets the value of a key-value pair, recursively traversing namespaces.
language/canine/config_utils.py:204
↓ 1 callers
Method
_should_anonymize
(self, token, last_token)
language/compir/dataset_parsers/scan_parser.py:91
↓ 1 callers
Function
_single_lstm
Compute the outputs of a single LSTM (subroutine of stacked_bilstm). Be careful if used anywhere outside of stacked_bilstm, which converts the se
language/common/layers/cudnn_layers.py:29
↓ 1 callers
Function
_spans_given_width
(width)
language/orqa/models/orqa_model.py:56
↓ 1 callers
Function
_sparse_tensor_to_numpy_dict
Convert a tf.SparseTensor into a dictionary of numpy arrays. Args: sparse_tensor: A SparseTensor of the trained relation. Returns: A dic
language/nql/nql/io.py:185
↓ 1 callers
Method
_sparse_to_dict
Convert a SciPy sparse COO matrix to a JSON-serializable dict.
language/nql/nql/__init__.py:596
↓ 1 callers
Function
_split_arguments
Splits span into list of spans based on commas.
language/compgen/nqg/tasks/geoquery/funql_normalization.py:49
↓ 1 callers
Function
_split_arguments
Splits comma-joined argument list. For example, an input of "foo, bar(xyz, abc), bar" will be split into: ["foo", "bar(xyz, abc)", "bar"]. Arg
language/compgen/nqg/tasks/geoquery/tmcd_utils.py:23
↓ 1 callers
Function
_split_examples
Split examples into a sampled and a remaining subset based on config.
language/compgen/nqg/model/induction/induction_utils.py:248
↓ 1 callers
Function
_string_to_tokens_dataset_mapper
Wrapper for mapper that tokenizes and truncates by length.
language/question_answering/decatt_docreader/models/nq_long_model.py:188
↓ 1 callers
Function
_symbols_eq
(state, token_a, token_b)
language/compgen/csl/induction/unification_utils.py:225
↓ 1 callers
Function
_table
Convert table to field, value format.
language/table_text_eval/webnlg_correlations.py:56
↓ 1 callers
Function
_table_reader
Yields tables from the table file. Tables are parsed into a list of tuples with tokenized entries. Args: table_file: String filename.
language/table_text_eval/table_text_eval.py:96
↓ 1 callers
Function
_target_len_mask
(targets, sequence_length)
language/xsp/model/loss.py:30
↓ 1 callers
Method
_target_reward
(self)
language/search_agents/muzero/env.py:803
↓ 1 callers
Function
_text_reference_reader
Returns list of references in the multi-reference setting. Performs lowercasing on each line before returning. Note this file is slightly differe
language/totto/totto_bleurt_eval.py:58
↓ 1 callers
Function
_text_reference_reader
Returns list of references in both the single and multi-reference setting. Performs lowercasing and white-space tokenization on each line before
language/totto/totto_parent_eval.py:98
↓ 1 callers
Function
_tile_batch
Core single-tensor implementation of tile_batch.
language/capwap/utils/tensor_utils.py:113
↓ 1 callers
Function
_to_tf_example
(example: AugmentedExample)
language/casper/augment/cached_retrieval_to_dataset_lib.py:43
↓ 1 callers
Method
_tokenize_example
(self, example)
language/serene/training.py:851
↓ 1 callers
Function
_tokenize_with_entity_markers
Apply wordpiece tokenization with entity markers around entities.
language/relation_learning/data/fewrel.py:38
↓ 1 callers
Function
_train_ngram_model
(n: int, lexicon: Set[str])
language/wino_dict/create_new_words.py:101
↓ 1 callers
Function
_transformer_body
Build a Transformer. Args: input_embeddings: The embeddings of the input to the Transformer. source_len: The length of the input utterance.
language/xsp/model/transformer.py:316
↓ 1 callers
Function
_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
language/bert_extraction/steal_bert_classifier/models/run_classifier_membership.py:505
↓ 1 callers
Function
_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
language/bert_extraction/steal_bert_classifier/models/run_classifier_distillation.py:500
↓ 1 callers
Function
_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
language/bert_extraction/steal_bert_classifier/models/run_classifier.py:752
↓ 1 callers
Function
_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
language/bert_extraction/steal_bert_qa/utils/run_bert_boolq_diff.py:359
↓ 1 callers
Function
_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
language/bert_extraction/steal_bert_qa/models/run_bert_boolq_distill.py:396
↓ 1 callers
Function
_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
language/bert_extraction/steal_bert_qa/models/run_bert_boolq.py:378
↓ 1 callers
Function
_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
language/conpono/evals/classifier_utils.py:794
↓ 1 callers
Function
_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
language/conpono/evals/run_classifier.py:659
↓ 1 callers
Function
_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
language/conpono/evals/run_concat_classifier.py:664
↓ 1 callers
Function
_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
language/multivec/preprocessing/create_training_data.py:389
↓ 1 callers
Function
_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
language/boolq/run_bert_boolq.py:363
↓ 1 callers
Function
_tuple_assign
Assign a result into an (immutable) tuple via copy-on-write.
language/canine/tensor_contracts.py:1344
↓ 1 callers
Function
_unaggregate
Return a list of unaggregated nodes.
language/compgen/csl/model/data/parsing_utils.py:55
↓ 1 callers
Method
_upsample_molecules_to_chars
Run a shallow/low-dim transformer to get a final character encoding.
language/canine/modeling.py:439
↓ 1 callers
Method
_use_relevance_feedback_restrict
Returns true if restricts should be applied for the current step. Args: reward: The reward used to determine if the restrict should be app
language/search_agents/muzero/env.py:869
↓ 1 callers
Function
_utterance_to_db_map
Returns map of utterances to Spider db json object.
language/xsp/evaluation/restore_from_asql.py:59
↓ 1 callers
Function
_utterance_to_one_best_sql_map
Get map of utterance to best prediction.
language/xsp/evaluation/convert_preds_for_spider_eval.py:76
↓ 1 callers
Method
_validate_self
To be overridden by implementing classes for custom validation logic.
language/canine/config_utils.py:113
↓ 1 callers
Function
_verify_arity
Raise ValueError if rule does not follow valid arity convention.
language/compgen/nqg/model/induction/derivation_utils.py:106
↓ 1 callers
Function
_word_candidates
Extracts word candidates with a certain probability bucket.
language/wino_dict/generate.py:69
↓ 1 callers
Function
_word_overlap_helper
(question_ids, context_ids)
language/question_answering/decatt_docreader/models/nq_long_decatt_model.py:44
↓ 1 callers
Method
_wrap_with_attention
Wraps RNN cell and memory with attention.
language/labs/consistent_zero_shot_nmt/modules/decoders.py:222
↓ 1 callers
Method
_write_lines_to_file
(cls, filename, lines, metadata_dict=None)
language/serene/preprocessing.py:662
↓ 1 callers
Function
_write_tf_examples
Write examples as test data.
language/compgen/csl/model/training/training_utils_test.py:32
↓ 1 callers
Function
_write_tf_examples
Write examples as test data.
language/compgen/nqg/model/parser/training/training_utils_test.py:35
↓ 1 callers
Function
abs_diff
(var_name)
language/bert_extraction/steal_bert_classifier/utils/model_diff.py:117
↓ 1 callers
Method
accept_neighbor
Returns the new state after accepting the neighbor.
language/casper/retrieve/query_retrievers.py:125
↓ 1 callers
Method
accept_neighbor
(self, neighbor_ex: Example, state: Any)
language/casper/retrieve/query_retrievers.py:174
↓ 1 callers
Function
add_candidate_types_and_positions
Adds type and position info to each candidate in the document.
language/question_answering/bert_joint/run_nq.py:311
↓ 1 callers
Function
add_candidate_types_and_positions
Adds type and position info to each candidate in the document.
language/canine/tydiqa/preproc.py:260
↓ 1 callers
Function
add_context
Adds context features required by the model.
language/xsp/data_preprocessing/convert_to_tfrecords.py:89
↓ 1 callers
Function
add_morphology_to_examples
Adds morphology to generated words based on the provided rules. Args: examples: List of input words and scores. morph_rules: Set of rules t
language/wino_dict/create_new_words.py:232
↓ 1 callers
Function
add_rule_to_trie
(trie_root, rule)
language/compgen/csl/cky/cfg_parser.py:73
↓ 1 callers
Function
add_rule_to_trie
(trie_root, rule)
language/compgen/nqg/common/cky/trie_utils.py:69
↓ 1 callers
Function
add_special_tokens
Adds special tokens to segment tokens. Appends a [SEP] token to each segment. Prepends a [CLS] token to the first segment. Args: segment_t
language/conpono/reconstruct/preprocess.py:280
↓ 1 callers
Function
ag_gnmt_bahdanau_att_multi
Hparams for LSTM with bahdanau attention.
language/labs/consistent_zero_shot_nmt/models/agreement.py:671
↓ 1 callers
Function
ag_gnmt_luong_att_multi
Hparams for LSTM with luong attention.
language/labs/consistent_zero_shot_nmt/models/agreement.py:687
↓ 1 callers
Function
ag_nmt_bilstm_bahdanau_att_multi
Hparams for LSTM with bahdanau attention.
language/labs/consistent_zero_shot_nmt/models/agreement.py:604
↓ 1 callers
Function
ag_nmt_bilstm_luong_att_multi
Hparams for LSTM with luong attention.
language/labs/consistent_zero_shot_nmt/models/agreement.py:620
↓ 1 callers
Function
all_compare_without_pad
Performs all-to-all comparison of two 1D arrays ignoring pad values.
language/mentionmemory/utils/mention_utils.py:28
↓ 1 callers
Function
anonymize_aliases
Renames aliases to a consistent format (e.g., using T#).
language/xsp/data_preprocessing/sql_utils.py:44
↓ 1 callers
Function
anonymize_top_lf_labels
Anonymizes the intent/slot labels of the TopLFs in place. Args: lfs: List of TopLF objects. anonymized_labels: List of anonymized labels to
language/casper/augment/casper_formatters.py:169
← previous
next →
1,601–1,700 of 6,154, ranked by callers