MCPcopy Create free account

hub / github.com/amazon-science/ReFinED / functions

Functions427 in github.com/amazon-science/ReFinED

↓ 1 callersFunctionget_tokenizer
Get `transformers` library tokenizer. If data directory is passed then look for a folder with the `transformer_name` to and read the tokenize
src/refined/utilities/general_utils.py:109
↓ 1 callersFunctionget_url
(uid)
src/refined/offline_data_generation/wiki_extractor.py:242
↓ 1 callersMethodget_wiki_docs
( self, split: str, include_spans: bool = True, include_gold_l
src/refined/dataset_reading/entity_linking/dataset_factory.py:246
↓ 1 callersMethodinit_weights
Initialize weights for all member variables with type nn.Module
src/refined/model_components/refined_model.py:150
↓ 1 callersMethodinit_weights
Initialize weights for all member variables with type nn.Module
src/refined/model_components/mention_detection_layer.py:27
↓ 1 callersMethodinit_weights
Initialize weights for all member variables with type nn.Module
src/refined/model_components/entity_disambiguation_layer.py:24
↓ 1 callersMethodinit_weights
Initialize weights for all member variables with type nn.Module
src/refined/model_components/entity_typing_layer.py:14
↓ 1 callersMethodinit_weights
Initialize weights for all member variables with type nn.Module
src/refined/model_components/description_encoder.py:54
↓ 1 callersMethodinit_weights
Initialize weights for all member variables with type nn.Module
src/refined/model_components/ed_layer_2.py:134
↓ 1 callersFunctionkeepPage
(ns, catSet, page)
src/refined/offline_data_generation/wiki_extractor.py:221
↓ 1 callersFunctionlcfirst
:return: a string with its first character lowercase
src/refined/offline_data_generation/wiki_extractor.py:1674
↓ 1 callersFunctionload_aida_means
(file_path: str)
src/refined/resource_management/loaders.py:197
↓ 1 callersFunctionload_aliases
(file_path: str, is_test: bool = False, qcodes: Set[str] = None, keep_all_entities: bool = True)
src/refined/resource_management/loaders.py:183
↓ 1 callersFunctionload_descriptions
( filepath: str, qcodes: Optional[Set[str]] = None, is_test: bool = False, keep_all_entities: bool = T
src/refined/resource_management/loaders.py:34
↓ 1 callersFunctionload_disambiguation_qcodes
(file_path: str, is_test: bool = False)
src/refined/resource_management/loaders.py:125
↓ 1 callersMethodload_docs
(self, docs: List[Doc])
src/refined/dataset_reading/entity_linking/document_dataset.py:43
↓ 1 callersMethodload_docs
(self, start: int, end: int)
src/refined/dataset_reading/entity_linking/document_dataset.py:149
↓ 1 callersMethodload_file_contents
(self)
src/refined/dataset_reading/mention_detection/ontonotes_reader.py:148
↓ 1 callersMethodload_file_contents1
(self)
src/refined/dataset_reading/mention_detection/conll_reader.py:103
↓ 1 callersFunctionload_human_qcode
(file_path: str, is_test: bool = False)
src/refined/resource_management/loaders.py:131
↓ 1 callersMethodload_raw_file_contents
(self)
src/refined/dataset_reading/mention_detection/ontonotes_reader.py:106
↓ 1 callersMethodlocalize_requirements
After the package is unpacked at the target destination, the requirements can be installed locally from the wheelhouse folder using t
package.py:30
↓ 1 callersFunctionmain
()
src/refined/training/precompute_description_embeddings.py:11
↓ 1 callersFunctionmain
()
src/refined/training/fine_tune/fine_tune.py:25
↓ 1 callersFunctionmain
()
src/refined/training/train/train.py:27
↓ 1 callersFunctionmain
()
src/refined/training/train/train_md_standalone.py:187
↓ 1 callersFunctionmain
()
src/refined/offline_data_generation/run_span_detection.py:23
↓ 1 callersFunctionmain
()
src/refined/offline_data_generation/preprocess_all.py:149
↓ 1 callersFunctionmain
()
src/refined/offline_data_generation/wiki_extractor.py:3102
↓ 1 callersFunctionmain
()
src/refined/offline_data_generation/merge_files_and_extract_links.py:17
↓ 1 callersFunctionmakeExternalImage
(url, alt='')
src/refined/offline_data_generation/wiki_extractor.py:2497
↓ 1 callersFunctionmakeExternalLink
Function applied to wikiLinks
src/refined/offline_data_generation/wiki_extractor.py:2489
↓ 1 callersFunctionmakeInternalLink
(title, label)
src/refined/offline_data_generation/wiki_extractor.py:2404
↓ 1 callersMethodmerge_in_main_entity_mentions
Merges main entity mentions into spans (hyperlinks_clean). :param title: Wikipedia title. :param spans: spans (hyperlinks) wi
src/refined/dataset_reading/entity_linking/wikipedia_dataset.py:226
↓ 1 callersFunctionparse_fine_tuning_args
()
src/refined/training/fine_tune/fine_tune_args.py:72
↓ 1 callersFunctionparse_training_args
()
src/refined/training/train/training_args.py:88
↓ 1 callersMethodpost_add_command_line_args
(self)
src/refined/training/train/training_args.py:65
↓ 1 callersMethodprecompute_description_embeddings
(self, output_dir: Optional[str] = None)
src/refined/inference/processor.py:522
↓ 1 callersFunctionprocess_annotated_document
( refined: Refined, doc: Doc, el: bool = False, ed_threshold: float = 0.0,
src/refined/evaluation/evaluation.py:19
↓ 1 callersFunctionprocess_dump
:param input_file: name of the wikipedia dump file; '-' to read from stdin :param template_file: optional file with template definitions.
src/refined/offline_data_generation/wiki_extractor.py:2849
↓ 1 callersFunctionprocess_line
(line, redirects, wikipedia_to_qcode, instance_of, wikimedia_internal_classes, disambiguation_qcodes)
src/refined/offline_data_generation/merge_files_and_extract_links.py:52
↓ 1 callersMethodprocess_words
(self, words: List[str])
src/refined/inference/standalone_md.py:95
↓ 1 callersMethodprune_classes
Prune classes that are inferred from other provided classes. Note that this also filters country and sport relation as well.
src/refined/doc_preprocessing/class_handler.py:87
↓ 1 callersMethodpush
(self, title, args)
src/refined/offline_data_generation/wiki_extractor.py:517
↓ 1 callersMethodput_batch
(self, keys: List[K], values: List[V])
src/refined/resource_management/lmdb_wrapper.py:86
↓ 1 callersMethodread_files
(self)
src/refined/dataset_reading/mention_detection/webqsp_reader.py:97
↓ 1 callersMethodrelabel_dataset
Create a new version of a dataset using MentionDetector to add additional NER labels (e.g. for DATE spans)
src/refined/dataset_reading/mention_detection/conll_reader.py:206
↓ 1 callersMethodrelabel_doc
Add new NER labels to a doc, using a trained MentionDetector
src/refined/dataset_reading/mention_detection/conll_reader.py:164
↓ 1 callersFunctionreplaceExternalLinks
https://www.mediawiki.org/wiki/Help:Links#External_links [URL anchor text]
src/refined/offline_data_generation/wiki_extractor.py:2452
↓ 1 callersFunctionreplaceInternalLinks
Replaces internal links of the form: [[title |...|label]]trail with title concatenated with trail, when present, e.g. 's' for plural.
src/refined/offline_data_generation/wiki_extractor.py:2099
↓ 1 callersMethodreserve
(self, size)
src/refined/offline_data_generation/wiki_extractor.py:2707
↓ 1 callersMethodresolve_date_span
Resolve a single date -> i.e. convert raw text form to an instance of the Date class :param span: the span to resolve to a date
src/refined/utilities/numeric_handling/date_utils.py:333
↓ 1 callersMethodresolve_spans
Given a list of spans with MD type "DATE", attempt to resolve them to a set date format. The list of spans should all be from the sam
src/refined/utilities/numeric_handling/date_utils.py:297
↓ 1 callersMethodrestore_requirements_txt
(self)
package.py:98
↓ 1 callersFunctionrun
(aligned_wiki_file: str, n_gpu: int, resources_dir: str, model_dir: str, end_line: int = -1)
src/refined/offline_data_generation/run_span_detection.py:72
↓ 1 callersFunctionsave
(macro_f1, model, dev_dls, resources_dir: str, hyperparams: Dict[str, Any], epoch: int)
src/refined/training/train/train_md_standalone.py:360
↓ 1 callersFunctionselect_classes
(resources_dir: str, add_class_every_n_pages: int = 5000, number_of_classes: int = 1400, is
src/refined/offline_data_generation/class_selection.py:119
↓ 1 callersFunctionsharp_invoke
(module, function, args)
src/refined/offline_data_generation/wiki_extractor.py:1858
↓ 1 callersMethodsort_tensor
Based on https://discuss.pytorch.org/t/how-to-sort-tensor-by-given-order/61625. :param data_tns: input tensor :param permutat
src/refined/inference/processor.py:398
↓ 1 callersMethodsplit_sentences
Given a text, generates (start, end) spans of sentences in the text. @param text: input text @return: list of tuple o
src/refined/doc_preprocessing/preprocessor.py:96
↓ 1 callersFunctiontoRoman
convert integer to Roman numeral
src/refined/offline_data_generation/wiki_extractor.py:1489
↓ 1 callersMethodto_ner_labels
Convert `BatchElement` to labels for NER. param ner_tag_to_ix: dict mapping from ner label (e.g. "B-PERSON") to index in output layer
src/refined/data_types/modelling_types.py:198
↓ 1 callersMethodto_string
Attempt to convert date to a string
src/refined/utilities/numeric_handling/date_utils.py:75
↓ 1 callersFunctiontqdm_hook
(tqdm_progress_bar: tqdm)
src/refined/resource_management/aws.py:10
↓ 1 callersFunctiontrain
( model, train_dl, dev_dls, optimiser, scheduler, tokenizer, num_epochs: int,
src/refined/training/train/train_md_standalone.py:304
↓ 1 callersFunctionunique
(func, iterable)
src/refined/utilities/general_utils.py:61
↓ 1 callersFunctionwc
(filename: str)
src/refined/offline_data_generation/run_span_detection.py:97
↓ 1 callersMethodwiki2text
(self, text)
src/refined/offline_data_generation/wiki_extractor.py:709
↓ 1 callersMethodwrite_output
:param out: a memory file :param text: the text of the page
src/refined/offline_data_generation/wiki_extractor.py:559
↓ 1 callersMethodwrite_to_compacted_file
Writes memmap-based data structure to disk in compacted format and deletes original over-allocated file. Only call this metho
src/refined/resource_management/lmdb_wrapper.py:94
Method__add__
(self, other: 'Metrics')
src/refined/evaluation/metrics.py:22
Method__call__
(self, value1, value2)
src/refined/offline_data_generation/wiki_extractor.py:1749
Method__contains__
(self, key: K)
src/refined/resource_management/lmdb_wrapper.py:57
Method__enter__
(self)
src/refined/resource_management/lmdb_wrapper.py:68
Method__eq__
(self, other)
src/refined/offline_data_generation/wiki_extractor.py:90
Method__exit__
(self, *args)
src/refined/resource_management/lmdb_wrapper.py:71
Method__getitem__
(self, index: int)
src/refined/dataset_reading/mention_detection/webqsp_reader.py:147
Method__getitem__
(self, index: int)
src/refined/dataset_reading/mention_detection/conll_reader.py:235
Method__getitem__
(self, index: int)
src/refined/dataset_reading/mention_detection/ontonotes_reader.py:160
Method__getitem__
Returns the tensors for a single batch element. :param index: the index of the batch element to return :return: batch element
src/refined/dataset_reading/entity_linking/document_dataset.py:55
Method__getitem__
(self, index)
src/refined/dataset_reading/entity_linking/document_dataset.py:192
Method__getitem__
(self, key: K)
src/refined/resource_management/lmdb_wrapper.py:21
Method__getitem__
(self, name)
src/refined/offline_data_generation/wiki_extractor.py:1629
Method__init__
(self, dist)
package.py:18
Method__init__
(self, word_piece, token_id, start, end)
src/refined/inference/standalone_md.py:19
Method__init__
( self, model_dir: str, ner_tag_to_num: Dict[str, int], transformer_name: str
src/refined/inference/standalone_md.py:30
Method__init__
Constructs instance of Refined class. :param data_dir: directory containing the data files (pickled and JSON dictionaries) :p
src/refined/inference/processor.py:36
Method__init__
(self)
src/refined/utilities/numeric_handling/date_utils.py:101
Method__init__
(self)
src/refined/utilities/numeric_handling/date_utils.py:293
Method__init__
( self, data_dir: str, ner_tag_to_num: Dict[str, int], data_split: str = "trai
src/refined/dataset_reading/mention_detection/webqsp_reader.py:17
Method__init__
( self, data_dir: str, ner_tag_to_num: Dict[str, int], data_split: str = "trai
src/refined/dataset_reading/mention_detection/conll_reader.py:31
Method__init__
( self, data_dir: str, ner_tag_to_num: Dict[str, int], data_split: str = "trai
src/refined/dataset_reading/mention_detection/ontonotes_reader.py:16
Method__init__
(self, preprocessor: Preprocessor, resource_manager: ResourceManager,
src/refined/dataset_reading/entity_linking/dataset_factory.py:12
Method__init__
Constructs instance of Wikipedia dataset (should be used in conjunction with torch Dataloader). :param preprocessor: preprocessor pro
src/refined/dataset_reading/entity_linking/wikipedia_dataset.py:31
Method__init__
Constructs dataset object. :param preprocessor: utility class that provides methods for Wikidata lookups and general pre-processing
src/refined/dataset_reading/entity_linking/document_dataset.py:20
Method__init__
Constructs dataset object. :param preprocessor: utility class that provides methods for WikiData lookups and general pre-processing
src/refined/dataset_reading/entity_linking/document_dataset.py:99
Method__init__
:param boto3_session: boto3 session (`boto3.Session`) optional, if not set will use default session High-level abstractions f
src/refined/resource_management/aws.py:18
Method__init__
(self, path: str, write_mode: bool = False)
src/refined/resource_management/lmdb_wrapper.py:43
Method__init__
(self, s3_manager: S3Manager, entity_set: Optional[str], mo
src/refined/resource_management/resource_manager.py:17
Method__init__
(self, entity_set: str, data_dir: str, use_precomputed_description_embeddings: bool = True, r
src/refined/resource_management/data_lookups.py:19
← previousnext →201–300 of 427, ranked by callers