Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alexwarstadt/data_generation
/ functions
Functions
165 in github.com/alexwarstadt/data_generation
⨍
Functions
165
◇
Types & classes
16
↓ 186 callers
Function
get_all
:param label: string. field name. :param value: string. label. :param table: ndarray of vocab items. :return: table restricted to all
utils/vocab_table.py:19
↓ 95 callers
Function
choice
:param set: a set of vocab entries :param avoid: list of vocab entries to avoid sampling :return: a random element from the set
utils/randomize.py:12
↓ 56 callers
Function
get_matched_by
:param row: ndarray row. selected vocab item. :param label: string. field containing selectional restrictions. :param table: ndarray of v
utils/vocab_table.py:76
↓ 30 callers
Function
get_matches_of
:param row: ndarray row. functor vocab item. :param label: string. field containing selectional restrictions. :param table: ndarray of vo
utils/vocab_table.py:41
↓ 28 callers
Function
N_to_DP_mutate
:param noun: noun to turn into DP :param frequent: restrict to frequent determiners only? :return: NONE. mutates string of noun.
utils/constituent_building.py:295
↓ 25 callers
Function
get_all_conjunctive
:param labels_values: list of (l,v) pairs: [(l1, v1), (l2, v2), (l3, v3)] :return: vocab items with the given value for each label
utils/vocab_table.py:30
↓ 22 callers
Function
get_all_auxs
()
utils/vocab_sets_dynamic.py:219
↓ 14 callers
Function
get_all_transitive_verbs
()
utils/vocab_sets_dynamic.py:96
↓ 13 callers
Function
get_all_verbs
()
utils/vocab_sets_dynamic.py:91
↓ 11 callers
Function
get_all_nouns
()
utils/vocab_sets_dynamic.py:12
↓ 9 callers
Function
get_all_bare_verbs
()
utils/vocab_sets_dynamic.py:131
↓ 8 callers
Function
V_to_VP_mutate
:param verb: vocab entry for a verb :param frequent: should only frequent vocab be generated? :param aux: if supplied, the value of the a
utils/constituent_building.py:199
↓ 7 callers
Function
get_all_nominals
()
utils/vocab_sets_dynamic.py:72
↓ 7 callers
Function
return_aux
:param verb: vocab entry :param subj: vocab entry :param allow_negated: should negated auxiliaries (e.g. shouldn't) ever be generated?
utils/conjugate.py:46
↓ 6 callers
Method
generate_paradigm
Contains the main loop for generating a full dataset for a given paradigm. Also contains exception handling: some exceptions are tole
utils/data_generator.py:53
↓ 6 callers
Function
get_all_modals_auxs
()
utils/vocab_sets_dynamic.py:209
↓ 6 callers
Function
verb_args_from_verb
:param verb: a vocab entry for a verb :param frequent: should only frequent vocab be generated? :param subj: if supplied, the value of th
utils/constituent_building.py:21
↓ 5 callers
Function
get_all_determiners
()
utils/vocab_sets_dynamic.py:313
↓ 5 callers
Function
get_all_ing_verbs
()
utils/vocab_sets_dynamic.py:121
↓ 5 callers
Function
get_all_non_recursive_verbs
()
utils/vocab_sets_dynamic.py:106
↓ 5 callers
Method
get_stack_trace
(self, e)
utils/data_generator.py:50
↓ 4 callers
Method
__init__
(self)
utils/data_generator.py:18
↓ 4 callers
Function
conjugate
:param verb: vocab entry :param subj: vocab entry :param allow_negated: should negated auxiliaries (e.g. shouldn't) ever be generated?
utils/conjugate.py:5
↓ 4 callers
Function
get_all_non_negative_agreeing_aux
()
utils/vocab_sets_dynamic.py:274
↓ 4 callers
Method
sample
samples a single minimal pair/set of a paradigm :return: the dictionary containing the data, and a representative sentence to avoid g
utils/data_generator.py:22
↓ 4 callers
Function
string_beautify
:param string: the string of a generated sentence :return: the string with whitespace removed and the first character capitalized
utils/string_utils.py:16
↓ 3 callers
Function
conj_list
:param disjunct: a string corresponding to a conjunction of selectional restrictions :return: a list of k, v pairs
utils/vocab_table.py:91
↓ 3 callers
Function
get_all_animate_nouns
()
utils/vocab_sets_dynamic.py:27
↓ 3 callers
Function
get_all_auxiliaries_no_null
()
utils/vocab_sets_dynamic.py:284
↓ 3 callers
Function
get_all_common_nouns
()
utils/vocab_sets_dynamic.py:62
↓ 3 callers
Function
get_all_finite_copulas
()
utils/vocab_sets_dynamic.py:259
↓ 3 callers
Function
get_all_intransitive_verbs
()
utils/vocab_sets_dynamic.py:101
↓ 3 callers
Function
get_all_wh_words
()
utils/vocab_sets_dynamic.py:353
↓ 3 callers
Method
log_exception
(self, e)
utils/data_generator.py:47
↓ 3 callers
Method
make_logger
creates a logger for the generation project :param metadata: metadata dict for the generation project :return: None
utils/data_generator.py:34
↓ 2 callers
Function
get_all_agreeing_aux
()
utils/vocab_sets_dynamic.py:269
↓ 2 callers
Function
get_all_copulas
()
utils/vocab_sets_dynamic.py:254
↓ 2 callers
Function
get_all_documents
()
utils/vocab_sets_dynamic.py:37
↓ 2 callers
Function
get_all_en_verbs
()
utils/vocab_sets_dynamic.py:126
↓ 2 callers
Function
get_all_modals
()
utils/vocab_sets_dynamic.py:214
↓ 2 callers
Function
get_all_negated_modals_auxs
()
utils/vocab_sets_dynamic.py:224
↓ 2 callers
Function
get_all_negative_agreeing_aux
()
utils/vocab_sets_dynamic.py:279
↓ 2 callers
Function
get_all_non_negated_modals_auxs
()
utils/vocab_sets_dynamic.py:229
↓ 2 callers
Function
get_all_plural_nouns
()
utils/vocab_sets_dynamic.py:52
↓ 2 callers
Function
get_all_possibly_singular_verbs
()
utils/vocab_sets_dynamic.py:194
↓ 2 callers
Function
get_all_singular_nouns
()
utils/vocab_sets_dynamic.py:17
↓ 2 callers
Function
get_all_strictly_plural_verbs
()
utils/vocab_sets_dynamic.py:169
↓ 2 callers
Function
get_all_strictly_singular_verbs
()
utils/vocab_sets_dynamic.py:174
↓ 2 callers
Function
get_bare_form
:param verb: the vocab entry of a verb :return: the vocab entry of the bare form of the verb
utils/constituent_building.py:363
↓ 2 callers
Function
get_en_form
:param verb: a verb vocab item :return: the past participle form with the same root
utils/constituent_building.py:513
↓ 2 callers
Function
is_match_disj
:param row: a vocab item :param disjunction: a string corresponding to a disjunction of selectional restrictions :return: true if the row
utils/vocab_table.py:102
↓ 2 callers
Function
join_args
:param args: a list of argument for a predicate/verb :return: the string made from joining the arguments with spaces
utils/constituent_building.py:178
↓ 2 callers
Method
make_metadata_dict
(self)
utils/data_generator.py:31
↓ 2 callers
Function
make_possessive
:param DP: a vocab entry for a full DP (expression of type e) :return: the DP with expression containing the string with 's appended
utils/constituent_building.py:343
↓ 2 callers
Function
make_sentence
:param frequent: should only frequent vocab be generated? :return: a vocab entry with the expression containing the string of the full senten
utils/constituent_building.py:218
↓ 2 callers
Function
read_data_tsv
:param data_file_path: path to a four-column tsv with metadata in first column :return: an ndarray with all metadata as columns
utils/metadata_parse.py:20
↓ 2 callers
Function
remove_extra_whitespace
:param string: the string of a generated sentence :return: the string with duplicated whitespace / whitespace before punctuation removed
utils/string_utils.py:5
↓ 1 callers
Function
condition_is_match_conj
:param condition: a string representing a selectional condition :param conjunction: a string corresponding to a conjunction of selectional re
utils/vocab_table.py:147
↓ 1 callers
Function
get_VP_under_modal_form
This is used to embed `John was sleeping' under might as `John might have been sleeping'. If the aux doesn't need to change, return None.
utils/constituent_building.py:459
↓ 1 callers
Function
get_all_anim_anim_verbs
()
utils/vocab_sets_dynamic.py:136
↓ 1 callers
Function
get_all_demonstratives
()
utils/vocab_sets_dynamic.py:358
↓ 1 callers
Function
get_all_doc_doc_verbs
()
utils/vocab_sets_dynamic.py:143
↓ 1 callers
Function
get_all_finite_verbs
()
utils/vocab_sets_dynamic.py:111
↓ 1 callers
Function
get_all_frequent
()
utils/vocab_sets_dynamic.py:370
↓ 1 callers
Function
get_all_negated_auxs
()
utils/vocab_sets_dynamic.py:244
↓ 1 callers
Function
get_all_negative_auxiliaries_no_null
()
utils/vocab_sets_dynamic.py:294
↓ 1 callers
Function
get_all_negative_copulas
()
utils/vocab_sets_dynamic.py:304
↓ 1 callers
Function
get_all_non_finite_transitive_verbs
()
utils/vocab_sets_dynamic.py:199
↓ 1 callers
Function
get_all_non_finite_verbs
()
utils/vocab_sets_dynamic.py:116
↓ 1 callers
Function
get_all_non_negated_auxs
()
utils/vocab_sets_dynamic.py:249
↓ 1 callers
Function
get_all_non_negative_auxiliaries_no_null
()
utils/vocab_sets_dynamic.py:289
↓ 1 callers
Function
get_all_non_negative_copulas
()
utils/vocab_sets_dynamic.py:299
↓ 1 callers
Function
get_all_possibly_plural_verbs
()
utils/vocab_sets_dynamic.py:189
↓ 1 callers
Function
get_all_proper_names
()
utils/vocab_sets_dynamic.py:82
↓ 1 callers
Function
get_all_relational_poss_nouns
()
utils/vocab_sets_dynamic.py:77
↓ 1 callers
Function
get_bare_form_str
:param verb_str: the string of a verb :return: the string of the bare form of the verb
utils/constituent_building.py:353
↓ 1 callers
Function
get_same_aux_verbs
:param verb: a verb vocab entry :return: the set of all verbs with the same auxiliary agreement properties
utils/conjugate.py:148
↓ 1 callers
Function
is_match_conj
:param row: a vocab item :param conjunction: a string corresponding to a conjunction of selectional restrictions :return: true if the row
utils/vocab_table.py:117
↓ 1 callers
Method
log_exception
(self, e)
utils/data_generator.py:154
↓ 1 callers
Function
make_combines
Function that creates 10 combines for the npi data: 9 all-but-one datasets, 1 all-in-one dataset :return: none. writes to output
utils/metadata_parse.py:185
↓ 1 callers
Function
make_emb_subj_question
:param frequent: should only frequent vocab be generated? :return: a vocab entry with the expression corresponding to the string of an entire
utils/constituent_building.py:239
↓ 1 callers
Method
make_metadata_dict
(non token-specific metadata is in class fields, e.g. self.field=syntax) :param extra_metadata: token-specific metadata, e.g. one_pre
utils/data_generator.py:300
↓ 1 callers
Method
make_metadata_dict
(non token-specific metadata is in class fields, e.g. self.field=syntax) :param extra_metadata: token-specific metadata, e.g. one_pre
utils/data_generator.py:394
↓ 1 callers
Function
make_sentence_from_args
:param args: the argument dictionary for a verb :return: the string corresponding to the sentence containing the verb and all its arguments
utils/constituent_building.py:228
↓ 1 callers
Function
make_sentence_from_verb
:param verb: vocab entry for a verb :param frequent: should only frequent vocab items be generated? :return: the string for a sentence he
utils/constituent_building.py:186
↓ 1 callers
Function
negate_VP
:param verb: vocab entry for a verb :param aux: vocab entry for an auxiliary :return: the verb form and auxiliary form necessary for the
utils/constituent_building.py:380
↓ 1 callers
Function
negate_aux
:param aux: an auxiliary vocab entry :return: the form of the auxiliary necessary for the corresponding negated VP
utils/constituent_building.py:407
↓ 1 callers
Function
noun_args_from_noun
:param noun: the vocab entry of a noun :param frequent: should only frequent vocab be generated? :param allow_recursion: for nouns that t
utils/constituent_building.py:251
↓ 1 callers
Function
peek_line
(f)
utils/metadata_parse.py:14
↓ 1 callers
Function
re_conjugate_aux
:param aux: an auxiliary vocab entry :return: the form of the auxiliary necessary for the corresponding negated VP
utils/conjugate.py:163
↓ 1 callers
Function
require_aux_agree
:param verb: vocab entry :param subj: vocab entry :param allow_negated: are negated auxiliaries (e.g. shouldn't) allowed :return: aux
utils/conjugate.py:105
↓ 1 callers
Function
verb_phrase_from_subj
(subject, frequent=True, allow_negated=True)
utils/constituent_building.py:15
Method
__init__
(self, field: str, linguistics: str, uid: str,
utils/data_generator.py:107
Method
__init__
(self, uid)
utils/data_generator.py:148
Method
__init__
(self, uid)
utils/data_generator.py:202
Method
__init__
(self, uid: str, linguistic_feature_type: str, linguistic_f
utils/data_generator.py:316
Method
__init__
(self, sentence, too_long)
utils/exceptions.py:3
Method
__init__
(self, msg)
utils/exceptions.py:9
Method
__init__
(self, msg)
utils/exceptions.py:14
Method
__init__
(self, msg)
utils/exceptions.py:19
next →
1–100 of 165, ranked by callers