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
↓ 2 callers
Function
_compute_softmax
Compute softmax probability over raw logits.
language/labs/drkit/hotpotqa/answer_extractor.py:1157
↓ 2 callers
Function
_compute_word_overlap
Compute word overlap between question and context ids. Args: context_ids: <int32> [batch_size, num_contexts, max_context_len] context_len:
language/question_answering/decatt_docreader/models/nq_long_decatt_model.py:56
↓ 2 callers
Function
_contains_atom
Returns True if example contains any atom in atoms.
language/compgen/nqg/tasks/mcd_utils.py:365
↓ 2 callers
Function
_convert_question
(item, inverse=False)
language/labs/drkit/hotpotqa/preprocessing/convert_wikidata_to_mrqa.py:47
↓ 2 callers
Method
_convert_source_sentences
Converts source text to sentence renderables.
language/fruit/rendering_utils.py:424
↓ 2 callers
Method
_convert_target_sentences
Converts target text to sentence renderables.
language/fruit/rendering_utils.py:445
↓ 2 callers
Method
_convert_to_evidence
Converts annotated mentions to evidence renderables.
language/fruit/rendering_utils.py:402
↓ 2 callers
Function
_do_lower_case
(t)
language/orqa/utils/bert_utils.py:71
↓ 2 callers
Function
_edge_vectors_attention_inner
Edge vector attention inner calculation. Args: x: <float>[batch_size, heads, length, length or emb_size]. y: <float>[batch_size, heads, len
language/xsp/model/common_layers.py:224
↓ 2 callers
Function
_embed
Embed the input text based and word and character IDs.
language/question_answering/decatt_docreader/models/nq_short_pipeline_model.py:82
↓ 2 callers
Function
_equal_modulo_nt_idx
(tuple_a, tuple_b)
language/compgen/csl/induction/unification_utils.py:105
↓ 2 callers
Function
_example_to_rule
Convert (source, target) example to a QCFGRule.
language/compgen/nqg/model/induction/induction_utils.py:229
↓ 2 callers
Method
_expand_node
(self, production: nltk.Production)
language/search_agents/muzero/state_tree.py:345
↓ 2 callers
Function
_feed_forward
(output_dims, hidden_dims, name)
language/compgen/nqg/model/parser/nqg_model.py:38
↓ 2 callers
Method
_filename
(cls, filename_prefix)
language/serene/preprocessing.py:304
↓ 2 callers
Function
_find_all_entities
Tries to find schema entities that match the token.
language/xsp/data_preprocessing/sql_parsing.py:151
↓ 2 callers
Function
_find_column_entities
(token, example, table)
language/xsp/data_preprocessing/sql_parsing.py:220
↓ 2 callers
Method
_find_node_to_expand
Finds the next node in the tree that is not yet fully expanded.
language/search_agents/muzero/state_tree.py:254
↓ 2 callers
Function
_find_simple_entity
Finds entities in the schema that a token may be referring to.
language/xsp/data_preprocessing/sql_parsing.py:179
↓ 2 callers
Function
_find_valid_cands
(curr_step)
language/conpono/evals/run_classifier.py:1046
↓ 2 callers
Function
_find_valid_cands
(curr_step)
language/conpono/evals/run_multichoice.py:403
↓ 2 callers
Function
_find_valid_cands
(curr_step)
language/conpono/evals/run_concat_classifier.py:1162
↓ 2 callers
Function
_find_valid_cands
(curr_step)
language/conpono/evals/run_race_sp_eval_all.py:309
↓ 2 callers
Function
_get_all_facts
Read all facts in inference chains.
language/labs/drkit/metaqa/preprocessing/distantly_supervise.py:72
↓ 2 callers
Function
_get_answer_row
(example: WinoDictExample, answer_idx: int)
language/wino_dict/utils.py:565
↓ 2 callers
Function
_get_atoms_below_count
Return set of atoms that appear <= atom_count times across all examples.
language/compgen/nqg/tasks/mcd_utils.py:392
↓ 2 callers
Function
_get_atoms_to_count
Return map of atom to count of examples containing atom.
language/compgen/nqg/tasks/mcd_utils.py:374
↓ 2 callers
Function
_get_batch_size
(model_config, params, use_tpu)
language/xsp/model/input_pipeline.py:311
↓ 2 callers
Function
_get_bert_embeddings
Extract embeddings from BERT model.
language/labs/drkit/run_dualencoder_qa.py:337
↓ 2 callers
Function
_get_bert_embeddings
Extract embeddings from BERT model.
language/labs/drkit/run_dualencoder_lsf.py:1077
↓ 2 callers
Function
_get_best_indexes
Get the n-best logits from a list.
language/labs/drkit/run_dualencoder_qa.py:1052
↓ 2 callers
Function
_get_best_indexes
Get the n-best logits from a list.
language/labs/drkit/run_dualencoder_lsf.py:1984
↓ 2 callers
Function
_get_best_indexes
Get the n-best logits from a list.
language/labs/drkit/hotpotqa/answer_extractor.py:1145
↓ 2 callers
Function
_get_best_indexes
Get the n-best logits from a list.
language/labs/drkit/hotpotqa/demo.py:364
↓ 2 callers
Function
_get_best_indexes
Get the n-best logits from a list.
language/bert_extraction/steal_bert_qa/models/run_squad.py:1036
↓ 2 callers
Function
_get_best_indexes
Get the n-best logits from a list.
language/conpono/evals/run_squad.py:1023
↓ 2 callers
Function
_get_frame
Returns the frame string describing all intent and slot labels.
language/casper/evaluate/evaluate_retrieval.py:48
↓ 2 callers
Function
_get_function_and_line
Gets the function and line number of the caller according to `stack`.
language/canine/tensor_contracts.py:1043
↓ 2 callers
Method
_get_generatable_entity_ids
Gets set of generatable entity ids.
language/fruit/rendering_utils.py:472
↓ 2 callers
Method
_get_generatable_surfaces
Retrieves surfaces for generatable entities.
language/fruit/rendering_utils.py:484
↓ 2 callers
Method
_get_gold_examples
Create gold examples and seed the example dictionary with them. Args: claim_json: The json of the claim from fever dataset scrape_typ
language/serene/fever_tfds.py:218
↓ 2 callers
Function
_get_heuristic_col_headers
Heuristic to find column headers.
language/totto/baseline_preprocessing/preprocess_utils.py:46
↓ 2 callers
Function
_get_heuristic_row_headers
Heuristic to find row headers.
language/totto/baseline_preprocessing/preprocess_utils.py:36
↓ 2 callers
Method
_get_insert_id_if_unfrozen
Retrieve the index of entity with given name and type. Insert the entity in the appropriate symbol table if both: 1. It has not already bee
language/nql/nql/__init__.py:1604
↓ 2 callers
Function
_get_intent
Returns the top intent label.
language/casper/evaluate/evaluate_retrieval.py:56
↓ 2 callers
Function
_get_labels
Returns the set of all intent and slot labels.
language/casper/evaluate/evaluate_retrieval.py:61
↓ 2 callers
Method
_get_my_args
Helper function for check`, which extracts function args.
language/canine/tensor_contracts.py:692
↓ 2 callers
Function
_get_named_dims
Resolves `NamedDim`s to actual dimension (static or dynamic).
language/canine/tensor_contracts.py:1051
↓ 2 callers
Function
_get_ngrams
Calculates n-grams. Args: n: which n-grams to calculate text: An array of tokens Returns: A set of n-grams
language/labs/exemplar_decoding/utils/rouge_utils.py:100
↓ 2 callers
Method
_get_nonterminal_id
(self, symbol)
language/compgen/csl/cky/cfg_converter.py:35
↓ 2 callers
Method
_get_rule_penalty
Computes the penalty for a given rule.
language/compgen/csl/induction/objective_utils.py:121
↓ 2 callers
Method
_get_rule_size
Computes the size for a given rule.
language/compgen/csl/induction/objective_utils.py:115
↓ 2 callers
Function
_get_sequence_decoder
Returns a TFSequenceExampleDecoder for decoding input format.
language/xsp/model/input_pipeline.py:114
↓ 2 callers
Function
_get_sql_column
Returns SqlColumn tuple for the given column_token string.
language/xsp/data_preprocessing/abstract_sql.py:201
↓ 2 callers
Function
_get_swap_idx
Returns an example based on a constraint over atoms. If `contains` is True, returns an example in `examples` that contains any atom in `atoms`.
language/compgen/nqg/tasks/mcd_utils.py:290
↓ 2 callers
Function
_get_tensor_shape
Gets actual shape of a Tensor: `int`s for static; `Tensor` for dynamic.
language/canine/tensor_contracts.py:975
↓ 2 callers
Method
_get_test_data_path
(self, file_name)
language/mentionmemory/tasks/ultra_fine_entity_typing_task_test.py:40
↓ 2 callers
Method
_get_test_data_path
(self, file_name)
language/mentionmemory/tasks/relation_classifier_task_test.py:40
↓ 2 callers
Function
_get_tokens
Split the string into tokens. Args: s: string to be split Returns: list of tokens
language/asqa/scoring.py:214
↓ 2 callers
Function
_has_balanced_parens
Returns True if all '(' precede and are followed by a correspoding ')'.
language/compgen/nqg/model/induction/induction_utils.py:67
↓ 2 callers
Function
_highlight
(haystack: str, needle: str)
language/wino_dict/utils.py:579
↓ 2 callers
Function
_ignore_pad
Use mean of symbol embeddings as overall embedding but ignore PAD.
language/xsp/model/embeddings.py:53
↓ 2 callers
Function
_improve_answer_span
Returns tokenized answer spans that better match the annotated answer.
language/labs/drkit/run_dualencoder_lsf.py:1003
↓ 2 callers
Function
_in_matched_range
Return True if provided indices overlap any spans in matched_ranges.
language/compgen/csl/tasks/exact_match_utils.py:20
↓ 2 callers
Function
_in_matched_range
Return True if provided indices overlap any spans in matched_ranges.
language/compgen/nqg/model/induction/exact_match_utils.py:20
↓ 2 callers
Function
_inner_logits
Returns logits computed using inner product of qry and embeddings.
language/labs/drkit/run_dualencoder_qa.py:428
↓ 2 callers
Function
_int64_feature
(value)
language/question_answering/decatt_docreader/preprocessing/create_nq_short_pipeline_examples.py:39
↓ 2 callers
Method
_inverse_rel
(self, rel)
language/emql/data_loader.py:1227
↓ 2 callers
Function
_is_comparison_operator
(item)
language/xsp/data_preprocessing/sql_parsing.py:93
↓ 2 callers
Function
_is_integer
(item)
language/xsp/data_preprocessing/sql_parsing.py:104
↓ 2 callers
Function
_is_order
(item)
language/xsp/data_preprocessing/sql_parsing.py:81
↓ 2 callers
Function
_is_table_mention
Returns True if current_token represents a table.
language/xsp/data_preprocessing/abstract_sql.py:157
↓ 2 callers
Function
_is_underspecified_table_mention
Returns True if current_token represents a table.
language/xsp/data_preprocessing/abstract_sql.py:149
↓ 2 callers
Method
_json_entry_to_example
Converts FewRel entry (candidate or query) into RelationInputExample.
language/relation_learning/data/fewrel.py:117
↓ 2 callers
Function
_load_examples
Loads raw examples from original data file.
language/compir/utils/io_utils.py:24
↓ 2 callers
Function
_load_json
(filename)
language/xsp/data_preprocessing/abstract_sql_main.py:59
↓ 2 callers
Function
_load_json
(filename)
language/xsp/data_preprocessing/compute_asql_coverage_spider.py:44
↓ 2 callers
Function
_load_json
(filepath)
language/xsp/evaluation/restore_from_asql.py:30
↓ 2 callers
Function
_luong_score
Implements Luong-style (multiplicative) scoring function. This attention has two forms. The first is standard Luong attention, as described in:
language/labs/exemplar_decoding/models/attention.py:248
↓ 2 callers
Function
_make_position_embedding_table
(scope)
language/question_answering/b2t2/run_b2t2.py:304
↓ 2 callers
Function
_make_rpc_op
Makes RPC calls to a server.
language/realm/preprocessing.py:97
↓ 2 callers
Function
_make_rule
Canoncalize NT indexes and return QCFGRule.
language/compgen/csl/induction/unification_utils.py:70
↓ 2 callers
Function
_make_rule
Canoncalize NT indexes and return QCFGRule.
language/compgen/nqg/model/induction/split_utils.py:54
↓ 2 callers
Function
_ngram_counts
Returns count of all ngrams of given order in sequence.
language/table_text_eval/table_text_eval.py:297
↓ 2 callers
Function
_ngram_counts
Returns count of all ngrams of given order in sequence.
language/totto/totto_parent_eval.py:277
↓ 2 callers
Function
_normalize_and_get_label
Helper method to compute label of diff detection. Args: paired_anno: Predicted and gold annotation to compute label of. Returns: Label o
language/diffqg/metrics.py:124
↓ 2 callers
Function
_normalize_spaces
(sentence: str)
language/wino_dict/utils.py:284
↓ 2 callers
Function
_normalize_text
(s)
language/totto/totto_parent_eval.py:75
↓ 2 callers
Function
_one_hot_tensor_3d
One-hot encodes a 2d Tensor in a 3d Tensor. This could potentially be implemented in a simpler way using tf.pad but this method is compatible wit
language/xsp/model/beam_search.py:31
↓ 2 callers
Function
_parse_comparison
Parse the part relative to a comparison in the SQL query.
language/xsp/data_preprocessing/sql_parsing.py:623
↓ 2 callers
Function
_parse_identifier_list
Parse the part relative to an IdentifierList in the SQL query.
language/xsp/data_preprocessing/sql_parsing.py:588
↓ 2 callers
Function
_parse_lines
Parses lines from IWSLT17 dataset.
language/labs/consistent_zero_shot_nmt/scripts/identify_overlap_iwslt17.py:61
↓ 2 callers
Function
_parse_lines
Parses lines from UNCorpus dataset.
language/labs/consistent_zero_shot_nmt/scripts/identify_overlap_europarl.py:57
↓ 2 callers
Function
_parse_lines
Parses lines from UNCorpus dataset.
language/labs/consistent_zero_shot_nmt/data_generators/translate_uncorpus.py:185
↓ 2 callers
Function
_parse_vector
(vector)
language/gscan/xattn_model/dataset/preprocess.py:230
↓ 2 callers
Function
_populate_spans_for_statement
Populates sql_spans for list of tokens representing a SQL statement.
language/xsp/data_preprocessing/abstract_sql.py:320
↓ 2 callers
Function
_prepare_attention_inputs
Prepare multi-head attention inputs. Args: query_antecedent: <float>[batch_size, query_length, query_input_size] memory_antecedent: <float>
language/xsp/model/common_layers.py:196
↓ 2 callers
Function
_preprocess_line
Tokenize, link and lower-case.
language/labs/drkit/metaqa/preprocessing/process_wiki.py:74
↓ 2 callers
Function
_read_annotations
Reads annotations from a file in either the gold or predicted format. Args: diffqg_fi: Path to the input file. Returns: Dictionary mappi
language/diffqg/annotation.py:92
↓ 2 callers
Function
_read_jsonl
Yields entries from the JSONL file.
language/casper/evaluate/evaluate_retrieval.py:41
← previous
next →
701–800 of 6,154, ranked by callers