Babelscape / rebel

REBEL is a seq2seq model that simplifies Relation Extraction (EMNLP 2021).
474 stars 71 forks source link

Can't find factory for 'rebel' for language English (en). #63

Open flamingrickpat opened 1 year ago

flamingrickpat commented 1 year ago

I'm trying to run the Spacy example but I'm getting this error:

ValueError: [E002] Can't find factory for 'rebel' for language English (en). This usually happens when spaCy callsnlp.create_pipewith a custom component name that's not registered on the current language class. If you're using a Transformer, make sure to install 'spacy-transformers'. If you're using a custom component, make sure you've added the decorator@Language.component(for function components) or@Language.factory` (for class components).

Available factories: attribute_ruler, tok2vec, merge_noun_chunks, merge_entities, merge_subtokens, token_splitter, doc_cleaner, parser, beam_parser, lemmatizer, trainable_lemmatizer, entity_linker, ner, beam_ner, entity_ruler, tagger, morphologizer, senter, sentencizer, textcat, spancat, spancat_singlelabel, future_entity_ruler, span_ruler, textcat_multilabel, en.lemmatizer `

I already have transformers and spacy-transformers installed.

Maximiliano-Villanueva commented 1 year ago

It works for me. Have you download and imported the spacy_component from Babelscape/rebel repo?