Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/explosion/spacy-transformers
/ functions
Functions
214 in github.com/explosion/spacy-transformers
⨍
Functions
214
◇
Types & classes
13
↳
Endpoints
3
Function
create_TransformerModel_v2
( name: str, get_spans: Callable, tokenizer_config: dict = {}, transformer_config: dict = {},
spacy_transformers/architectures.py:190
Function
create_TransformerModel_v3
Pretrained transformer model that can be finetuned for downstream tasks. name (str): Name of the pretrained Huggingface model to use. get_spa
spacy_transformers/architectures.py:201
Function
custom_annotation_setter
(docs, trf_data)
spacy_transformers/tests/test_pipeline_component.py:92
Function
deserialize_transformer_data
(obj, chain=None)
spacy_transformers/data_classes.py:238
Method
doc_data
The outputs, split per spaCy Doc object.
spacy_transformers/data_classes.py:301
Function
docs
(nlp)
spacy_transformers/tests/test_model_wrapper.py:22
Function
docs
(vocab)
spacy_transformers/tests/test_pipeline_component.py:30
Method
empty
(cls)
spacy_transformers/data_classes.py:166
Method
empty
(cls, nr_docs)
spacy_transformers/data_classes.py:274
Function
forward
(model: TransformerListener, docs, is_train)
spacy_transformers/layers/listener.py:60
Function
forward
(model: Model, trf_datas: List[TransformerData], is_train: bool)
spacy_transformers/layers/trfs2arrays.py:24
Function
forward
(model, trf_full, is_train)
spacy_transformers/layers/split_trf.py:10
Function
forward
( model: TransformerModel, docs: List[Doc], is_train: bool )
spacy_transformers/layers/transformer_model.py:172
Method
from_bytes
(self, byte_string: bytes)
spacy_transformers/data_classes.py:224
Function
get_custom_sent_spans
(docs)
spacy_transformers/tests/test_spanners.py:36
Function
get_doc_spans
(docs: Iterable[Doc])
spacy_transformers/span_getters.py:56
Method
get_loss
A noop function, for compatibility with the Pipe API. See the `update` method for an explanation of the loss mechanics of the component.
spacy_transformers/pipeline_component.py:329
Function
get_strided_spans
( docs: Iterable[Doc], window: int, stride: int )
spacy_transformers/span_getters.py:10
Function
init
(model: TransformerModel, X=None, Y=None)
spacy_transformers/layers/transformer_model.py:129
Function
init
(model: ClassificationTransformerModel, X=None, Y=None)
spacy_transformers/tests/test_model_sequence_classification.py:95
Method
listeners
RETURNS (List[TransformerListener]): The listener models listening to this component. Usually internals.
spacy_transformers/pipeline_component.py:129
Method
listening_components
RETURNS (List[str]): The downstream components listening to this component. Usually internals.
spacy_transformers/pipeline_component.py:136
Method
load_model
(p)
spacy_transformers/pipeline_component.py:386
Function
make_transformer
Construct a Transformer component, which lets you plug a model from the Huggingface transformers library into spaCy so you can use it in your
spacy_transformers/pipeline_component.py:53
Function
mask_from_end
(shape, max_length)
spacy_transformers/tests/test_truncation.py:69
Function
max_length
()
spacy_transformers/tests/test_truncation.py:64
Function
name
(request)
spacy_transformers/tests/test_model_wrapper.py:28
Function
null_annotation_setter
Set no additional annotations on the Doc objects.
spacy_transformers/annotation_setters.py:8
Function
output_attentions
(request)
spacy_transformers/tests/test_model_wrapper.py:33
Function
output_hidden_states
(request)
spacy_transformers/tests/test_model_wrapper.py:38
Function
parse_data
(nlp, index)
spacy_transformers/tests/test_configs.py:59
Function
read_tagger_data
()
spacy_transformers/tests/test_configs.py:58
Method
remove_listener
Remove a listener for a downstream component. Usually internals.
spacy_transformers/pipeline_component.py:150
Function
replace_listener
(model)
spacy_transformers/layers/_util.py:5
Function
replace_listener_cfg
(tok2vec_model_cfg, listener_model_cfg)
spacy_transformers/layers/_util.py:9
Function
seq_lengths
(sequences)
spacy_transformers/tests/test_truncation.py:28
Function
sequences
()
spacy_transformers/tests/test_truncation.py:10
Function
serialize_transformer_data
(obj, chain=None)
spacy_transformers/data_classes.py:231
Function
set_logger
Add a logger that will log memory usage to the given file. Used to debug OOM errors.
spacy_transformers/layers/transformer_model.py:107
Function
set_pytorch_transformer
(model, hf_model: HFObjects)
spacy_transformers/layers/transformer_model.py:118
Function
shape
(sequences)
spacy_transformers/tests/test_truncation.py:21
Method
tensors
(self)
spacy_transformers/data_classes.py:191
Method
tensors
(self)
spacy_transformers/data_classes.py:290
Function
test_alignments_match
(words1, words2)
spacy_transformers/tests/test_alignment.py:45
Function
test_apply_alignment
(nested_align, X_cols)
spacy_transformers/tests/test_alignment.py:72
Function
test_deprecation_warnings
()
spacy_transformers/tests/test_deprecations.py:6
Function
test_empty_doc
Test that an empty document gets processed correctly
spacy_transformers/tests/regression/test_spacy_issue7029.py:41
Function
test_frozen_listener
()
spacy_transformers/tests/test_pipeline_component.py:449
Function
test_get_custom_spans
()
spacy_transformers/tests/test_spanners.py:34
Function
test_get_sent_spans
()
spacy_transformers/tests/test_spanners.py:21
Function
test_get_strided_spans
(window, stride, docs, result)
spacy_transformers/tests/test_spanners.py:15
Function
test_init
(component)
spacy_transformers/tests/test_pipeline_component.py:58
Function
test_init_nlp
(config_string)
spacy_transformers/tests/test_configs.py:56
Function
test_initialized_inline_transformer_pipeline_todisk
()
spacy_transformers/tests/test_serialize.py:285
Function
test_initialized_inline_transformer_tobytes
()
spacy_transformers/tests/test_serialize.py:217
Function
test_initialized_inline_transformer_todisk
()
spacy_transformers/tests/test_serialize.py:246
Function
test_initialized_transformer_tobytes
()
spacy_transformers/tests/test_serialize.py:66
Function
test_initialized_transformer_todisk
()
spacy_transformers/tests/test_serialize.py:79
Function
test_inline_transformer_pipeline_tobytes
()
spacy_transformers/tests/test_serialize.py:261
Function
test_inline_transformer_pipeline_todisk
()
spacy_transformers/tests/test_serialize.py:275
Function
test_inline_transformer_tobytes
()
spacy_transformers/tests/test_serialize.py:206
Function
test_inline_transformer_todisk
()
spacy_transformers/tests/test_serialize.py:232
Function
test_listeners
(component, docs)
spacy_transformers/tests/test_pipeline_component.py:104
Function
test_model_for_sequence_classification
()
spacy_transformers/tests/test_model_sequence_classification.py:26
Function
test_model_init
(name, trf_model)
spacy_transformers/tests/test_model_wrapper.py:75
Function
test_model_predict
(nlp, docs, trf_model)
spacy_transformers/tests/test_model_wrapper.py:83
Function
test_multiprocessing
(simple_nlp, texts)
spacy_transformers/tests/test_pipeline_component.py:438
Function
test_no_update_listener_in_predict
()
spacy_transformers/tests/test_pipeline_component.py:481
Function
test_offset_alignment
(words, offset_mapping, alignment)
spacy_transformers/tests/test_alignment.py:103
Function
test_predict
(component, docs)
spacy_transformers/tests/test_pipeline_component.py:66
Function
test_replace_listeners
()
spacy_transformers/tests/test_pipeline_component.py:338
Function
test_replace_listeners_invalid
()
spacy_transformers/tests/test_pipeline_component.py:408
Function
test_serialize_transformer_data
()
spacy_transformers/tests/test_serialize.py:26
Function
test_set_annotations
(component, docs)
spacy_transformers/tests/test_pipeline_component.py:82
Function
test_set_extra_annotations
(component, docs)
spacy_transformers/tests/test_pipeline_component.py:89
Function
test_source_replace_listeners
Test that a pipeline with a transformer+tagger+senter and some replaced listeners runs and trains properly
spacy_transformers/tests/test_pipeline_component.py:502
Function
test_textcatcnn
()
spacy_transformers/tests/test_textcatcnn.py:47
Function
test_transformer_pipeline_empty
Test that the pipeline doesn't fail with empty input
spacy_transformers/tests/test_pipeline_component.py:287
Function
test_transformer_pipeline_long_token
Test that a simple pipeline does not raise an error on texts that exceeds the model max length. We should truncate instead.
spacy_transformers/tests/test_pipeline_component.py:125
Function
test_transformer_pipeline_simple
Test that a simple pipeline with just a transformer at least runs
spacy_transformers/tests/test_pipeline_component.py:119
Function
test_transformer_pipeline_tagger_internal
Test that a tagger with internal transformer runs and trains properly
spacy_transformers/tests/test_tok2vectransformer.py:46
Function
test_transformer_pipeline_tagger_senter_listener
Test that a pipeline with just a transformer+tagger+senter runs and trains properly
spacy_transformers/tests/test_pipeline_component.py:182
Function
test_transformer_pipeline_textcat
Test that a pipeline with just a transformer+textcat runs and trains properly. This used to throw an error because of shape inference issues -
spacy_transformers/tests/regression/test_spacy_issue6401.py:42
Function
test_transformer_pipeline_tobytes
()
spacy_transformers/tests/test_serialize.py:105
Function
test_transformer_pipeline_todisk
()
spacy_transformers/tests/test_serialize.py:118
Function
test_transformer_pipeline_todisk_before_initialize
()
spacy_transformers/tests/test_serialize.py:164
Function
test_transformer_pipeline_todisk_settings
()
spacy_transformers/tests/test_serialize.py:128
Function
test_transformer_sentencepiece_IO
Test that a transformer using sentencepiece trains + IO goes OK
spacy_transformers/tests/test_pipeline_component.py:238
Function
test_transformer_tobytes
()
spacy_transformers/tests/test_serialize.py:56
Function
test_truncate_alignment_from_end
(sequences, max_length, align, mask_from_end)
spacy_transformers/tests/test_truncation.py:88
Function
test_truncate_wordpieces
(wordpieces, max_length, mask_from_end)
spacy_transformers/tests/test_truncation.py:78
Function
test_wordpieces_IO
(wordpieces)
spacy_transformers/tests/test_data_classes.py:21
Function
texts
()
spacy_transformers/tests/test_pipeline_component.py:428
Method
to_bytes
(self)
spacy_transformers/data_classes.py:221
Method
tokenizer
(self)
spacy_transformers/layers/transformer_model.py:74
Method
tokenizer
(self)
spacy_transformers/tests/test_model_sequence_classification.py:63
Method
tokenizer
(self)
spacy_transformers/tests/util.py:166
Method
tokenizer_config
(self)
spacy_transformers/tests/util.py:174
Method
tokens
Deprecated. A dict with the wordpiece token data.
spacy_transformers/data_classes.py:195
Method
tokens
Deprecated. Dict formatted version of the self.wordpieces data, with values converted to PyTorch tensors.
spacy_transformers/data_classes.py:294
← previous
next →
101–200 of 214, ranked by callers