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
↓ 6 callers
Function
_escape_md
Escapes special markdown characters in a string.
language/fruit/metrics.py:135
↓ 6 callers
Method
_generate_samples
Compile data and return an iterator over samples.
language/labs/consistent_zero_shot_nmt/data_generators/translate_multilingual.py:101
↓ 6 callers
Method
_generate_text_for_vocab
(self, data_dir, tmp_dir, datapath, parse_lines_fn)
language/labs/consistent_zero_shot_nmt/data_generators/translate_multilingual.py:123
↓ 6 callers
Function
_get_node_fingerprint
(node)
language/compgen/csl/model/data/forest_serialization.py:36
↓ 6 callers
Function
_is_nonterminal
(token)
language/compgen/csl/induction/unification_utils.py:221
↓ 6 callers
Method
_read_tsv
Reads a tab separated value file.
language/bert_extraction/steal_bert_classifier/models/run_classifier_distillation.py:205
↓ 6 callers
Function
_substitute
Replace nt in rhs_a with rhs_b, re-indexing non-terminals if needed.
language/compgen/nqg/model/induction/derivation_utils.py:29
↓ 6 callers
Function
apply_productions
(tree: state_tree.NQStateTree, productions: List[str])
language/search_agents/muzero/bert_state_lib_test.py:45
↓ 6 callers
Method
as_dataset
Returns a parsed and preprocessed `tf.data.Dataset`.
language/gscan/xattn_model/dataset/gscan_dataset.py:70
↓ 6 callers
Method
check_instances
(self, values, exp_values)
language/nql/nql/dataset_test.py:53
↓ 6 callers
Method
close
(self)
language/labs/drkit/run_dualencoder_lsf.py:2071
↓ 6 callers
Method
close
(self)
language/canine/tydiqa/tf_io.py:166
↓ 6 callers
Method
compute_tf_loss
Compute loss between logits and labels. Args: logits: batch_size, num_candidate labels: batch_size, num_candidate Returns:
language/emql/model.py:895
↓ 6 callers
Method
compute_transformer
Build the full text transformer.
language/capwap/utils/transformer_utils.py:181
↓ 6 callers
Method
convert_tokens_to_ids
Converts a list of string tokens to a list of vocab identifiers.
language/mentionmemory/utils/tokenization_utils.py:31
↓ 6 callers
Function
convert_tsv_to_json
convert data format for queries and filter queries without answers.
language/multivec/utils/convert_tsv_to_json.py:26
↓ 6 callers
Function
create_env
(max_history_entries: int)
language/search_agents/muzero/env_test.py:52
↓ 6 callers
Method
decode
Decodes the given serialized TF-example.
language/xsp/model/sequence_example_decoder.py:47
↓ 6 callers
Function
disambiguate
Disambiguates redirects.
language/fruit/beam_pipelines.py:208
↓ 6 callers
Method
filtered_by
Alias for weighted_by which makes more sense for 'hard' relationships. Args: rel_name: a string naming a declared KG relation related
language/nql/nql/__init__.py:358
↓ 6 callers
Method
from_json
(self, dictionary)
language/xsp/data_preprocessing/sql_utils.py:151
↓ 6 callers
Method
from_local
(cls, db_path)
language/serene/wiki_db.py:70
↓ 6 callers
Function
get_all_compounds
(examples, get_compounds_fn)
language/compgen/nqg/tasks/mcd_utils.py:130
↓ 6 callers
Method
get_definition
(self)
language/wino_dict/utils.py:168
↓ 6 callers
Method
get_labels
Gets the list of labels for this data set.
language/bert_extraction/steal_bert_classifier/models/run_classifier.py:200
↓ 6 callers
Method
get_page
Get the proto for the wikipedia page by url. Args: wikipedia_url: Url to lookup Returns: Returns proto of page if it exists, oth
language/serene/wiki_db.py:85
↓ 6 callers
Method
get_string_lookup_table
(self)
language/capwap/utils/text_utils.py:139
↓ 6 callers
Method
get_symbols
Return all the defined symbols in a list.
language/nql/nql/symbol.py:200
↓ 6 callers
Method
i2t
(self, index)
language/capwap/utils/text_utils.py:90
↓ 6 callers
Method
if_any
Alias for weighted_by_sum which makes more sense for 'hard' sets. Args: other: A NeuralQueryExpression Returns: A NeuralQueryExp
language/nql/nql/__init__.py:391
↓ 6 callers
Function
make_tokenizer
()
language/canine/tydiqa/tf_io_test.py:30
↓ 6 callers
Function
metric_max_over_ground_truths
(metric_fn, prediction, ground_truths)
language/bert_extraction/steal_bert_qa/utils/evaluate_squad.py:88
↓ 6 callers
Function
normalize_answer
Lower text and remove punctuation, articles and extra whitespace.
language/capwap/utils/metric_utils.py:175
↓ 6 callers
Function
pad_and_cut
(tensor, max_len_scalar)
language/conpono/cpc/run_cc_cpc.py:186
↓ 6 callers
Function
pad_and_cut
(tensor, max_len_scalar)
language/conpono/evals/run_record.py:160
↓ 6 callers
Function
pad_to_length
Pads a 1-D Tensor with zeros to the target length.
language/conpono/reconstruct/preprocess.py:325
↓ 6 callers
Method
placeholder
(array: np.ndarray)
language/mentionmemory/utils/mention_preprocess_utils_test.py:379
↓ 6 callers
Function
qps_data
Load queries per second data from output produced by scaling_eval.py. Args: filename: string name of file squarex: if true, square the x co
language/nql/demos/gridworld_scaling/plot_figure1.py:33
↓ 6 callers
Method
query_kg
Simple method to query the KG, mainly for debugging. Finds things related to the named entity_name by the named relation. When as_object is
language/nql/nql/__init__.py:1686
↓ 6 callers
Function
remove_element
Removes double square bracket elements from the text. This gets rid of things that otherwise look like entities, e.g.: remove_element(text, 'Fi
language/fruit/wiki_utils.py:95
↓ 6 callers
Function
shape
Gets the most specific dimension size(s) of the given tensor. This is a wrapper around the two ways to get the shape of a tensor: (1) t.get_shape
language/capwap/utils/tensor_utils.py:61
↓ 6 callers
Function
write_table_parent_format
(tables, output_path)
language/totto/prepare_references_for_eval.py:122
↓ 6 callers
Method
zero_state
(self, batch_size, dtype)
language/labs/exemplar_decoding/models/output_wrapper.py:109
↓ 5 callers
Method
_build_trie
(self, valid_words: ValidWords)
language/search_agents/muzero/env.py:809
↓ 5 callers
Method
_check_type_compatibility
Check if two types can be used with an operation. Args: type_name1: A string name for a type type_name2: A string name for a type
language/nql/nql/__init__.py:186
↓ 5 callers
Method
_compute_reward
( self, current_documents: List[environment_pb2.Document])
language/search_agents/muzero/env.py:761
↓ 5 callers
Function
_create_int_seq_feature
(values, padded_seq_length, padded_length)
language/compgen/csl/model/data/example_converter.py:47
↓ 5 callers
Function
_create_int_seq_feature
(length)
language/compgen/csl/model/training/input_utils.py:50
↓ 5 callers
Function
_datetup2int
Convert (year, month, day) to integer representation. Args: date: Tuple of (year, month, day). Returns: an int of year * 1e4 + month * 1
language/templama/templama.py:80
↓ 5 callers
Function
_debug_sql_item
(item)
language/xsp/data_preprocessing/sql_parsing.py:117
↓ 5 callers
Function
_flatten
(tensor)
language/mentionmemory/utils/mention_preprocess_utils.py:371
↓ 5 callers
Function
_format_parses
(parses)
language/compgen/csl/qcfg/qcfg_target_parser_test.py:22
↓ 5 callers
Method
_get_abs_path
Get absolute path.
language/totto/eval_pipeline_test.py:33
↓ 5 callers
Function
_get_arg
Gets the value of the specified function argument.
language/canine/tensor_contracts.py:872
↓ 5 callers
Method
_get_current_documents_list
(self, step: int)
language/search_agents/muzero/env.py:701
↓ 5 callers
Method
_get_length
Gets the number of tokens in a string.
language/fruit/rendering_utils.py:505
↓ 5 callers
Function
_get_node_string
Return string for RHS of node with non-terminals anonymized.
language/compgen/nqg/tasks/spider/tmcd_utils.py:31
↓ 5 callers
Method
_get_previous_documents_list
(self, step: int)
language/search_agents/muzero/env.py:708
↓ 5 callers
Function
_is_parenthesis
(item)
language/xsp/data_preprocessing/sql_parsing.py:53
↓ 5 callers
Function
_is_single_nt
(tokens)
language/compgen/csl/induction/unification_utils.py:29
↓ 5 callers
Function
_parse_identifier
Parse the part relative to an Identifier in the SQL query.
language/xsp/data_preprocessing/sql_parsing.py:504
↓ 5 callers
Function
_text_reader
Returns list of lines from the text file. Performs lowercasing and white-space tokenization on each line before returning. Slightly different tha
language/totto/totto_bleurt_eval.py:41
↓ 5 callers
Function
_text_reader
Returns list of lines from the text file. Performs lowercasing and white-space tokenization on each line before returning. Args: text_file
language/totto/totto_parent_eval.py:81
↓ 5 callers
Function
_to_ragged
(sp_tensor)
language/labs/drkit/model_fns.py:1298
↓ 5 callers
Method
asdict
(self)
language/serene/training.py:140
↓ 5 callers
Method
close
(self)
language/labs/drkit/hotpotqa/answer_extractor.py:1219
↓ 5 callers
Method
close
(self)
language/bert_extraction/steal_bert_qa/models/run_squad.py:1106
↓ 5 callers
Method
compute_application_scores
Compute application scores.
language/compgen/csl/model/inference/inference_wrapper.py:55
↓ 5 callers
Function
convert_examples_to_features
Loads a data file into a list of `InputBatch`s.
language/labs/drkit/input_fns.py:175
↓ 5 callers
Function
convert_examples_to_features
Loads a data file into a list of `InputBatch`s.
language/labs/drkit/run_dualencoder_lsf.py:713
↓ 5 callers
Function
create_int_feature
(values)
language/bert_extraction/steal_bert_classifier/models/run_classifier_membership.py:440
↓ 5 callers
Function
create_int_feature
(values)
language/bert_extraction/steal_bert_classifier/models/run_classifier.py:687
↓ 5 callers
Function
create_int_feature
(values)
language/conpono/evals/run_finetune_coherence.py:403
↓ 5 callers
Function
create_int_feature
(values)
language/conpono/evals/classifier_utils.py:714
↓ 5 callers
Function
create_int_feature
(values)
language/conpono/evals/run_classifier.py:594
↓ 5 callers
Function
create_int_feature
(values)
language/conpono/evals/run_concat_classifier.py:599
↓ 5 callers
Method
filter_distinct_objects
Filter distinct objects with filter function.
language/gscan/data/dataset.py:372
↓ 5 callers
Function
gather_beams
Gathers the beam slices indexed by beam_indices into new beam array. Args: nested: pytree of arrays or scalars (the latter ignored). beam_i
language/gscan/xattn_model/model/decode.py:80
↓ 5 callers
Function
get_aggregated_documents
(history_list: List[types.HistoryEntry])
language/search_agents/muzero/env.py:1038
↓ 5 callers
Method
get_aliases
Return aliases for given wikidata id.
language/labs/drkit/wikidata/preprocessing/distantly_supervise.py:179
↓ 5 callers
Function
get_candidate_text
Returns a text representation of the candidate at the given index.
language/question_answering/bert_joint/run_nq.py:329
↓ 5 callers
Method
get_from_key
Get entries based on full key.
language/compgen/nqg/common/cky/trie_utils.py:98
↓ 5 callers
Method
get_id
(self)
language/wino_dict/utils.py:188
↓ 5 callers
Method
get_initial_value
Return value that will be used to initialize a relation matrix. Args: rel_name: string name of relation Returns: A numpy matrix
language/nql/nql/__init__.py:1524
↓ 5 callers
Function
get_int64_feature
(value)
language/gscan/xattn_model/dataset/preprocess.py:280
↓ 5 callers
Method
get_num_memories
(self)
language/mentionmemory/tasks/memory_generation_task.py:263
↓ 5 callers
Method
get_sketch
Return a sketch for set xs (all zeros if xs not specified). This function takes a list of elements xs, take their hash values, and set 1.0 to
language/emql/cm_sketch.py:92
↓ 5 callers
Method
get_synonym
(self)
language/wino_dict/utils.py:172
↓ 5 callers
Method
get_tf_tensor
Get the Tensor that represents a relation. Args: rel_name: string naming a declared relation Returns: tf.SparseTensor Raise
language/nql/nql/__init__.py:1560
↓ 5 callers
Function
input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
language/labs/drkit/input_fns.py:224
↓ 5 callers
Method
is_relation
Test if the relation has been previously declared. Args: rel_name: a string naming a declared relation. Returns: a boolean
language/nql/nql/__init__.py:1240
↓ 5 callers
Function
layer_qry_encoder
Embed query into start and end vectors for dense retrieval for a hop.
language/labs/drkit/model_fns.py:689
↓ 5 callers
Method
make_test_dset
(self)
language/nql/nql/util_test.py:162
↓ 5 callers
Method
minibatch
(self, cell_names, typename)
language/nql/nql/nql_test.py:724
↓ 5 callers
Function
normalize_answer
Lower text and remove punctuation, articles and extra whitespace.
language/asqa/scoring.py:31
↓ 5 callers
Function
populate_sql
Creates a sequence of output / decoder actions from a raw SQL query. Args: sql: The SQL query to convert. example: The NLToSQLExample objec
language/xsp/data_preprocessing/sql_parsing.py:749
↓ 5 callers
Method
run_tf_evaluation
Compute evaluation metrics. Args: logits: batch_size, num_candidate labels: batch_size, num_candidate prefix: prefix for evalua
language/emql/model.py:1115
↓ 5 callers
Method
save
(self, filename)
language/compgen/csl/augment/qcfg_sampler.py:124
↓ 5 callers
Method
setUp
(self)
language/nql/nql/nql_test.py:128
↓ 5 callers
Method
set_initial_value
Provide value that will be used to initialize a relation matrix. Args: rel_name: string name of relation m: a matrix that can used as
language/nql/nql/__init__.py:1536
← previous
next →
201–300 of 6,154, ranked by callers