Comments (5)
You'll need to run spacy as some sort of long-running server process, which your client communicates with.
I've tried to keep start up times low by using efficient binary file formats, but less than a second is unrealistic --- spacy needs to load its model files.
I assume you don't want to program in Python? If you do, you should just load spacy in your top-level module, and pass it around, as you iterate over your document collection.
from spacy.
Python is perfectly fine, preferred actually. The trouble is that I only really have one document. I'll be running my analysis on the file as it changes over time (at most once every few seconds), but I want the analysis to complete quickly, ideally in under 300 ms. It sounds like I'll need to follow your suggestion of using a long-running background process that the command line utility communicates with. Do you know of an existing Python utility that uses that architecture, for reference?
from spacy.
Why can't you just watch the file for changes from a Python process?
I mean...ultimately your problem is to feed text into Python at regular
intervals. I'm sure you can find some way to do this.
If you like writing in Python, I would suggest that having spaCy output to
the command line will be much worse than using its API. Presumably you also
need to use the annotations for something, right? Writing to file, reading
in, and then rewriting your own API should be unnecessary.
On Fri, Mar 27, 2015 at 3:14 AM, Jordan Suchow [email protected]
wrote:
Python is perfectly fine, preferred actually. The trouble is that I only
really have one document. I'll be running my analysis on the file as it
changes over time (at most once every few seconds), but I want the analysis
to complete quickly, ideally in under 300 ms. It sounds like I'll need to
follow your suggestion of using a long-running background process that the
command line utility communicates with. Do you know of an existing Python
utility that uses that architecture, for reference?—
Reply to this email directly or view it on GitHub
#40 (comment).
from spacy.
Thanks, this was helpful!
from spacy.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from spacy.
Related Issues (20)
- Spcay recoginize similar words into different entities
- Publish `requirements.txt` or `environment.yml` for installing latest versions of spacy and other dependencies HOT 1
- Downloading model error: ModuleNotFoundError: No module named 'spacy.symbols' HOT 1
- README.md Link Suggestions HOT 1
- English models' Accuracy Evaluation values HOT 1
- Spacy high memory consumption issue HOT 1
- Spacy dependency requirements are not met for pydantic versions ^2 HOT 1
- bus error upon existing the program after using spacy on mac M1 HOT 7
- DocBin.to_bytes fails with a "ValueError: bytes object is too large" Spacy v 3.7.2
- max_length of nlp pipline for e.g. japanese HOT 4
- Doc Report HOT 2
- Text tokenizer is classifying the letter "O" as punctuation. HOT 1
- POS Tagging is Broken for Sliced Pipelines HOT 1
- Example from https://spacy.io/universe/project/neuralcoref doesn't work for polish HOT 1
- displacy.js for NER HOT 1
- Misleading spacy apply behavior when using .spacy file HOT 2
- Incorrect lemmatization HOT 2
- Verb characterized as noun in English text HOT 2
- nlp.pipe cannot pickle when using Transformer model HOT 9
- Potential security issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spacy.