Skip to content

Converting into exe file through pyinstaller-> spacy cannot find factory for 'curated transformer' #13422

@estherkim083

Description

@estherkim083

import spacy
import spacy_curated_transformers
# import spacy_transformers
import curated_transformers
import spacy_alignments
import spacy_legacy
import spacy_loggers
import spacy_pkuseg
import os
nlp = spacy.load(os.getcwd()+'\\en_core_web_trf-3.7.3')

x= input()
doc= nlp(x)

result =[]
for sent in doc.sents:
    result.append(sent.text)

print(result)

I wanted to turn the above code into exe file.
However, [valueerror: [e002] can't find factory for 'curated transformer' for language english (en)] error occurs...
I used pyinstaller to convert it into exe file. In the pyinstaller, I included spacy, spacy_curated_transformers, curated_transformers into the hidden import.
I wonder how to make this executable file configure the curated transformer factory...
Please help me.
screenshot

My Environment

  • Operating System: Windows 11
  • Python Version Used: 3.11.8
  • spaCy Version Used: 3.7.4
  • Environment Information:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions