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
↓ 12 callers
Function
create_document
(content: str, mr_score: float, answer: str = None)
language/search_agents/muzero/env_test.py:44
↓ 12 callers
Function
create_int_feature
(values)
language/conpono/evals/race_utils.py:258
↓ 12 callers
Method
extend_type
Provide a list of additional instances of a type. If the type doesn't previously exist it will be defined. Args: type_name: string nam
language/nql/nql/__init__.py:1287
↓ 12 callers
Function
get_avg
(l)
language/decontext/eval_util.py:38
↓ 12 callers
Method
get_id
Get the numeric id of a symbol. This assumes that either the symbol has been inserted in the past - ie that self.has_id(symbol) succeeds - or
language/nql/nql/symbol.py:167
↓ 12 callers
Function
get_rnn_cell
Construct RNN cells. Args: mode: train or eval. Keys from tf.estimator.ModeKeys. hps: Hyperparameters. input_dim: input size. num_u
language/labs/exemplar_decoding/models/common.py:33
↓ 12 callers
Method
make_preprocess_fn
Produces function to preprocess samples. Tasks should be aware of what type of input they require and are responsible for creating these inpu
language/mentionmemory/tasks/base_task.py:102
↓ 12 callers
Method
predict
Run prediction.
language/canine/tydiqa/run_tydi_lib.py:200
↓ 12 callers
Method
read_examples
Read a json file into a list of Example.
language/labs/drkit/input_fns.py:313
↓ 12 callers
Method
simple_entity_encode_op
Wrapper to encode a single entity into its EmQL representation.
language/emql/model.py:946
↓ 11 callers
Method
as_string
Return a string based on x.id or x.id[x.name].
language/templama/sling2facts.py:370
↓ 11 callers
Function
bytes_feature
(value)
language/capwap/utils/io_utils.py:51
↓ 11 callers
Method
create_model
(self, seed=None)
language/canine/modeling_test.py:61
↓ 11 callers
Method
freeze
Prevent further additions to the symbol table. After a table is frozen, subsequent calls to insert() will not change the table, and calls to
language/nql/nql/symbol.py:55
↓ 11 callers
Function
get_shape_list
Returns a list of the shape of tensor, preferring static dimensions. Args: tensor: A tf.Tensor object to find the shape of. expected_rank:
language/canine/bert_modeling.py:956
↓ 11 callers
Method
load_kg
Load knowledge graph data from a files or lines of strings. Each line in the file is tab-separated with fields rel_name head tail [confide
language/nql/nql/__init__.py:1373
↓ 11 callers
Method
tokenize
Convert text to word pieces.
language/capwap/utils/text_utils.py:93
↓ 10 callers
Method
_logging_info
(self, prefix, *args, **kwargs)
language/search_agents/muzero/env.py:293
↓ 10 callers
Method
_vec2cell
(self, onehot_vec)
language/nql/nql/nql_test.py:506
↓ 10 callers
Method
contain
Check if the sketch contains x. Args: sketch: sketch to add xs to x: name or id in string Returns: True or False
language/emql/cm_sketch.py:139
↓ 10 callers
Function
create_initializer
Creates a `truncated_normal_initializer` with the given range.
language/canine/bert_modeling.py:395
↓ 10 callers
Method
forward
( self, batch: Dict[str, Array], deterministic: bool, )
language/mentionmemory/encoders/eae_encoder.py:156
↓ 10 callers
Method
get_pooled_output
Gets a single sequence representation for classification.
language/canine/modeling.py:621
↓ 10 callers
Method
get_tokenizer
(self)
language/canine/tydiqa/run_tydi_lib.py:367
↓ 10 callers
Method
is_dense
Test if the relation has been declared as 'dense'. Args: rel_name: a string naming a declared relation. Returns: a boolean
language/nql/nql/__init__.py:1209
↓ 10 callers
Method
make_loss_fn
Creates task loss function. See BaseTask. EaE is pre-trained with a combination of 1) MLM loss, 2) entity-linking loss comparing mention
language/mentionmemory/tasks/eae_task.py:73
↓ 10 callers
Method
map_fn
(text, wikipedia_url, sentence_id)
language/serene/training.py:654
↓ 10 callers
Function
tokenize
(start, end)
language/relation_learning/data/fewrel.py:41
↓ 10 callers
Method
tokenize
(self, text)
language/serene/tokenizers.py:26
↓ 9 callers
Method
__init__
(self, l_ind=0, r_inds=(0, 0))
language/gscan/data/grammar.py:227
↓ 9 callers
Function
_get_node_fingerprint
(node)
language/compgen/nqg/model/parser/data/forest_serialization.py:36
↓ 9 callers
Function
_is_identifier
(item)
language/xsp/data_preprocessing/sql_parsing.py:45
↓ 9 callers
Method
assertCreateTfexampleFnResult
Checks the results of running `CreateTFExampleFn.process`. Args: entry: The output of `preproc.create_entry_from_json`. creator_fn: T
language/canine/tydiqa/tf_io_test.py:220
↓ 9 callers
Method
convert
Takes the retrieval results of an example and yields seq2seq examples. Args: example: a RawExample. Yields: AugmentedExample, on
language/casper/augment/casper_converters.py:165
↓ 9 callers
Method
from_string
(cls, rule_string)
language/compgen/nqg/model/parser/inference/targets/target_grammar.py:56
↓ 9 callers
Method
get_estimator
Creates the TPUEstimator object.
language/canine/tydiqa/run_tydi_lib.py:171
↓ 9 callers
Function
get_resplit_path
(name, split)
language/orqa/preprocessing/create_data_splits.py:36
↓ 9 callers
Method
load
Load vocabulary.
language/gscan/xattn_model/dataset/preprocess.py:130
↓ 9 callers
Function
loss_fn
(params)
language/gscan/xattn_model/train.py:50
↓ 9 callers
Function
make_int64_feature
(v)
language/question_answering/b2t2/compute_vcr_features.py:87
↓ 9 callers
Method
make_output_postprocess_fn
Produces function to postprocess task samples (input and output). The method is occasionally called during training or evaluation to save mod
language/mentionmemory/tasks/base_task.py:180
↓ 9 callers
Method
one_hot_numpy_array
A one-hot 1-by-N matrix encoding this entity. Args: entity_name: a string naming an entity. type_name: the string type name of the na
language/nql/nql/__init__.py:902
↓ 9 callers
Function
pad_and_cut
(tensor, max_len_scalar)
language/conpono/cpc/run_bilin_cpc.py:192
↓ 9 callers
Function
resplit_data
Resplit a dataset of jsonlines with QA pairs.
language/orqa/preprocessing/create_data_splits.py:41
↓ 9 callers
Method
weighted_by
Weight elements in set by confidence in some relationship holding. Specifically, weight all elements x in a set by the confidence given to th
language/nql/nql/__init__.py:329
↓ 8 callers
Method
_get_builder
(self, **kwargs)
language/fruit/rendering_utils_test.py:160
↓ 8 callers
Method
_obs
(self)
language/search_agents/muzero/env.py:350
↓ 8 callers
Method
_orthogonal_init
(self, shape, initializer, dtype=tf.float32, redundant_rank=Fals
language/labs/exemplar_decoding/models/hyperlstm.py:285
↓ 8 callers
Method
_read_tsv
Reads a tab separated value file.
language/bert_extraction/steal_bert_classifier/models/run_classifier_membership.py:205
↓ 8 callers
Function
aggregate_sparse_indices
Sums values corresponding to repeated indices. Returns the unique indices and their summed values. Args: indices: [num_nnz, rank] Tensor.
language/labs/drkit/model_fns.py:168
↓ 8 callers
Function
base_lm
Adds base hparams for LM.
language/labs/consistent_zero_shot_nmt/models/agreement.py:552
↓ 8 callers
Method
build_context
Create a new NeuralQueryContext and configure it. Args: context_factory: factory to construct the NQL context gpus: number of gpus av
language/nql/nql/util.py:134
↓ 8 callers
Method
close
(self)
language/labs/drkit/input_fns.py:140
↓ 8 callers
Method
convert_ids_to_tokens
(self, ids)
language/serene/tokenizers.py:191
↓ 8 callers
Method
convert_to_cfg_rule
Convert symbol strings to CFGRule. Args: lhs: String symbol for LHS. rhs: List of string symbols for RHS. rule_idx: Integer ind
language/compgen/csl/cky/cfg_converter.py:40
↓ 8 callers
Method
from_dict
Constructs a ConverterConfig from the given dict.
language/casper/augment/casper_converters.py:66
↓ 8 callers
Method
get_relation_names
All declared relations. Returns: an list of string relation names.
language/nql/nql/__init__.py:1160
↓ 8 callers
Method
is_type
Test if the type has been previously declared. Args: type_name: a string naming a declared type. Returns: boolean
language/nql/nql/__init__.py:1251
↓ 8 callers
Function
normalize_answer
Lower text and remove punctuation, articles and extra whitespace.
language/search_agents/muzero/utils.py:34
↓ 8 callers
Function
pipeline
(root)
language/fruit/beam_pipelines.py:81
↓ 8 callers
Method
production_to_action
(self, production: nltk.Production)
language/search_agents/muzero/state_tree.py:165
↓ 8 callers
Function
render_all
Render an iterable of renderable objects. Arguments: renderables: An iterable of renderable objects. sep: The seperator. Returns: Th
language/fruit/rendering_utils.py:66
↓ 8 callers
Function
save_sharded_array
Save numpy array into multiple shards. Input array will be divided and saved into files with names "prefix-X-of-num_shards", where `X` is in [off
language/mentionmemory/utils/data_utils.py:366
↓ 8 callers
Method
score
Return the score for each candidate, order does not change. Args: claim: The claim to match candidates: The candidates to rank
language/serene/text_matcher.py:59
↓ 8 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/labs/exemplar_decoding/utils/tensor_utils.py:88
↓ 8 callers
Method
tokenize
Tokenizes a string (in raw bytes) return a list of string tokens.
language/mentionmemory/utils/tokenization_utils.py:42
↓ 7 callers
Function
_assert_array_is_integer_or_none
(array: Optional[Array], array_name: str)
language/mentionmemory/modules/memory_attention_layer.py:28
↓ 7 callers
Function
_get_non_terminals
Return set of non-terminal symbols in `rhs`.
language/compgen/csl/induction/unification_utils.py:33
↓ 7 callers
Function
_safe_divide
(x, y)
language/labs/exemplar_decoding/utils/rouge_utils.py:26
↓ 7 callers
Method
_tabify
(self, lines)
language/nql/nql/nql_test.py:134
↓ 7 callers
Function
_template_strategy
(template1: str, template2: str, example: WinoDictExample)
language/wino_dict/utils.py:659
↓ 7 callers
Method
_test_restrict_filtering
Test restrict behavior on types written and read through tempfile. Args: input_types: A list of the types to start with. restrict_wri
language/nql/nql/io_test.py:132
↓ 7 callers
Method
construct_relation_group
Declare a group of relations. This must be called after all the triples for all the relations in the group have already been defined. A
language/nql/nql/__init__.py:1027
↓ 7 callers
Function
create_int_feature
(values)
language/conpono/cpc/preproc/preprocessing_utils.py:102
↓ 7 callers
Function
create_int_feature
(values)
language/conpono/create_pretrain_data/preprocessing_utils.py:94
↓ 7 callers
Function
create_int_feature
(values)
language/capwap/synthetic/generate_questions.py:546
↓ 7 callers
Function
dimension_value
(dimension)
language/labs/exemplar_decoding/models/common.py:28
↓ 7 callers
Method
finished_query
(self)
language/search_agents/muzero/state_tree.py:264
↓ 7 callers
Method
get_config
(self)
language/serene/layers.py:200
↓ 7 callers
Method
get_embedding_table
(self)
language/canine/bert_modeling.py:280
↓ 7 callers
Method
get_final_document_list
Returns the final documents for the current step. Returns: List of documents at the end of an episode.
language/search_agents/muzero/env.py:518
↓ 7 callers
Method
get_sequence_output
Gets a sequence representation, one position per character.
language/canine/modeling.py:613
↓ 7 callers
Function
get_table
(table_path)
language/multivec/preprocessing/create_training_data.py:266
↓ 7 callers
Function
get_updated_default_flags
(**kwargs)
language/search_agents/muzero/env_test.py:36
↓ 7 callers
Function
has_tag
Detects whether an XML element has the given tag.
language/fruit/wiki_utils.py:88
↓ 7 callers
Method
is_complete
(self)
language/search_agents/muzero/state_tree.py:258
↓ 7 callers
Method
legal_actions
Return only rules having the to-be-expanded non-terminal as lhs.
language/search_agents/muzero/state_tree.py:279
↓ 7 callers
Function
linear_transform
Simple linear transform of x. Args: x: <float>[batch_size, length, input_size] output_size: Integer specifying output size. scope: Stri
language/xsp/model/common_layers.py:79
↓ 7 callers
Method
make_train_dset
(self, num_epochs)
language/nql/nql/util_test.py:151
↓ 7 callers
Function
make_valid_word_actions
( word_actions: Collection[int])
language/search_agents/muzero/state_tree_test.py:49
↓ 7 callers
Function
new_valid_words
()
language/search_agents/muzero/env.py:74
↓ 7 callers
Function
postprocess_fn
Filter invalid nodes.
language/compgen/csl/qcfg/qcfg_target_parser.py:139
↓ 7 callers
Method
predict
Runs a prediction on a set of features. Calling multiple times does *not* regenerate the graph which makes predict much faster. Args:
language/labs/drkit/bert_utils.py:98
↓ 7 callers
Method
process
Converts TyDi entries into serialized tf examples. Args: entry: "TyDi entries", dicts as returned by `create_entry_from_json`. errors
language/canine/tydiqa/tf_io.py:183
↓ 7 callers
Method
to_json
(self)
language/xsp/data_preprocessing/sql_utils.py:148
↓ 7 callers
Function
unwrap_tensor
(tensor)
language/serene/callbacks.py:43
↓ 6 callers
Method
__init__
(self, hidden_dim, name = None, **kwargs)
language/serene/layers.py:168
↓ 6 callers
Function
_add_simple_value
Adds a value action to the output. Args: item: A string value present in the SQL query. example: The NLToSQLExample being constructed.
language/xsp/data_preprocessing/sql_parsing.py:394
↓ 6 callers
Method
_as_dict
(self, vec, type_name)
language/nql/nql/nql_test.py:386
↓ 6 callers
Method
_encode_and_batch
Convert a tensorflow dataset of unbatched, text examples to TF batches. Args: dataset: TF Dataset to transform train: Whether to enco
language/serene/training.py:346
← previous
next →
101–200 of 6,154, ranked by callers