Skip to content

Commit 38bb327

Browse files
We're not really using spaCy but it was still a dependency
1 parent 3c49124 commit 38bb327

File tree

4 files changed

+4
-35
lines changed

4 files changed

+4
-35
lines changed

formfyxer/lit_explorer.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,8 @@ def vectorize(text: Union[List[str], str], tools_token: Optional[str] = None):
373373
Args:
374374
text: a string of multiple words to vectorize
375375
tools_token: the token to tools.suffolklitlab.org, used for micro-service
376-
to reduce the amount of memory you need on your machine. If
377-
not passed, you need to have `en_core_web_lg` installed. NOTE: this
378-
last bit is nolonger correct, you have to use the micor-service
379-
as we have had to remove SpaCY due to a breaking change
376+
to reduce the amount of memory you need on your machine. This token
377+
is required as we have removed SpaCY dependencies due to breaking changes.
380378
"""
381379
if tools_token:
382380
headers = {

formfyxer/requirements.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,8 @@ reportlab
1515
requests
1616
ocrmypdf
1717
scikit-learn
18-
spacy
1918
textstat
2019
transformers
2120
types-requests
2221
types-PyYAML
23-
en-core-web-lg @ https://github.com/explosion/spacy-models/releases/download/en_core_web_lg-3.5.0/en_core_web_lg-3.5.0-py3-none-any.whl
24-
typer>=0.4.1,<0.5.0
2522
python-docx

pyproject.toml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools>=40.0.0", "pip", "spacy"]
2+
requires = ["setuptools>=40.0.0", "pip"]
33
build-backend = "setuptools.build_meta"
44

55
[tool.black]
@@ -26,18 +26,6 @@ ignore_missing_imports = true
2626
module="networkx.*"
2727
ignore_missing_imports = true
2828

29-
[[tool.mypy.overrides]]
30-
module="en_core_web_lg.*"
31-
ignore_missing_imports=true
32-
33-
[[tool.mypy.overrides]]
34-
module="en_core_web_md.*"
35-
ignore_missing_imports=true
36-
37-
[[tool.mypy.overrides]]
38-
module="en_core_web_sm.*"
39-
ignore_missing_imports=true
40-
4129
[[tool.mypy.overrides]]
4230
module="boxdetect.*"
4331
ignore_missing_imports=true

setup.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,6 @@
44
with open("README.md", "r", encoding="utf-8") as fh:
55
long_description = fh.read()
66

7-
# We can't simply include this as an install_requires, because pypi won't allow
8-
# projects with github dependencies to be hosted there.
9-
#class InstallSpacyModelCommand(install):
10-
# def run(self):
11-
# install.run(self)
12-
# import spacy
13-
# print("Downloading word2vec model en_core_web_sm")
14-
# spacy.cli.download('en_core_web_sm')
15-
16-
177
setuptools.setup(
188
name='formfyxer',
199
version='0.3.0a3',
@@ -28,15 +18,11 @@
2818
},
2919
license='MIT',
3020
packages=['formfyxer'],
31-
install_requires=['spacy', 'pdfminer.six', 'pandas', 'pikepdf',
21+
install_requires=['pdfminer.six', 'pandas', 'pikepdf',
3222
'textstat', 'requests', 'numpy', 'scikit-learn', 'networkx', 'joblib',
3323
'nltk', 'boxdetect', 'pdf2image', 'reportlab>=3.6.13', 'pdfminer.six',
3424
'opencv-python', 'ocrmypdf', 'eyecite', 'passivepy>=0.2.16', 'sigfig',
35-
'typer>=0.4.1,<0.5.0', # typer pre 0.4.1 was broken by click 8.1.0: https://github.com/explosion/spaCy/issues/10564
3625
'openai', 'python-dotenv', 'python-docx', 'tiktoken', 'transformers'
3726
],
38-
#cmdclass={
39-
# 'install': InstallSpacyModelCommand,
40-
#},
4127
include_package_data = True
4228
)

0 commit comments

Comments
 (0)