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
↓ 603 callers
Method
split
Like re.split but skips matches outside of configured range.
language/fruit/rendering_utils.py:184
↓ 335 callers
Method
constant
An NQL encoding of an appropriate Tensorflow constant. The constant should be a Tensorflow expression corresponding to a minibatch of weighte
language/nql/nql/__init__.py:807
↓ 280 callers
Method
run
Run model on given query and entity. Args: query: String. Returns: logits: Numpy array of logits for each output entity.
language/labs/drkit/hotpotqa/demo.py:801
↓ 227 callers
Method
replace
Find a variable `var_to_find` the arguments and replace it by `replace_by_var`.
language/gscan/data/grammar.py:114
↓ 207 callers
Method
keys
(self)
language/labs/exemplar_decoding/models/attention.py:196
↓ 163 callers
Method
get
(self)
language/orqa/predict/orqa_demo.py:44
↓ 158 callers
Method
run
Main entry point for this class.
language/canine/tydiqa/run_tydi_lib.py:115
↓ 137 callers
Method
add
Add an element to the sketch. Args: sketch: sketch to add x to x: name or id in string
language/emql/cm_sketch.py:111
↓ 113 callers
Method
load
Load the model, its tokenizer, and weights from the checkpoint. Args: model_checkpoint: Checkpoint to restore from, from .save() mode
language/serene/training.py:224
↓ 98 callers
Function
cell
Makes a cell name from coordinates.
language/nql/nql/nql_test_lib.py:25
↓ 69 callers
Method
values
(self)
language/labs/exemplar_decoding/models/attention.py:192
↓ 67 callers
Method
pad
(values, length)
language/mentionmemory/utils/mention_preprocess_utils_test.py:194
↓ 66 callers
Method
follow
Follow a relation, or relation group, in the knowledge graph. Specifically, if x evaluates to a set of knowledge graph entities, then x.follo
language/nql/nql/__init__.py:201
↓ 66 callers
Method
from_string
(cls, rule_string)
language/compgen/csl/targets/target_grammar.py:54
↓ 62 callers
Method
placeholder
(DEPRECATED) An NQL encoding of a Tensorflow placeholder. The placehold will be configured to hold weighted sets of entities of the appropria
language/nql/nql/__init__.py:824
↓ 59 callers
Function
create_int_feature
(values)
language/boolq/run_bert_boolq.py:302
↓ 59 callers
Method
decode
(self, ids)
language/serene/preprocessing.py:627
↓ 59 callers
Method
encode
Encode the example using the input TF example. Args: claim: Claim text evidence: Evidence text claim_label: Claim verif
language/serene/preprocessing.py:466
↓ 59 callers
Method
legal_actions_after_sequence
Returns the legal action space after a sequence of actions.
language/search_agents/muzero/state_tree.py:524
↓ 56 callers
Function
rules_to_actions
(grammar: state_tree.NQCFG, rules: List[str])
language/search_agents/muzero/state_tree_test.py:61
↓ 52 callers
Method
add
Add an entry to the chart.
language/compgen/csl/cky/cfg_parser.py:95
↓ 52 callers
Method
all
A universal set containing all entities of some type. Args: type_name: the string type name Returns: A NeuralQueryExpression for
language/nql/nql/__init__.py:858
↓ 52 callers
Method
get_shape
Return the shape of the matrix defining this relation. Args: rel_name: a string naming a KG relation. Returns: a tuple of two in
language/nql/nql/__init__.py:1339
↓ 51 callers
Method
evaluate
Test the model on this dataset over the examples in a dataset. Args: dset: a tf.data.Dataset Returns: a dictionary of results fr
language/nql/nql/util.py:394
↓ 51 callers
Method
from_json_file
Constructs a `BertConfig` from a json file of parameters.
language/canine/config_utils.py:139
↓ 48 callers
Method
convert_tokens_to_ids
(self, tokens)
language/serene/tokenizers.py:188
↓ 47 callers
Method
seed
(self, seed=None)
language/search_agents/muzero/env.py:515
↓ 46 callers
Method
train
Train the model on this dataset over the examples in a dataset. Args: dset: a tf.data.Dataset
language/nql/nql/util.py:378
↓ 43 callers
Method
eval
Eval one tf_prediction. Args: tf_prediction: a dictionary of predicted values
language/emql/eval.py:58
↓ 42 callers
Method
can_parse
Return True if can be parsed given target CFG.
language/compgen/csl/qcfg/qcfg_target_parser.py:202
↓ 42 callers
Method
load
(cls, path)
language/capwap/utils/text_utils.py:146
↓ 40 callers
Method
eval
Evaluate the Tensorflow expression associated with this NeuralQueryExpression. Args: session: (DEPRECATED) tf.Session used to evaluate if n
language/nql/nql/__init__.py:513
↓ 40 callers
Method
one
An NQL encoding of a one-hot set containing just this entity. Args: entity_name: a string naming an entity type_name: the string type
language/nql/nql/__init__.py:843
↓ 40 callers
Method
tokenize
Tokenize text. Args: text: text in natural language Returns: a list of tokens, segment_ids, and input mask
language/emql/util.py:274
↓ 38 callers
Method
process_text
(self, text)
language/conpono/evals/classifier_utils.py:116
↓ 34 callers
Method
as_list
(self, dset)
language/nql/nql/dataset_test.py:44
↓ 34 callers
Method
declare_relation
Declare the domain and range types for a relation. Args: rel_name: string naming a relation domain_type: string naming the type of su
language/nql/nql/__init__.py:994
↓ 33 callers
Method
_read_tsv
Reads a tab separated value file.
language/conpono/evals/classifier_utils.py:107
↓ 33 callers
Method
as_nql
Convert a Tensorflow expression to a NeuralQueryExpression. Args: expr: a Tensorflow expression which evaluates to a dense matrix of size
language/nql/nql/__init__.py:642
↓ 33 callers
Method
size
(self)
language/labs/exemplar_decoding/utils/data.py:404
↓ 33 callers
Method
tokenize
(self, input_str)
language/compgen/nqg/model/parser/test_utils.py:35
↓ 32 callers
Method
add
Add an entry to the chart.
language/compgen/nqg/common/cky/trie_utils.py:91
↓ 32 callers
Method
get
(self)
language/labs/drkit/hotpotqa/demo.py:1006
↓ 29 callers
Function
_add_simple_step
(item, example)
language/xsp/data_preprocessing/sql_parsing.py:113
↓ 29 callers
Method
sample
Sample a source and target pair. Args: score_fn: A scoring function that takes parent_rule (QCFGRule), nt_idx, child_rule (QCFGRule
language/compgen/csl/augment/qcfg_sampler.py:107
↓ 29 callers
Method
save
Persist the encoder and the model to disk.
language/serene/training.py:211
↓ 28 callers
Function
create_int_feature
(values)
language/capwap/synthetic/generate_answers.py:628
↓ 28 callers
Method
get_max_id
An integer upper bound on symbol ids. Returns: one plus largest assigned symbol id.
language/nql/nql/symbol.py:188
↓ 28 callers
Method
tokenize
Turn an english natural language string into tokens. Args: text: to transform Returns: tokens: list of string tokens
language/boolq/utils/tokenization.py:43
↓ 26 callers
Method
word2id
(self, word)
language/labs/exemplar_decoding/utils/data.py:397
↓ 24 callers
Method
_read_tsv
Reads a tab separated value file.
language/bert_extraction/steal_bert_classifier/models/run_classifier.py:205
↓ 24 callers
Method
build_model
Builds model by instantiating flax module associated with task.
language/mentionmemory/tasks/base_task.py:37
↓ 23 callers
Method
insert
Try to insert a symbol into the table. No action will be taken after the table has been frozen. Args: symbol: a string Raises:
language/nql/nql/symbol.py:96
↓ 23 callers
Method
to_tensor
(array)
language/mentionmemory/utils/mention_preprocess_utils_test.py:581
↓ 22 callers
Function
_get_config
()
language/compgen/csl/induction/unification_utils_test.py:22
↓ 22 callers
Method
predict
Given examples in JSON format, predict evidence relevance. Args: examples: List of claim/evidence pairs to rank Returns: Scalar
language/serene/training.py:564
↓ 22 callers
Function
tabline
(s)
language/nql/nql/util_test.py:29
↓ 21 callers
Function
create_int_feature
(values)
language/question_answering/b2t2/run_b2t2.py:692
↓ 21 callers
Method
get_range
The range for this relation. Args: rel_name: a string naming a declared relation. Returns: a string naming the type of the objec
language/nql/nql/__init__.py:1187
↓ 20 callers
Method
confirm_dict
(self, actual, expected)
language/nql/nql/nql_test.py:727
↓ 20 callers
Function
make_sql_span
SqlSpan constructor where only one argument should be non-None.
language/xsp/data_preprocessing/abstract_sql.py:104
↓ 19 callers
Method
get_domain
The domain for this relation. Args: rel_name: a string naming a declared relation. Returns: a string naming the type of the subj
language/nql/nql/__init__.py:1176
↓ 19 callers
Method
get_pooled_output
(self)
language/canine/bert_modeling.py:242
↓ 17 callers
Method
convert_relid2q2b
(self, relid)
language/emql/eval.py:55
↓ 17 callers
Method
convert_tokens_to_ids
(self, tokens)
language/compgen/nqg/model/parser/test_utils.py:38
↓ 17 callers
Method
make_collater_fn
Produces function to preprocess batches. The difference compared to `preprocess_fn` is that `collater_fn_` does not receive individual exampl
language/mentionmemory/tasks/base_task.py:127
↓ 17 callers
Method
save
Save generated memories into files.
language/mentionmemory/tasks/memory_generation_task.py:315
↓ 17 callers
Method
simple_follow_op
Wrapper of follow operation inside EmQL.
language/emql/model.py:933
↓ 17 callers
Method
simple_relation_encode_op
Wrapper to encode a single relation into its EmQL representation.
language/emql/model.py:954
↓ 17 callers
Method
t2i
(self, token)
language/capwap/utils/text_utils.py:87
↓ 16 callers
Function
_is_keyword
(item)
language/xsp/data_preprocessing/sql_parsing.py:73
↓ 16 callers
Method
assertArrayEqual
(self, actual: np.ndarray, expected: np.ndarray)
language/mentionmemory/utils/test_utils.py:28
↓ 16 callers
Function
create_int_feature
(values)
language/bert_extraction/steal_bert_qa/models/run_bert_boolq.py:317
↓ 16 callers
Method
detokenize
Convert word pieces to text.
language/capwap/utils/text_utils.py:128
↓ 16 callers
Method
finditer
Like re.finditer but skips matches outside of configured range.
language/fruit/rendering_utils.py:171
↓ 16 callers
Method
get_max_id
Retrieve the maximum index of any entity with given type. Args: type_name: string name of a declared type Returns: Maximum index
language/nql/nql/__init__.py:1669
↓ 16 callers
Method
sample
(self, time, outputs, state, name=None)
language/labs/consistent_zero_shot_nmt/modules/helpers.py:186
↓ 15 callers
Function
_create_int_feature
(values, padded_length)
language/compgen/nqg/model/parser/data/example_converter.py:34
↓ 15 callers
Function
_create_int_feature
(length)
language/compgen/nqg/model/parser/training/input_utils.py:38
↓ 15 callers
Method
close
(self)
language/serene/wiki_db.py:66
↓ 15 callers
Function
create_int_feature
(values)
language/multivec/preprocessing/create_training_data.py:1006
↓ 15 callers
Method
dummy_input
Produces model-specific dummy input batch. Tasks are responsible for producing a dummy input in the form of a py-tree with the same shape as
language/mentionmemory/tasks/base_task.py:152
↓ 15 callers
Function
make_trie
(grammar: state_tree.NQCFG, words: Sequence[str])
language/search_agents/muzero/state_tree_test.py:41
↓ 15 callers
Method
serialize
Returns the string serialization of the logical form.
language/casper/utils/top_utils.py:42
↓ 14 callers
Method
_read_tsv
Reads a tab separated value file.
language/conpono/evals/run_classifier.py:205
↓ 14 callers
Method
_read_tsv
Reads a tab separated value file.
language/conpono/evals/run_concat_classifier.py:210
↓ 14 callers
Method
apply_gradients
See base class.
language/canine/bert_optimization.py:107
↓ 14 callers
Method
close
(self)
language/conpono/evals/run_squad.py:1093
↓ 14 callers
Method
declare_entity_type
Declare an entity type. Declared entity types can be used as domain and ranges for relations. There are three flavors of entity types. By d
language/nql/nql/__init__.py:928
↓ 14 callers
Method
get_unk_id
Return the unknown symbol id or None if nonexistent.
language/nql/nql/symbol.py:196
↓ 14 callers
Method
intersection
Intersect two sketches. Args: sk1: first sketch sk2: second sketch Returns: a countmin sketch for intersection
language/emql/cm_sketch.py:158
↓ 13 callers
Function
apply_productions
(tree: state_tree.NQStateTree, productions: List[str])
language/search_agents/muzero/state_tree_test.py:31
↓ 13 callers
Method
assertArrayEqual
(self, expected, actual)
language/mentionmemory/tasks/relation_classifier_task_test.py:115
↓ 13 callers
Method
convert_entid2q2b
(self, entid)
language/emql/eval.py:52
↓ 13 callers
Function
create_int_feature
(values)
language/conpono/evals/model_builder.py:288
↓ 13 callers
Method
from_dict
Constructs a `Config` from a Python dictionary of parameters.
language/canine/config_utils.py:118
↓ 13 callers
Method
get_entity_name
Retrieve the string name the entity with given index and type. Args: entity_id: integer id for entity type_name: string name of decla
language/nql/nql/__init__.py:1657
↓ 13 callers
Method
get_sequence_output
Gets final hidden layer of encoder. Returns: float Tensor of shape [batch_size, seq_length, hidden_size] corresponding to the final h
language/canine/bert_modeling.py:245
↓ 13 callers
Method
score
Return the answer score for documents_list.
language/search_agents/muzero/types.py:263
↓ 12 callers
Method
build_model
(DEPRECATED) Construct and return a Model. Args: feature_ph_dict: maps feature names to placeholders that will hold the correspondi
language/nql/nql/util.py:155
next →
1–100 of 6,154, ranked by callers