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
Method
table_diff
Computes diffs for tables.
language/fruit/beam_pipelines.py:236
↓ 1 callers
Method
target_string
Construct target string recursively.
language/compgen/csl/model/inference/inference_parser.py:64
↓ 1 callers
Function
test_run
Evaluate a tf expression and time that evaluation.
language/nql/demos/gridworld_scaling/scaling_eval.py:329
↓ 1 callers
Function
text2text_generate_encoded
Encode TranslateMultilingual samples from the generator with the vocab.
language/labs/consistent_zero_shot_nmt/data_generators/translate_multilingual.py:197
↓ 1 callers
Function
text2text_txt_iterator
Yield dicts for TranslateMultilingual.generate_samples from files.
language/labs/consistent_zero_shot_nmt/data_generators/translate_multilingual.py:183
↓ 1 callers
Method
text_diff
Computes diffs for tables.
language/fruit/beam_pipelines.py:295
↓ 1 callers
Function
text_features_to_query
Converts a dict of text features to a Query. Args: ex: a TF Example containing the features described below. featurizer: an instance of fea
language/realm/example_generator.py:198
↓ 1 callers
Function
tfidf_linking
Match questions to entities via Tf-IDF.
language/labs/drkit/hotpotqa/preprocessing/link_questions.py:49
↓ 1 callers
Method
tfidf_linking
Match questions to entities via Tf-IDF.
language/labs/drkit/hotpotqa/demo.py:718
↓ 1 callers
Function
timeout_execute
(cursor, prediction)
language/xsp/evaluation/official_evaluation.py:130
↓ 1 callers
Method
to_dict
(self)
language/diffqg/metrics.py:70
↓ 1 callers
Method
to_dict
Return this object as a simple dictionary for serialization. Returns: dict version of a SymbolTable.
language/nql/nql/symbol.py:204
↓ 1 callers
Method
to_dict
Serializes this instance to a Python dictionary.
language/canine/bert_modeling.py:105
↓ 1 callers
Method
to_dict
Serializes this instance to a Python dict.
language/capwap/utils/transformer_utils.py:97
↓ 1 callers
Method
to_json
(self)
language/xsp/data_preprocessing/schema_utils.py:84
↓ 1 callers
Function
to_latex_tree
(node: VisNode)
language/search_agents/muzero/types.py:427
↓ 1 callers
Method
to_representation
(self)
language/gscan/data/vocabulary.py:75
↓ 1 callers
Method
to_tmp
(self)
language/serene/wiki_index.py:167
↓ 1 callers
Function
to_tokens
Tokenize the text and return mapping from chars to tokens.
language/labs/drkit/hotpotqa/answer_extractor.py:252
↓ 1 callers
Function
to_tokens
Tokenize the text and return mapping from chars to tokens.
language/labs/drkit/hotpotqa/demo.py:453
↓ 1 callers
Function
tohost
Collect batches from all devices to host and flatten batch dimensions.
language/gscan/xattn_model/predict.py:49
↓ 1 callers
Method
token_list
(self)
language/search_agents/muzero/utils.py:299
↓ 1 callers
Method
token_to_word_id_mapper
Creates a mapping function to augment a tf.data.Dataset with word ids. Suppose we have a `dataset` with outputs `str1` and `str2` of arbitrary
language/common/inputs/embedding_utils.py:136
↓ 1 callers
Method
tokenize
Tokenizes a piece of `text` and returns a list of vocab IDs.
language/canine/tydiqa/tydi_tokenization_interface.py:39
↓ 1 callers
Method
tokenize_with_offsets
Tokenizes a piece of `text` and returns IDs and offset information.
language/canine/tydiqa/tydi_tokenization_interface.py:45
↓ 1 callers
Method
tokenize_with_offsets
( self, text: Text)
language/canine/tydiqa/char_splitter.py:53
↓ 1 callers
Function
train
Run one training loop over given TFRecords file.
language/labs/drkit/run_dualencoder_lsf.py:2075
↓ 1 callers
Function
train
Run one training loop over given TFRecords file.
language/labs/drkit/run_multihop_follow.py:512
↓ 1 callers
Function
train
Run training.
language/mentionmemory/training/trainer.py:157
↓ 1 callers
Function
train
Train the model.
language/boolq/run_recurrent_model_boolq.py:428
↓ 1 callers
Method
train
Prepare the dataset, callbacks, and model, then train/save it. Args: epochs: The number of epochs to train for, if None then default to
language/serene/training.py:461
↓ 1 callers
Function
train_model
Train an evidence matching model. Args: model_config: Set of parameters used for ModelConfig debug: Whether to enable debug features tb
language/serene/fever_cli.py:45
↓ 1 callers
Function
training_step
Executes a step of training.
language/compgen/csl/model/training/training_utils.py:49
↓ 1 callers
Function
training_step
Executes a step of training.
language/compgen/nqg/model/parser/training/training_utils.py:27
↓ 1 callers
Function
transformer_model
Multi-headed, multi-layer Transformer from "Attention is All You Need". This is almost an exact implementation of the original Transformer encoder.
language/canine/bert_modeling.py:838
↓ 1 callers
Function
traverse
(x, prefix="", top_level=False)
language/casper/utils/top_utils.py:112
↓ 1 callers
Method
tree_str
(self)
language/search_agents/muzero/state_tree.py:308
↓ 1 callers
Method
truncate
Truncate input to be `num_tokens`.
language/quest/common/vocab_utils.py:31
↓ 1 callers
Function
truncate_and_shift_right
(sequence, max_len, start_id, stop_id)
language/labs/exemplar_decoding/utils/data.py:165
↓ 1 callers
Function
truncate_next_sent
Truncates a pair of sequences to a maximum sequence length.
language/conpono/cpc/preproc/preprocessing_utils.py:245
↓ 1 callers
Function
truncate_paragraph
Truncates a 5 sequences to a maximum sequence length.
language/conpono/create_pretrain_data/preprocessing_utils.py:209
↓ 1 callers
Function
truncate_segment_tokens
Truncates segment tokens. Suppose we arrange our segment tokens in a matrix, e.g.: this is query one <pad> <-- first segment thi
language/conpono/reconstruct/preprocess.py:233
↓ 1 callers
Function
truncate_seq_pair
Truncates a pair of sequences to a maximum sequence length.
language/conpono/cpc/preproc/preprocessing_utils.py:279
↓ 1 callers
Function
truncate_seq_pair
Truncates a pair of sequences to a maximum sequence length.
language/conpono/create_pretrain_data/preprocessing_utils.py:191
↓ 1 callers
Function
truncate_seq_pair
Truncates a pair of sequences to a maximum sequence length.
language/conpono/evals/coherence_eval.py:323
↓ 1 callers
Function
truncate_seq_pair
Truncates a pair of sequences to a maximum sequence length.
language/conpono/evals/discriminative_eval.py:279
↓ 1 callers
Method
truncate_text
Truncates text to last complete sentence that fits in window.
language/fruit/beam_pipelines.py:619
↓ 1 callers
Function
tsv_to_jsonl
Converts TSV file to JSONL. Args: infile: Input TSV filename. outfile: Output JSONL filename. split: The split name (e.g., "train" or "
language/casper/utils/mtop_tsv_to_jsonl.py:53
↓ 1 callers
Function
tuple_generator_builder
Create iterator over tuples produced by parsing lines from a file. The lines are delimited by field_separator, with each being a different type o
language/nql/nql/dataset.py:28
↓ 1 callers
Function
update_eval_info
Updates the eval info if the new result is better. Args: directory: The directory where the best eval info file is stored. eval_result: The
language/multivec/models/checkpoint_utils.py:73
↓ 1 callers
Method
update_metrics
Compute and update metrics. Args: pred_answers: a list of predicted answers. easy_answers: a set of easy answers, i.e. answers can be
language/emql/eval.py:131
↓ 1 callers
Function
update_name_to_features
Adjust feature shapes according to `samples_per_example`.
language/mentionmemory/utils/data_utils.py:47
↓ 1 callers
Method
valid_slot
Should this slot be turned into a triple.
language/templama/sling2facts.py:387
↓ 1 callers
Method
validate
Raises an exception if this configuration is invalid.
language/canine/config_utils.py:102
↓ 1 callers
Function
validate_fields
Checks the validity of fields extracted from a <PAGE> element. Args: fields: A dictionary of fields extracted from a <PAGE> element. Returns
language/fruit/wiki_utils.py:33
↓ 1 callers
Function
validate_flags_or_throw
Validate the input FLAGS or throw an exception.
language/labs/drkit/run_dualencoder_lsf.py:2297
↓ 1 callers
Function
validate_flags_or_throw
Validate the input FLAGS or throw an exception.
language/labs/drkit/run_multihop_follow.py:631
↓ 1 callers
Function
validate_flags_or_throw
Validate the input FLAGS or throw an exception.
language/labs/drkit/hotpotqa/answer_extractor.py:1223
↓ 1 callers
Function
validate_flags_or_throw
Validate the input FLAGS or throw an exception.
language/bert_extraction/steal_bert_qa/models/run_squad.py:1110
↓ 1 callers
Function
validate_flags_or_throw
Validate the input FLAGS or throw an exception.
language/bert_extraction/steal_bert_qa/models/run_squad_membership.py:720
↓ 1 callers
Function
validate_flags_or_throw
Validate the input FLAGS or throw an exception.
language/conpono/evals/run_squad.py:1097
↓ 1 callers
Function
validate_flags_or_throw
Validate the input FLAGS or throw an exception.
language/question_answering/bert_joint/run_nq.py:1287
↓ 1 callers
Function
validate_flags_or_throw
Validate the input FLAGS or throw an exception.
language/question_answering/b2t2/run_b2t2.py:593
↓ 1 callers
Function
validate_flags_or_throw
Validate the input FLAGS or throw an exception.
language/question_answering/b2t2/run_dual_encoder.py:341
↓ 1 callers
Function
validate_flags_or_throw
Validate the input FLAGS or throw an exception.
language/capwap/synthetic/generate_questions.py:428
↓ 1 callers
Method
validate_flags_or_throw
Validate the input FLAGS or throw an exception.
language/canine/tydiqa/run_tydi_lib.py:111
↓ 1 callers
Method
validate_scored_ngram
Checks if the generated word follows all requirements on length and score. Note that the word also should not be an existing word. Args:
language/wino_dict/create_new_words.py:155
↓ 1 callers
Function
vanilla_lstm
A basic LSTM. Args: seqs: <tf.float32>[batch_size, total_len, pattern_size] Sequences of patterns, where `total_len` is the length of a s
language/labs/memory/baseline_models.py:59
↓ 1 callers
Function
vanilla_rnn
A basic RNN. Args: seqs: <tf.float32>[batch_size, total_len, pattern_size] Sequences of patterns, where `total_len` is the length of a se
language/labs/memory/baseline_models.py:26
↓ 1 callers
Method
verify_exemplars
Filters out an example's exemplars that are not in the index. Args: example: an Example. The "exemplars" field will be modified in-place.
language/casper/augment/casper_converters.py:143
↓ 1 callers
Function
w_decay_fn
(path)
language/gscan/xattn_model/train_utils.py:76
↓ 1 callers
Function
weighted_binary_cross_entropy_from_probs
Compute the binary cross entropy weighted by the given weights. Args: target: Prediction target output: Model prediction positive_class
language/serene/losses.py:61
↓ 1 callers
Function
weighted_cross_entropy
Compute weighted cross entropy and entropy for log probs and targets. Args: logits: [batch, length, num_classes] float array. targets: catego
language/gscan/xattn_model/train_utils.py:145
↓ 1 callers
Function
white_space_fix
(text)
language/labs/drkit/evaluate.py:327
↓ 1 callers
Function
white_space_fix
(text)
language/orqa/utils/eval_utils.py:32
↓ 1 callers
Function
white_space_fix
(text)
language/bert_extraction/steal_bert_qa/utils/evaluate_squad_2.py:54
↓ 1 callers
Function
white_space_fix
(text)
language/bert_extraction/steal_bert_qa/utils/evaluate_squad.py:46
↓ 1 callers
Function
white_space_fix
(text)
language/bert_extraction/steal_bert_qa/data_generation/preprocess_util.py:206
↓ 1 callers
Function
white_space_fix
(text)
language/search_agents/muzero/utils.py:40
↓ 1 callers
Function
white_space_fix
(text)
language/asqa/scoring.py:37
↓ 1 callers
Function
white_space_fix
(text)
language/capwap/utils/metric_utils.py:181
↓ 1 callers
Function
white_space_fix
(s)
language/decontext/eval_util.py:55
↓ 1 callers
Function
whitespace_align_seqs
Adds whitespace padding to sequence elements for vertical alignment. All sequence elements are cast to Unicode strings. Args: seqs (list): a
language/conpono/reconstruct/preprocess.py:206
↓ 1 callers
Function
wide_representation
Create a wide representation of QA pairs used to construct the ASQA instance Args: key: Key of the ASQA instance Returns: Wide represent
language/asqa/human_annotation/preparation.py:23
↓ 1 callers
Function
wiki_preprocess
Preprocess wikipedia dump to TFDS format. Args: common_config: Configuration data_dir: Where to write data to download_dir: Where to do
language/serene/fever_cli.py:206
↓ 1 callers
Function
wikisql_db_to_table_tuples
Return list of abstract_sql.TableSchema from a dict describing a DB.
language/xsp/data_preprocessing/abstract_sql_converters.py:268
↓ 1 callers
Function
wo_decay_fn
(path)
language/gscan/xattn_model/train_utils.py:79
↓ 1 callers
Function
wordpiece_tokenize
Perform wordpiece tokenization on a Tensor of untokenized strings. Args: text_input: <tf.string> A Tensor of untokenized strings. vocab_tab
language/conpono/reconstruct/preprocess.py:112
↓ 1 callers
Function
write_array_to_checkpoint
Writes Numpy array to TF checkpoint.
language/realm/refresh_doc_embeds.py:90
↓ 1 callers
Function
write_flags_to_file
Write hyperparameter settings in flags to a file.
language/labs/memory/model_utils.py:91
↓ 1 callers
Method
write_freebase_ids
Write a file mapping wikidata qids to freebase mids.
language/templama/sling2facts.py:263
↓ 1 callers
Method
write_kb
Write out all triples rel/subject/object, perhaos with qualifiers.
language/templama/sling2facts.py:270
↓ 1 callers
Function
write_metric
(writer, name, metric, step)
language/compgen/nqg/model/parser/inference/eval_model.py:163
↓ 1 callers
Function
write_metrics
Writing out metrics to a file.
language/multivec/models/metrics.py:195
↓ 1 callers
Function
write_per_claim_analysis
For each claim, write the examples the model scored and claim summary. Args: df: Dataframe to read predictions and examples from claim_look
language/serene/analysis.py:228
↓ 1 callers
Function
write_predictions
Write final predictions to the json file and log-odds of null if needed.
language/labs/drkit/run_dualencoder_qa.py:764
↓ 1 callers
Function
write_predictions
Write final predictions to the json file and log-odds of null if needed.
language/labs/drkit/run_dualencoder_lsf.py:1653
↓ 1 callers
Function
write_predictions
Write final predictions to the json file and log-odds of null if needed.
language/labs/drkit/hotpotqa/answer_extractor.py:833
↓ 1 callers
Function
write_predictions
Write final predictions to the json file and log-odds of null if needed.
language/bert_extraction/steal_bert_qa/models/run_squad.py:754
↓ 1 callers
Function
write_predictions
Write final predictions to the json file and log-odds of null if needed.
language/conpono/evals/run_squad.py:741
← previous
next →
2,701–2,800 of 6,154, ranked by callers