MCPcopy Create free account

hub / github.com/allenai/SciREX / functions

Functions614 in github.com/allenai/SciREX

↓ 12 callersFunctionload_jsonl
(file)
scirex_utilities/json_utilities.py:17
↓ 12 callersFunctionoverlap
(span_1, span_2)
scirex_utilities/convert_brat_annotations_to_json.py:144
↓ 10 callersMethodget_text
(self, text)
dygiepp/scripts/data/genia/genia_xml_to_inline_sutd.py:59
↓ 9 callersMethod__repr__
(self)
dygiepp/dygie/data/dataset_readers/data_structures.py:202
↓ 9 callersFunctionadd_to_text
(word, text, start)
scirex_utilities/convert_pwc_to_brat.py:54
↓ 8 callersMethodadjust_spans_doc
(self)
dygiepp/scripts/data/ace-event/parse_ace_event.py:219
↓ 8 callersMethodget_metric
Returns ------- A tuple of the following metrics based on the accumulated count statistics: precision : float
dygiepp/dygie/training/ner_metrics.py:34
↓ 7 callersMethodget_metric
(self, reset: bool = False)
scirex/metrics/span_f1_metrics.py:137
↓ 6 callersMethod_get_chars
(self, start_char, end_char, trigger=False)
dygiepp/scripts/data/ace-event/parse_ace_event.py:398
↓ 6 callersFunctionconvert
(instance)
dygiepp/scripts/clean_predictions.py:48
↓ 6 callersFunctiondebug_if
(cond)
dygiepp/scripts/data/ace-event/parse_ace_event.py:239
↓ 6 callersFunctionfields_to_batches
The input is a dict whose items are batched tensors. The output is a list of dictionaries - one per entry in the batch - with the slices of t
dygiepp/dygie/models/shared.py:28
↓ 6 callersFunctionload_jsonl
(filename)
scirex_utilities/entity_utils.py:82
↓ 5 callersMethodadjust
(self, tok)
dygiepp/scripts/data/ace-event/parse_ace_event.py:120
↓ 5 callersMethodalign
(self, sent)
dygiepp/scripts/data/ace-event/parse_ace_event.py:115
↓ 5 callersFunctioncompute_f1
(predicted, gold, matched)
dygiepp/dygie/training/f1.py:13
↓ 5 callersFunctionconvert_to_dict
(data)
scirex/evaluation_scripts/scirex_relation_evaluate.py:23
↓ 5 callersMethodindex
(self, vocab: Vocabulary)
scirex/data/dataset_readers/multi_label_field.py:108
↓ 5 callersFunctionmerge_method_subrelations
(doc)
scirex/predictors/utils.py:71
↓ 5 callersMethodto_json
(self)
dygiepp/scripts/data/ace-event/parse_ace_event.py:228
↓ 5 callersMethodunique
(array)
scirex/data/iterators/batch_iterator.py:67
↓ 4 callersMethod_check_in_range
(span, sent)
dygiepp/scripts/data/ace-event/parse_ace_event.py:625
↓ 4 callersFunctionchar_sim
(w1: str, w2: str, ng: int = 3, with_abbr: bool = False)
scirex_utilities/entity_matching_algorithms.py:42
↓ 4 callersMethoddecode
Converts the list of spans and predicted antecedent indices into clusters of spans for each element in the batch. Parameters
dygiepp/dygie/models/dygie.py:334
↓ 4 callersMethodembedding_forward
(self, text)
scirex/models/scirex_model.py:119
↓ 4 callersFunctionget_token_indices
(entity, sent)
dygiepp/scripts/data/ace-event/parse_ace_event.py:244
↓ 3 callersFunctionAce2json
(entity_dir, rel_dir, token_dict_offset1, token_dict_offset2, txtfn, docs, nercount, relcount, sentcount)
dygiepp/scripts/data/ace05/preprocess/ace2json.py:91
↓ 3 callersFunctionWriteDocs
(docs, outfn)
dygiepp/scripts/data/ace05/preprocess/ace2json.py:138
↓ 3 callersMethod__repr__
(self)
dygiepp/scripts/data/genia/genia_xml_to_inline_sutd.py:77
↓ 3 callersFunction_invert_arguments
For scoring the argument, we don't need the trigger spans to match exactly. We just need the trigger label corresponding to the predicted tri
dygiepp/dygie/training/event_metrics.py:9
↓ 3 callersMethod_make_evaluation_metadata
Get cluster metadata in form to feed into evaluation scripts. For each entry in minibatch, return a dict with a metadata field, which
dygiepp/dygie/models/coref.py:675
↓ 3 callersFunction_prf_divide
Performs division and handles divide-by-zero. On zero-division, sets the corresponding result elements to zero.
scirex/metrics/thresholding_f1_metric.py:86
↓ 3 callersMethod_shuffle_documents
Randomly permute the documents for each batch
dygiepp/dygie/data/iterators/multitask_iterator.py:57
↓ 3 callersFunctionadd_to_text_with_ent
(text, w, ent_id, enttype, ann_file)
scirex_utilities/convert_predictions_to_brat.py:12
↓ 3 callersFunctionannotations_to_jsonl
(annotations, output_file, key="doc_id")
scirex_utilities/convert_brat_annotations_to_json.py:530
↓ 3 callersFunctionchunk_string
(name)
scirex_utilities/entity_utils.py:18
↓ 3 callersMethoddecode
(self, output_dict: Dict[str, torch.Tensor])
scirex/models/scirex_model.py:339
↓ 3 callersFunctionget_dataset_instances
(instances, dataset)
dygiepp/dygie/data/iterators/multitask_iterator.py:17
↓ 3 callersFunctionget_features_for_sections
(sections: List[Tuple[int, int]], words_list: List[str])
scirex/data/utils/section_feature_extraction.py:8
↓ 3 callersMethodindex
(self, vocab: Vocabulary)
dygiepp/dygie/data/fields/adjacency_field_assym.py:90
↓ 3 callersFunctionload_pwc_full_text
(pwc_doc_file: str)
scirex_utilities/analyse_pwc_entity_results.py:60
↓ 3 callersFunctionload_pwc_sentence_predictions
(pwc_sentence_file: str, pwc_prediction_file: str)
scirex_utilities/analyse_pwc_entity_results.py:42
↓ 3 callersFunctionnan_to_zero
(n)
scirex/models/scirex_model.py:437
↓ 3 callersMethodnormalize_lex
(lex)
dygiepp/scripts/data/genia/genia_xml_to_inline_sutd.py:209
↓ 3 callersFunctionparseAce
(annfn, entity_set, rel_set)
dygiepp/scripts/data/ace05/preprocess/ace2json.py:6
↓ 3 callersFunctionparseStanford
(stanfordfn)
dygiepp/scripts/data/ace05/preprocess/ace2json.py:60
↓ 3 callersFunctionsafe_div
(num, denom)
dygiepp/dygie/training/f1.py:6
↓ 3 callersFunctionsafe_div
(num, denom, m=100)
scirex/metrics/f1.py:8
↓ 3 callersMethodspan_embeddings_forward
(self, output_embedding, spans, span_type_labels, span_features, metadata)
scirex/models/scirex_model.py:170
↓ 3 callersFunctionspan_match
(span_1, span_2)
scirex/predictors/utils.py:4
↓ 2 callersMethod_compute_metrics
(true_positives: int, false_positives: int, false_negatives: int)
scirex/metrics/span_f1_metrics.py:166
↓ 2 callersMethod_compute_relation_scores
(self, pairwise_embeddings, top_span_mention_scores)
dygiepp/dygie/models/relation.py:281
↓ 2 callersMethod_compute_span_pair_embeddings
Computes an embedding representation of pairs of spans for the pairwise scoring function to consider. This includes both the original
dygiepp/dygie/models/coref.py:504
↓ 2 callersMethod_compute_trigger_scores
Compute trigger scores for all tokens.
dygiepp/dygie/models/events.py:383
↓ 2 callersMethod_compute_updates
(transition, embeddings, mask, permute_order)
dygiepp/dygie/models/span_prop.py:86
↓ 2 callersMethod_flatten_span_info
(span_info_batched, span_ix)
scirex/models/relations/mention_binary_relation.py:207
↓ 2 callersMethod_get_context
Given span start and end (inclusive), get the context on either side.
dygiepp/dygie/models/events.py:510
↓ 2 callersMethod_get_cross_entropy_loss
Compute cross-entropy loss on relation labels. Ignore diagonal entries and entries giving relations between masked out spans.
dygiepp/dygie/models/relation.py:324
↓ 2 callersMethod_get_pruned_gold_relations
Loop over each slice and get the labels for the spans from that slice. All labels are offset by 1 so that the "null" label gets class
dygiepp/dygie/models/relation.py:305
↓ 2 callersMethod_normalize_word
(word)
dygiepp/dygie/data/dataset_readers/ie_json.py:326
↓ 2 callersFunctionadd_nums
(rows, columns, name)
scirex_utilities/convert_brat_annotations_to_json.py:444
↓ 2 callersFunctionannotations_to_jsonl
(annotations, output_file)
scirex_utilities/entity_utils.py:74
↓ 2 callersFunctionclean_p
(elem)
scirex_utilities/preprocessing/latex_to_plain_text.py:21
↓ 2 callersFunctioncleanup
(k, decoded, sentence_starts)
dygiepp/dygie/commands/predict_dygie_whole_doc.py:42
↓ 2 callersFunctioncompute_metrics
(predicted_clusters, gold_clusters)
scirex/evaluation_scripts/scierc_coref_evaluate.py:16
↓ 2 callersMethodcompute_representations
Run the forward pass. Since we can only have coreferences between spans in the same document, we loop over the documents in the batch
dygiepp/dygie/models/coref.py:152
↓ 2 callersMethodcompute_representations
( self, # type: ignore span_embeddings, # (1, Ns, E) coref_labels: torch.IntTensor,
scirex/models/relations/entity_relation.py:99
↓ 2 callersFunctioncompute_start_end
(cards)
scirex_utilities/convert_brat_annotations_to_json.py:479
↓ 2 callersMethodcontains
(self, span2)
dygiepp/scripts/data/genia/genia_xml_to_inline_sutd.py:62
↓ 2 callersFunctionconvert_ner_to_list
(ner)
scirex/predictors/utils.py:68
↓ 2 callersFunctiondo_clustering
(document, span_field, coref_field, plot=True, threshold=0.5)
scirex/models/clustering/clustering.py:48
↓ 2 callersMethodempty_field
(self)
scirex/data/dataset_readers/multi_label_field.py:133
↓ 2 callersFunctionfilter_annotations
(anns, remove_disc, remove_over, use_five_types)
dygiepp/scripts/data/genia/genia_xml_to_inline_sutd.py:405
↓ 2 callersMethodget_coref_scores
(self, top_span_embeddings, top_span_mention_scores,
dygiepp/dygie/models/coref.py:285
↓ 2 callersFunctionget_dataframe_from_folder
(brat_folder)
scirex_utilities/convert_brat_annotations_to_json.py:127
↓ 2 callersFunctionget_n_grams
(w_list, n)
scirex_utilities/entity_matching_algorithms.py:21
↓ 2 callersFunctionget_n_grams_with_abbr
(w_list, n, with_abbr=True, return_sep=False)
scirex_utilities/entity_matching_algorithms.py:31
↓ 2 callersFunctionget_pred_dicts
(pred_dir)
dygiepp/dygie/commands/predict_from_ensemble.py:101
↓ 2 callersFunctionget_pred_dicts
(pred_dir)
dygiepp/dygie/commands/predict_from_pair.py:70
↓ 2 callersMethodget_relation_scores
(self, top_span_embeddings, top_span_mention_scores)
dygiepp/dygie/models/relation.py:277
↓ 2 callersFunctionget_token_of
Given a document and a character in the document, get the token that the char lives in.
dygiepp/scripts/data/ace-event/parse_ace_event.py:256
↓ 2 callersFunctionget_types_of_clusters
(predicted_ner, predicted_clusters)
scirex/evaluation_scripts/scirex_relation_evaluate.py:57
↓ 2 callersFunctiongroup_sentences_to_sections
(sentences, sections)
scirex/data/dataset_readers/doctaet_reader.py:33
↓ 2 callersFunctionhas_all_mentions
(doc, relation)
scirex/evaluation_scripts/scirex_relation_evaluate.py:18
↓ 2 callersFunctionmake_embedder
(kind, num_embeddings, embedding_dim)
dygiepp/dygie/models/one_hot.py:7
↓ 2 callersFunctionmake_pruner
Create a pruner that either takes outputs of other scorers (i.e. entity beam), or uses its own scorer (the `default_scorer`).
dygiepp/dygie/models/entity_beam_pruner.py:14
↓ 2 callersFunctionmake_sciERC_into_pwc_format
(instance, put_coref=False)
scirex/data/utils/scierc_to_scirex_format.py:8
↓ 2 callersFunctionmake_sentences
(lines)
dygiepp/scripts/data/genia/resolve_differences.py:29
↓ 2 callersFunctionmap_and_intersect_predicted_clusters_to_gold
( predicted_clusters: Dict[str, List[Tuple[int, int]]], gold_clusters: Dict[str, List[Tuple[int, int]]
scirex/predictors/utils.py:49
↓ 2 callersFunctionmap_predicted_spans_to_gold
(predicted_spans: List[tuple], gold_spans: List[tuple])
scirex/predictors/utils.py:11
↓ 2 callersFunctionmove_boundaries
(plist, elist)
scirex/data/utils/paragraph_alignment.py:43
↓ 2 callersMethodner_forward
(self, output_embedding, ner_type_labels, metadata)
scirex/models/scirex_model.py:156
↓ 2 callersMethodoverlaps
(self, span2)
dygiepp/scripts/data/genia/genia_xml_to_inline_sutd.py:65
↓ 2 callersMethodpredict_labels
(self, output_docs, metadata)
dygiepp/dygie/models/coref.py:183
↓ 2 callersFunctionprocess_cluster
(cluster)
scirex_utilities/convert_brat_annotations_to_json.py:150
↓ 2 callersMethodrelation_propagation
(self, output_dict)
dygiepp/dygie/models/relation.py:152
↓ 2 callersMethodreset
(self)
dygiepp/dygie/training/ner_metrics.py:54
↓ 2 callersMethodreset
(self)
dygiepp/dygie/training/relation_metrics.py:37
↓ 2 callersMethodreset
(self)
dygiepp/dygie/training/relation_metrics.py:67
↓ 2 callersMethodreset
(self)
dygiepp/dygie/training/event_metrics.py:92
next →1–100 of 614, ranked by callers