- About
- TODO
- Libraries Overview
- Prerequisites
- Bootstrap Project
- Running the code from main.py
- Running the code using Jupyter
- Adding New Libraries
- License
Rinehart Analysis for NLP (ECE-617) Project 1.
Read the TODO to see the current task list.
All the libraries are located under "<project root>/nlp_libs"
- ProcessedBook: Loc: books/processed_book.py, Desc: Book Pre-processor
- Configuration: Loc: configuration/configuration.py, Desc: Configuration Loader
- ColorizedLogger: Loc: fancy_logger/colorized_logger.py, Desc: Logger with formatted text capabilities
You need to have a machine with Python >= 3.9 and any Bash based shell (e.g. zsh) installed. Having installed conda is also recommended.
$ python3.9 -V
Python 3.9.7
$ echo $SHELL
/usr/bin/zsh
All the installation steps are being handled by the Makefile.
If you want to use conda run:
$ make install
If you want to use venv run:
$ make install env=venv
In order to run the code, you will only need to configure the yml file, and either run its file directly or invoke its console script.
You may need to configure the yml file. There is an already configured yml file under confs/proj_1.yml.
First, make sure you are in the correct virtual environment:
$ conda activate rinehartAnalysis
$ which python
/home/<your user>/anaconda3/envs/rinehartAnalysis/bin/python
Show help:
$ python main.py --help
usage: main.py -c CONFIG_FILE -l LOG [-d] [-h]
Rinehart Analysis for NLP (ECE-617) Project 1
Required Arguments:
-c CONFIG_FILE, --config-file CONFIG_FILE
The configuration yml file
-l LOG, --log LOG Name of the output log file
Optional Arguments:
-d, --debug Enables the debug log messages
-h, --help Show this help message and exit
Execute the code:
$ python main.py -c confs/proj_1.yml -l logs/proj_1.log
In order to run the code, you will only need to configure the yml file, and either run its file directly or invoke its console script. Refer to Configuration Section.
First, make sure you are in the correct virtual environment:
$ conda activate rinehartAnalysis
$ which python
/home/<your user>/anaconda3/envs/rinehartAnalysis/bin/python
To use jupyter, first run jupyter
:
jupyter notebook
And open the main.ipynb.
Just Open this Google Collab Link.
If you want to add a new library (e.g. a Class) in the project you need to follow these steps:
- Create a new folder under "<project root>/nlp_libs" with a name like my_lib
- Create a new python file inside it with a name like my_module.py
- Paste your code inside it
- Create a new file name init.py
- Paste the follwing code inside it:
"""<Library name> sub-package.""" from .<Module name> import <Class Name> __email__ = "[email protected], kgeorgio.vols.utk.edu, [email protected]" __author__ = "jeanmerlet, drkostas, LaneMatthewJ" __version__ = "0.1.0"
- Open <project root>/nlp_libs/__init__.py
- Add the following line:
from nlp_libs.<Module name> import <Class Name>
- (Optional) Rerun
make install
orpython setup.py install
This project is licensed under the MIT License - see the LICENSE file for details.