Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add spaCy #731

Open
Puru35 opened this issue Jul 24, 2020 · 6 comments · May be fixed by #734
Open

Add spaCy #731

Puru35 opened this issue Jul 24, 2020 · 6 comments · May be fixed by #734

Comments

@Puru35
Copy link

Puru35 commented Jul 24, 2020

Hello!
I'm working on a python nlp project that utilizes the spaCy library, and I need it to work directly on the browser, and using "micropip" to install the required packages isn't cutting it. Is there any possible way to make this happen?

@rth
Copy link
Member

rth commented Jul 28, 2020

There was an attempt to add spaCy in #368. Someone would need to continue that PR and address remaining issues.

@chigozienri chigozienri linked a pull request Aug 2, 2020 that will close this issue
@rth rth changed the title Importing spaCy on to the browser Add spaCy May 1, 2022
@aghasemi
Copy link

Hi. Is this now part of version 0.21, as it seems to have been merged? (I guess not, no?)

@shafferchance
Copy link

That was for exodide, it seems if you can use 0.21 it would work with it. Going to attempt to follow the documentation on building wheels for packages out of tree and see if that works.

@shafferchance
Copy link

shafferchance commented May 21, 2023

Managed to get it working, had to do some flips and unfortunately build cython-blis as generic. Essentially you will need to build the wheels individually and load them in-order but it does seem to be working. Not sure about performance at the moment though.

If you don't use BLIS_ARCH=generic when building the wheel for cython-blis you will get an error like this:

unknown FP unit 'sse'

This is because sse is not fully supported for WASM yet. Thus when attempting to use those headers it fails to resolve. This might change in the future, but it would be a while before production is ready.

@shafferchance
Copy link

For a full deps list:

  1. cymem-2.0.7
  2. murmurhash-1.0.9
  3. preshed-3.0.8
  4. srsly-2.4.6
  5. blis-0.7.9 (This is cython-blis)
  6. thinc-8.1.10
  7. spacy-3.6.0

All of these are under the explosion organization and should be pretty usable for any of us.

@Vuizur
Copy link
Contributor

Vuizur commented Aug 15, 2023

This is maybe also relevant, someone published wheels and a demo: https://github.com/SyedAhkam/spacy-wasm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants