MCPcopy Create free account

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

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

↓ 12 callersFunctioncreate_document
(content: str, mr_score: float, answer: str = None)
language/search_agents/muzero/env_test.py:44
↓ 12 callersFunctioncreate_int_feature
(values)
language/conpono/evals/race_utils.py:258
↓ 12 callersMethodextend_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 callersFunctionget_avg
(l)
language/decontext/eval_util.py:38
↓ 12 callersMethodget_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 callersFunctionget_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 callersMethodmake_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 callersMethodpredict
Run prediction.
language/canine/tydiqa/run_tydi_lib.py:200
↓ 12 callersMethodread_examples
Read a json file into a list of Example.
language/labs/drkit/input_fns.py:313
↓ 12 callersMethodsimple_entity_encode_op
Wrapper to encode a single entity into its EmQL representation.
language/emql/model.py:946
↓ 11 callersMethodas_string
Return a string based on x.id or x.id[x.name].
language/templama/sling2facts.py:370
↓ 11 callersFunctionbytes_feature
(value)
language/capwap/utils/io_utils.py:51
↓ 11 callersMethodcreate_model
(self, seed=None)
language/canine/modeling_test.py:61
↓ 11 callersMethodfreeze
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 callersFunctionget_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 callersMethodload_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 callersMethodtokenize
Convert text to word pieces.
language/capwap/utils/text_utils.py:93
↓ 10 callersMethod_logging_info
(self, prefix, *args, **kwargs)
language/search_agents/muzero/env.py:293
↓ 10 callersMethod_vec2cell
(self, onehot_vec)
language/nql/nql/nql_test.py:506
↓ 10 callersMethodcontain
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 callersFunctioncreate_initializer
Creates a `truncated_normal_initializer` with the given range.
language/canine/bert_modeling.py:395
↓ 10 callersMethodforward
( self, batch: Dict[str, Array], deterministic: bool, )
language/mentionmemory/encoders/eae_encoder.py:156
↓ 10 callersMethodget_pooled_output
Gets a single sequence representation for classification.
language/canine/modeling.py:621
↓ 10 callersMethodget_tokenizer
(self)
language/canine/tydiqa/run_tydi_lib.py:367
↓ 10 callersMethodis_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 callersMethodmake_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 callersMethodmap_fn
(text, wikipedia_url, sentence_id)
language/serene/training.py:654
↓ 10 callersFunctiontokenize
(start, end)
language/relation_learning/data/fewrel.py:41
↓ 10 callersMethodtokenize
(self, text)
language/serene/tokenizers.py:26
↓ 9 callersMethod__init__
(self, l_ind=0, r_inds=(0, 0))
language/gscan/data/grammar.py:227
↓ 9 callersFunction_get_node_fingerprint
(node)
language/compgen/nqg/model/parser/data/forest_serialization.py:36
↓ 9 callersFunction_is_identifier
(item)
language/xsp/data_preprocessing/sql_parsing.py:45
↓ 9 callersMethodassertCreateTfexampleFnResult
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 callersMethodconvert
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 callersMethodfrom_string
(cls, rule_string)
language/compgen/nqg/model/parser/inference/targets/target_grammar.py:56
↓ 9 callersMethodget_estimator
Creates the TPUEstimator object.
language/canine/tydiqa/run_tydi_lib.py:171
↓ 9 callersFunctionget_resplit_path
(name, split)
language/orqa/preprocessing/create_data_splits.py:36
↓ 9 callersMethodload
Load vocabulary.
language/gscan/xattn_model/dataset/preprocess.py:130
↓ 9 callersFunctionloss_fn
(params)
language/gscan/xattn_model/train.py:50
↓ 9 callersFunctionmake_int64_feature
(v)
language/question_answering/b2t2/compute_vcr_features.py:87
↓ 9 callersMethodmake_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 callersMethodone_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 callersFunctionpad_and_cut
(tensor, max_len_scalar)
language/conpono/cpc/run_bilin_cpc.py:192
↓ 9 callersFunctionresplit_data
Resplit a dataset of jsonlines with QA pairs.
language/orqa/preprocessing/create_data_splits.py:41
↓ 9 callersMethodweighted_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 callersMethod_get_builder
(self, **kwargs)
language/fruit/rendering_utils_test.py:160
↓ 8 callersMethod_obs
(self)
language/search_agents/muzero/env.py:350
↓ 8 callersMethod_orthogonal_init
(self, shape, initializer, dtype=tf.float32, redundant_rank=Fals
language/labs/exemplar_decoding/models/hyperlstm.py:285
↓ 8 callersMethod_read_tsv
Reads a tab separated value file.
language/bert_extraction/steal_bert_classifier/models/run_classifier_membership.py:205
↓ 8 callersFunctionaggregate_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 callersFunctionbase_lm
Adds base hparams for LM.
language/labs/consistent_zero_shot_nmt/models/agreement.py:552
↓ 8 callersMethodbuild_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 callersMethodclose
(self)
language/labs/drkit/input_fns.py:140
↓ 8 callersMethodconvert_ids_to_tokens
(self, ids)
language/serene/tokenizers.py:191
↓ 8 callersMethodconvert_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 callersMethodfrom_dict
Constructs a ConverterConfig from the given dict.
language/casper/augment/casper_converters.py:66
↓ 8 callersMethodget_relation_names
All declared relations. Returns: an list of string relation names.
language/nql/nql/__init__.py:1160
↓ 8 callersMethodis_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 callersFunctionnormalize_answer
Lower text and remove punctuation, articles and extra whitespace.
language/search_agents/muzero/utils.py:34
↓ 8 callersFunctionpipeline
(root)
language/fruit/beam_pipelines.py:81
↓ 8 callersMethodproduction_to_action
(self, production: nltk.Production)
language/search_agents/muzero/state_tree.py:165
↓ 8 callersFunctionrender_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 callersFunctionsave_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 callersMethodscore
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 callersFunctionshape
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 callersMethodtokenize
Tokenizes a string (in raw bytes) return a list of string tokens.
language/mentionmemory/utils/tokenization_utils.py:42
↓ 7 callersFunction_assert_array_is_integer_or_none
(array: Optional[Array], array_name: str)
language/mentionmemory/modules/memory_attention_layer.py:28
↓ 7 callersFunction_get_non_terminals
Return set of non-terminal symbols in `rhs`.
language/compgen/csl/induction/unification_utils.py:33
↓ 7 callersFunction_safe_divide
(x, y)
language/labs/exemplar_decoding/utils/rouge_utils.py:26
↓ 7 callersMethod_tabify
(self, lines)
language/nql/nql/nql_test.py:134
↓ 7 callersFunction_template_strategy
(template1: str, template2: str, example: WinoDictExample)
language/wino_dict/utils.py:659
↓ 7 callersMethod_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 callersMethodconstruct_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 callersFunctioncreate_int_feature
(values)
language/conpono/cpc/preproc/preprocessing_utils.py:102
↓ 7 callersFunctioncreate_int_feature
(values)
language/conpono/create_pretrain_data/preprocessing_utils.py:94
↓ 7 callersFunctioncreate_int_feature
(values)
language/capwap/synthetic/generate_questions.py:546
↓ 7 callersFunctiondimension_value
(dimension)
language/labs/exemplar_decoding/models/common.py:28
↓ 7 callersMethodfinished_query
(self)
language/search_agents/muzero/state_tree.py:264
↓ 7 callersMethodget_config
(self)
language/serene/layers.py:200
↓ 7 callersMethodget_embedding_table
(self)
language/canine/bert_modeling.py:280
↓ 7 callersMethodget_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 callersMethodget_sequence_output
Gets a sequence representation, one position per character.
language/canine/modeling.py:613
↓ 7 callersFunctionget_table
(table_path)
language/multivec/preprocessing/create_training_data.py:266
↓ 7 callersFunctionget_updated_default_flags
(**kwargs)
language/search_agents/muzero/env_test.py:36
↓ 7 callersFunctionhas_tag
Detects whether an XML element has the given tag.
language/fruit/wiki_utils.py:88
↓ 7 callersMethodis_complete
(self)
language/search_agents/muzero/state_tree.py:258
↓ 7 callersMethodlegal_actions
Return only rules having the to-be-expanded non-terminal as lhs.
language/search_agents/muzero/state_tree.py:279
↓ 7 callersFunctionlinear_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 callersMethodmake_train_dset
(self, num_epochs)
language/nql/nql/util_test.py:151
↓ 7 callersFunctionmake_valid_word_actions
( word_actions: Collection[int])
language/search_agents/muzero/state_tree_test.py:49
↓ 7 callersFunctionnew_valid_words
()
language/search_agents/muzero/env.py:74
↓ 7 callersFunctionpostprocess_fn
Filter invalid nodes.
language/compgen/csl/qcfg/qcfg_target_parser.py:139
↓ 7 callersMethodpredict
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 callersMethodprocess
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 callersMethodto_json
(self)
language/xsp/data_preprocessing/sql_utils.py:148
↓ 7 callersFunctionunwrap_tensor
(tensor)
language/serene/callbacks.py:43
↓ 6 callersMethod__init__
(self, hidden_dim, name = None, **kwargs)
language/serene/layers.py:168
↓ 6 callersFunction_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 callersMethod_as_dict
(self, vec, type_name)
language/nql/nql/nql_test.py:386
↓ 6 callersMethod_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
← previousnext →101–200 of 6,154, ranked by callers