Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion detection/nlp_text_splitter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ this model lacks support handling for Chinese punctuation.
# Installation

To install this tool users will need to run `./install.sh`. By default this will set up a
CPU-only PyTorch installation.
CPU-only PyTorch installation. `./install.sh` requires a C++ compiler and the Python development
headers to be installed. If they are not already installed, they can be installed by running
`apt-get install g++ python3.8-dev`.

Please note that several customizations are supported:

Expand Down
4 changes: 0 additions & 4 deletions detection/nlp_text_splitter/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ install_py_torch() {
pip3 install "$torch_package"
else
echo "Installing CPU only version of PyTorch."
# networkx is a dependency of PyTorch, but the version of networkx in the PyTorch package
# index requires Python 3.9. networkx needs to be installed in a separate command so that
# pip can get networkx from PyPi.
pip3 install 'networkx~=3.1'
pip3 install "$torch_package" --index-url https://download.pytorch.org/whl/cpu
fi
}
Expand Down
6 changes: 1 addition & 5 deletions detection/nlp_text_splitter/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,5 @@ name = "nlp_text_splitter"
version = "9.0"
dependencies = [
"spacy>=3.7.4,<3.7.6",
"wtpsplit>=1.3.0",
# Starting with version 8.2.5, thinc will try to compile C extensions during install.
# Restricting the version of thinc is easier than installing a C compiler in every component
# Dockerfile that uses the text splitter.
"thinc>=8.2.2,<8.2.5"
"wtpsplit>=1.3.0"
]