Skip to content

Commit

Permalink
Merge pull request #57 from CDU-data-science-team/0.4.2
Browse files Browse the repository at this point in the history
0.4.2
  • Loading branch information
yiwen-h authored Jan 6, 2023
2 parents 436fff2 + dbd80b3 commit 757746d
Show file tree
Hide file tree
Showing 5 changed files with 376 additions and 186 deletions.
26 changes: 17 additions & 9 deletions docs/getting started/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ You can install `pxtextmining` from either [PyPI](https://pypi.org/project/pxtex
### Optional: create a Python Virtual Environment in which to install `pxtextmining` and its dependencies.
This will allow you to keep the package versions required by the package separate from any others that you may have installed. Let's call the virtual environment `text_venv`:

*Manually creating virtual environment*
1. Open a terminal, navigate to the folder where you want to put the virtual
environment and run:
- `python3 -m venv text_venv` (Linux & MacOS);
Expand All @@ -14,7 +15,14 @@ This will allow you to keep the package versions required by the package separat
- `source text_venv/bin/activate` (Linux & MacOS);
- `text_venv\Scripts\activate` (Windows);

*Using pyenv to create the virtual environment*
If you have pyenv installed:

1. Run `pyenv virtualenv text_venv` to create the new virtual environment.
2. Activate it with `pyenv activate text_venv`

### Option 1: Install from PyPI
This option allows you to use the functions coded in pxtextmining.

1. Install `pxtextmining` and its PyPI dependencies:
- `pip3 install pxtextmining` (Linux & MacOS);
Expand All @@ -28,16 +36,16 @@ This will allow you to keep the package versions required by the package separat
while.

### Option 2: Install from GitHub
This option is recommended as it gives you access to the full datasets and already trained models.

1. To begin with, clone the repository from github.

2. Install wheel, this helps with sorting the different packages and their dependencies:
- `pip3 install wheel` (Linux & MacOS);
- `pip install wheel` (Windows);
3. Install all the dependencies of `pxtextmining`. Inside the repo's folder, run:
- `pip3 install -r requirements.txt` (Linux & MacOS);
- `pip install -r requirements.txt` (Windows);
2. Navigate to the repository folder on your computer. run `pip install .`

3. We also need to install a couple of
[`spaCy`](https://github.com/explosion/spacy-models) models.
- `python -m spacy download en_core_web_sm`
- `python -m spacy download en_core_web_lg`

4. Install `pxtextmining` as a Python package. Inside the repo's folder, run:
- `python3 setup.py install` (Linux & MacOS);
- `python setup.py install` (Windows);
Note that the second model is pretty large, so the installation may take a
while.
Loading

0 comments on commit 757746d

Please sign in to comment.