MCPcopy Create free account

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

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

↓ 5 callersMethodset_start
(self, start)
language/search_agents/muzero/state_tree.py:147
↓ 5 callersFunctionshow_size
String that translates size in bytes to kB, Mb, etc.
language/nql/demos/gridworld_scaling/scaling_eval.py:292
↓ 5 callersMethodto_dict
(self)
language/gscan/xattn_model/dataset/preprocess.py:145
↓ 5 callersMethodto_json_string
Serializes this instance to a JSON string.
language/canine/config_utils.py:163
↓ 5 callersMethodtokenize
(self, text)
language/serene/preprocessing.py:583
↓ 5 callersMethodtokenize
Returns a list of Tokens.
language/realm/featurization.py:430
↓ 5 callersMethodtokenize
(self, text, *args, **kwargs)
language/fruit/rendering_utils.py:309
↓ 5 callersMethodtransform
(self, value)
language/capwap/preprocessing/text_synthetic_qa.py:80
↓ 5 callersFunctiontry_executing_query
Attempts to execute a SQL query against a database given a cursor.
language/xsp/evaluation/official_evaluation.py:89
↓ 5 callersFunctionunderscore_to_whitespace
(text)
language/serene/fever_tfds.py:46
↓ 5 callersMethodunion
Union two sketches. Args: sk1: first sketch sk2: second sketch Returns: a countmin sketch for union
language/emql/cm_sketch.py:173
↓ 5 callersMethodweighted_by_sum
Weight elements in some set by the sum of the scores in some other set. Args: other: A NeuralQueryExpression Returns: The Neural
language/nql/nql/__init__.py:371
↓ 5 callersMethodwrite_examples
(self, examples)
language/question_answering/bert_joint/run_nq_test.py:41
↓ 4 callersMethod__init__
(self, type_name, message)
language/nql/nql/__init__.py:46
↓ 4 callersFunction_assert_array_is_integer_or_none
(array: Optional[Array], array_name: str)
language/mentionmemory/modules/memory_retrieval_layer.py:29
↓ 4 callersFunction_build_context
Compute feature representations for attention/copy. Args: hps: hyperparameters. encoder_outputs: outputs by the encoder RNN. Returns:
language/labs/exemplar_decoding/models/hypernet.py:43
↓ 4 callersFunction_build_context
Compute feature representations for attention/copy. Args: hps: hyperparameters. encoder_outputs: outputs by the encoder RNN. Returns:
language/labs/exemplar_decoding/models/baselines.py:41
↓ 4 callersFunction_create_examples
Creates examples for the training and dev sets.
language/bert_extraction/steal_bert_qa/utils/run_bert_boolq_diff.py:146
↓ 4 callersFunction_create_examples
Creates examples for the training and dev sets.
language/bert_extraction/steal_bert_qa/models/run_bert_boolq_distill.py:178
↓ 4 callersFunction_create_examples
Creates examples for the training and dev sets.
language/bert_extraction/steal_bert_qa/models/run_bert_boolq.py:175
↓ 4 callersMethod_create_examples
Creates examples for the training and dev sets.
language/bert_extraction/steal_bert_classifier/models/run_classifier_membership.py:243
↓ 4 callersMethod_create_examples
Creates examples for the training and dev sets.
language/bert_extraction/steal_bert_classifier/models/run_classifier_membership.py:299
↓ 4 callersMethod_create_examples
Creates examples for the training and dev sets.
language/bert_extraction/steal_bert_classifier/models/run_classifier.py:289
↓ 4 callersMethod_create_examples
Creates examples for the training and dev sets.
language/bert_extraction/steal_bert_classifier/models/run_classifier.py:421
↓ 4 callersMethod_create_examples
Creates examples for the training and dev sets.
language/bert_extraction/steal_bert_classifier/models/run_classifier.py:471
↓ 4 callersMethod_create_examples
Creates examples for the training and dev sets.
language/bert_extraction/steal_bert_classifier/models/run_classifier.py:540
↓ 4 callersMethod_create_test_examples
Create test examples for fever task. This function is similar to create_validation_examples, but handles the fact that: (1) there are no gold
language/serene/fever_tfds.py:530
↓ 4 callersMethod_create_validation_examples
Create validation examples for fever task. This function follows these steps/guidelines: 1. Get up to the top n_inference_documents rated doc
language/serene/fever_tfds.py:455
↓ 4 callersFunction_debug_state
(item, example)
language/xsp/data_preprocessing/sql_parsing.py:125
↓ 4 callersFunction_find_table_annotation
Finds a reference to a table in the schema.
language/xsp/data_preprocessing/sql_parsing.py:202
↓ 4 callersMethod_gen_array
(self, gen_fn)
language/mentionmemory/modules/mention_losses_test.py:42
↓ 4 callersFunction_get_2d_index
Generates 2D index given separate arrays for each coordinate.
language/mentionmemory/utils/mention_preprocess_utils.py:520
↓ 4 callersFunction_get_config
()
language/compgen/csl/induction/derivation_utils_test.py:22
↓ 4 callersFunction_get_non_terminals
Return set of non-terminal symbols in `rhs`.
language/compgen/nqg/model/induction/split_utils.py:27
↓ 4 callersFunction_get_sql_table
Returns SqlTable tuple for the given token_value.
language/xsp/data_preprocessing/abstract_sql.py:255
↓ 4 callersFunction_get_tensor_arg
Like `_get_arg`, but also resolves `tuple_index`.
language/canine/tensor_contracts.py:902
↓ 4 callersMethod_get_vocab_index_or_unk
(self, token, is_input=True)
language/xsp/data_preprocessing/convert_to_tfrecords.py:271
↓ 4 callersMethod_hash
Get the i'th hash value of element x. Args: x: name or id in string i: the i'th hash function Returns: hash result
language/emql/cm_sketch.py:58
↓ 4 callersMethod_info_dict
(self, obs: Observations)
language/search_agents/muzero/env.py:820
↓ 4 callersFunction_is_dynamic
Returns true for dynamic dimensions (a tensor value, not an int).
language/canine/tensor_contracts.py:845
↓ 4 callersFunction_is_function
(item)
language/xsp/data_preprocessing/sql_parsing.py:37
↓ 4 callersFunction_is_operation
(item)
language/xsp/data_preprocessing/sql_parsing.py:57
↓ 4 callersFunction_is_punctuation
(item)
language/xsp/data_preprocessing/sql_parsing.py:65
↓ 4 callersFunction_is_where
(item)
language/xsp/data_preprocessing/sql_parsing.py:85
↓ 4 callersFunction_link_entity_list
(entity_list, entity2id)
language/labs/drkit/metaqa/preprocessing/metaqa_preprocess.py:156
↓ 4 callersFunction_link_entity_list
(entity_list, entity2id)
language/emql/preprocess/metaqa_preprocess.py:156
↓ 4 callersFunction_log_stats
Logs the statistics as percentages of the total count.
language/casper/evaluate/evaluate_retrieval.py:68
↓ 4 callersFunction_nfc_normalize
(text)
language/serene/wikipedia_processing.py:46
↓ 4 callersFunction_parse_commands
(commands)
language/gscan/xattn_model/dataset/preprocess.py:226
↓ 4 callersFunction_parse_lines
Parses lines from UNCorpus dataset.
language/labs/consistent_zero_shot_nmt/data_generators/translate_europarl.py:98
↓ 4 callersFunction_parse_lines
Parses lines from IWSLT17 dataset.
language/labs/consistent_zero_shot_nmt/data_generators/translate_iwslt17.py:138
↓ 4 callersFunction_read_file
Read reference file.
language/table_text_eval/preprocess_webnlg.py:53
↓ 4 callersFunction_safe_divide
(x, y)
language/casper/evaluate/top_metrics.py:21
↓ 4 callersFunction_sample_example
(augment_config, model_dir, model_config, rules, target_grammar_rules)
language/compgen/csl/augment/sampler_utils_test.py:25
↓ 4 callersMethod_sharded_rel_name
Helper function to append shard_id to the end of rel_name. Args: rel_name: string naming a declared relation shard_id: the i'th shard
language/nql/nql/dist.py:364
↓ 4 callersMethod_test_pretrained_word_embeddings
(self, trainable, num_oov_buckets)
language/common/inputs/embedding_utils_test.py:47
↓ 4 callersFunctionapply_highway_lstm
Run a bi-directional LSTM with highway connections over `x`. Args: x: <tf.float32>[batch, seq_len, dim] seq_len: <tf.int32>[batch] for None
language/boolq/run_recurrent_model_boolq.py:222
↓ 4 callersMethodassertArrayEqual
(self, expected, actual)
language/mentionmemory/tasks/ultra_fine_entity_typing_task_test.py:200
↓ 4 callersFunctionattention_layer
Performs multi-headed attention from `from_tensor` to `to_tensor`. This is an implementation of multi-headed attention based on "Attention is all
language/canine/bert_modeling.py:693
↓ 4 callersFunctionbase_agreement
Adds base hparams for AgreementMultilingualNmt.
language/labs/consistent_zero_shot_nmt/models/agreement.py:535
↓ 4 callersFunctionbase_att
Adds base attention hparams.
language/labs/consistent_zero_shot_nmt/models/basic.py:252
↓ 4 callersFunctionbase_nmt
Base hparams for LSTM-based NMT models.
language/labs/consistent_zero_shot_nmt/models/basic.py:214
↓ 4 callersFunctioncell
String name for a cell in the grid.
language/nql/demos/gridworld_scaling/scaling_eval.py:185
↓ 4 callersMethodclean
Clean word pieces.
language/capwap/utils/text_utils.py:98
↓ 4 callersFunctionclean_tokens
Tokens are lower-cased, stripped of punctuation, and filtered for NULL.
language/capwap/utils/metric_utils.py:39
↓ 4 callersMethodcompute_logits
Compute logits for word prediction.
language/capwap/utils/transformer_utils.py:274
↓ 4 callersFunctioncompute_loss
(logits, positions)
language/labs/drkit/run_dualencoder_lsf.py:1489
↓ 4 callersFunctioncompute_loss
(logits, positions)
language/conpono/evals/run_squad.py:645
↓ 4 callersMethodconvert
Return tf.Example or Raise.
language/compgen/csl/model/data/example_converter.py:167
↓ 4 callersFunctioncreate_bytes_feature
(value)
language/conpono/cpc/preproc/ccnews_preproc_pipeline.py:76
↓ 4 callersFunctioncreate_evidence_input
Convert evidence inputs to their string representation. In particular, this means output looks like: Albert Einstein @@septitle@@ @@sid_1@@ the e
language/serene/preprocessing.py:34
↓ 4 callersFunctioncreate_int_feature
(values)
language/bert_extraction/steal_bert_classifier/models/run_classifier_distillation.py:429
↓ 4 callersFunctioncreate_int_feature
(values)
language/bert_extraction/steal_bert_qa/utils/run_bert_boolq_diff.py:292
↓ 4 callersFunctioncreate_int_feature
(values)
language/bert_extraction/steal_bert_qa/models/run_bert_boolq_distill.py:329
↓ 4 callersFunctioncreate_int_feature
(values)
language/question_answering/b2t2/run_dual_encoder.py:440
↓ 4 callersFunctiondropout
Perform dropout. Args: input_tensor: float Tensor. dropout_prob: Python float. The probability of dropping out a value (NOT of *keepi
language/canine/bert_modeling.py:364
↓ 4 callersFunctiondynamic_padding_1d
Padds or truncates 1D tensor to a specified length.
language/mentionmemory/utils/mention_preprocess_utils.py:73
↓ 4 callersMethodfinduids
Like re.findall but returns ints instead of strings.
language/fruit/rendering_utils.py:178
↓ 4 callersMethodfreeze
Freeze the SymbolTable for a specific type. Args: type_name: string name of a type. unknown_marker: string Unknown words or words ad
language/nql/nql/__init__.py:1301
↓ 4 callersMethodfrom_dict
Constructs a `TransformerConfig` from a Python dict of parameters.
language/capwap/utils/transformer_utils.py:83
↓ 4 callersMethodfrom_rules
Init JointSampler from QCFG rules and Target CFG rules. Args: target_grammar_rules: A list of TargetCfgRule instance. qcfg_rules: A l
language/compgen/csl/augment/joint_sampler.py:299
↓ 4 callersMethodget_arity
(self)
language/compgen/csl/augment/joint_sampler.py:69
↓ 4 callersFunctionget_ckpt_number
(ckpt)
language/multivec/models/ranking_model_experiment_inbatch.py:834
↓ 4 callersMethodget_definition_synonym
(self)
language/wino_dict/utils.py:175
↓ 4 callersMethodget_from_key
Get entries based on full key.
language/compgen/csl/cky/cfg_parser.py:102
↓ 4 callersMethodget_group
Return information associated with a declared relation group. Args: group_name: a string naming a group Returns: The RelationGro
language/nql/nql/__init__.py:1275
↓ 4 callersFunctionget_ints_feature
(ex, name)
language/realm/example_generator.py:287
↓ 4 callersMethodget_lookup_table
Create the lookup table base on the vocabulary.
language/common/inputs/embedding_utils.py:131
↓ 4 callersFunctionget_positives_negatives
Computes metrics over precision and recall for a specific groups.
language/mentionmemory/tasks/ultra_fine_entity_typing_task.py:86
↓ 4 callersMethodget_rule_file
(self, partition, step_in_partition)
language/compgen/csl/induction/induction_utils.py:58
↓ 4 callersMethodget_vocab_id
Gets the vocab id of `key`.
language/canine/tydiqa/char_splitter.py:69
↓ 4 callersFunctioninput_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
language/labs/drkit/run_dualencoder_lsf.py:1588
↓ 4 callersMethodis_group
Test if the type is declared as a relation group. Args: group_name: a string possible naming a group Returns: boolean
language/nql/nql/__init__.py:1263
↓ 4 callersMethodis_trainable
Test if the relation has been declared as 'trainable'. Args: rel_name: a string naming a declared relation. Returns: a boolean
language/nql/nql/__init__.py:1198
↓ 4 callersMethodload_weights
Load model weights from file. Args: config: experiment config. Returns: Dictionary of model weights.
language/mentionmemory/tasks/base_task.py:168
↓ 4 callersFunctionmetric_fn
Collect metrics for function.
language/conpono/cpc/run_cpc.py:360
↓ 4 callersMethodmodel_fn_builder
Returns `model_fn` closure for TPUEstimator.
language/canine/tydiqa/tydi_modeling.py:92
↓ 4 callersMethodmost_common
(self, n=10)
language/gscan/xattn_model/dataset/preprocess.py:110
↓ 4 callersFunctionnon_zero_1d
Return positions of non-zero elements in the input 1D tensor.
language/mentionmemory/utils/mention_preprocess_utils.py:24
↓ 4 callersFunctionnormalize
Unicode normalize the wikipedia title. Args: wikipedia_url: The original title Returns: The unicode normalized title
language/serene/util.py:168
← previousnext →301–400 of 6,154, ranked by callers