Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 1.11 KB

sharcnet.MD

File metadata and controls

31 lines (25 loc) · 1.11 KB

Running the workbook in SHARCNET/Compute Ontario

You can run the notebook with sharcnet credentials by loading the scipy-stack/2022a module and restarting the kernel. This will give you almost everything but the following packages, which need to be installed as shown:

# install nltk, plotly and whoosh libraries first
!pip install --no-index nltk
!pip install --no-index plotly
!pip install --no-index whoosh

For loading the NLTK datasets, change the code block to refer to an existing location:

"""
Download the stopwords for several languages & VADER lexicon.
Note that some jupyter environments need custom paths, which 
is what we use here.
"""
ntlk_path = os.sep + "home" + os.sep + "artunit" + os.sep + "notebooks"
nltk.data.path.append(ntlk_path)
nltk.download('stopwords',download_dir=ntlk_path)
nltk.download('vader_lexicon',download_dir=ntlk_path)

sharcnet_path = ntlk_path + os.sep
print("=> downloading complete and sharcnet path set...")

The workshop credentials will expire at fixed times but this may be useful for other research environments where the file paths cannot use default locations.