Skip to content

load('zh_core_web_trf-3.8.0') cause Can't find factory for 'curated_transformer' for language Chinese (zh) #13805

Closed
@TChengZ

Description

@TChengZ

How to reproduce the behaviour

1、i download the zh_core_web_trf-3.8.0 from https://github.com/explosion/spacy-models/releases/tag/zh_core_web_trf-3.8.0
2、i unzip the download file and write the code like below

 local_path = './../zh_core_web_trf-3.8.0'
 nlp = spacy.load(local_path)
       
doc = nlp(text)

then the error happen:
Can't find factory for 'curated_transformer' for language Chinese (zh). This usually happens when spaCy calls nlp.create_pipe with a custom component name that's not registered on the current language class. 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).\n\nAvailable factories: attribute_ruler, tok2vec, merge_noun_chunks, merge_entities, merge_subtokens, token_splitter, doc_cleaner, parser, beam_parser, lemmatizer, trainable_lemmatizer, entity_linker, entity_ruler, tagger, morphologizer, ner, beam_ner, senter, sentencizer, spancat, spancat_singlelabel, span_finder, future_entity_ruler, span_ruler, textcat, textcat_multilabel

Your Environment

  • Operating System:MACOS 15.1.1 (24B2091)

  • Python Version Used: Python 3.10.11

  • spaCy Version Used:

  • Name: spacy
    Version: 3.8.5
    Summary: Industrial-strength Natural Language Processing (NLP) in Python
    Home-page: https://spacy.io
    Author: Explosion
    Author-email: [email protected]
    License: MIT
    Location: /Users/chenzujie/work/Autobots/autobots_backend/.venv/lib/python3.10/site-packages
    Requires: catalogue, cymem, jinja2, langcodes, murmurhash, numpy, packaging, preshed, pydantic, requests, setuptools, spacy-legacy, spacy-loggers, srsly, thinc, tqdm, typer, wasabi, weasel

  • Environment Information:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions