- Notifications
You must be signed in to change notification settings - Fork95
Python tutorials as Jupyter Notebooks for NLP, ML, AI
License
dcavar/python-tutorial-notebooks
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
(C) 2016-2024 byDamir Cavar
- Anthropic / VoyageAI Embeddings
- OpenAI Embeddings
- BERT Embeddings
- Claude 3 Interaction using the Anthropic API
- GPT-4 interaction using the OpenAI API
- Neo4j interaction
- Simple Transformer-based Text Classification
- Stanza Tutorial
- Converting SEC CIKs to a Knowledge Graph
- Allegro Graph example
- Extracting Abbreviations
- Bayesian Classification for Machine Learning for Computational Linguistics
- Python Tutorial 1: Part-of-Speech Tagging 1
- Lexical Clustering
- Linear Algebra
- Neural Network Example with Keras
- Computing Finite State Automata
- Parallel Processing on Multiple Threads
- Perceptron Learning in Python
- Clustering with Scikit-learn
- Simple Language ID with N-grams
- Support Vector Machine (SVM) Classifier Example
- Scikit-Learn for Computational Linguists
- Tutorial: Tokens and N-grams
- Tutorial 1: Part-of-Speech Tagging 1
- Tutorial 2: Hidden Markov Models
- Word Sense Disambiguation
- Python examples and notes for Machine Learning for Computational Linguistics
- RDFlib Graphs
- Scikit-learn Logistic Regression
- Convert the Stanford Sentiment Treebank Data to CSV
- TextRank Example
- NLTK: Texts and Frequencies - N-gram models and frequency profiles
- Parsing with NLTK
- Parsing with NLTK and Foma
- Categorial Grammar Parsing in NLTK
- Dependency Grammar in NLTK
- Document Classification Tutorial 1 - Amazon Reviews
- WordNet using NLTK
- WordNet and NLTK
- Framenet in NLTK
- FrameNet Examples using NLTK
- PropBank in NLTK
- Machine Translation in Python 3 with NLTK
- N-gram Models from Text for Language Models
- Probabilistic Context-free Grammar (PCFG) Parsing using NLTK
- Python for Text Similarities 1
- spaCy Tutorial
- spaCy 3.x Tutorial: Transformers Spanish
- spaCy Model from CoNLL Data
- Train spaCy Model for Marathi (mr)
- Linear Algebra and Embeddings - spaCy
See the licensing details on the individual documents and in theLICENSE file in the code folder.
The files in this folder areJupyter-based tutorials for NLP, ML, AI in Python for classes I teach in Computational Linguistics, Natural Language Processing (NLP), Machine Learning (ML), and Artificial Intelligence (AI) atIndiana University.
If you find this material useful, please cite the author and source (that isDamir Cavar and all the sources cited in the relevant notebooks). Please let me know if you have some suggestions on how to correct the notebooks, improve them, or add some material and explanations.
The instructions below are somewhat outdated. I use justJupyter-Lab now. Followthe instructions here to set it up on different machine types and operating systems.
To run this material inJupyter you need to have Python 3.x andJupyter installed. You can save yourself some trouble by using theAnaconda Python 3.x distribution.
Clone the project folder using:
git clone https://github.com/dcavar/python-tutorial-for-ipython.git
Some of the notebooks may contain code that requires various kinds of [Python] modules to be installed in specific versions. Some of the installations might be complicated and problematic. I am working on a more detailed description of installation procedures and dependencies for each notebook. Stay tuned, this is coming soon.
Jupyter is a great tool for computational publications, tutorials, and exercises. I set up my favorite components forJupyter on Linux (for exampleUbuntu) this way:
Assuming that I have some of the development tools installed, as for examplegcc,make, etc., I install the packagespython3-pip andpython3-dev:
sudo apt install python3-pip python3-dev
After that I update the global system version ofpip to the newest version:
sudo -H pip3 install -U pip
Then I install the newestJupyter andJupyterlab modules globally, updating any previously installed version:
sudo -H pip3 install -U jupyter jupyterlab
The module that we should not forget isplotly:
sudo -H pip3 install -U plotly
Scala,Clojure, andGroovy are extremely interesting languages as well, and I love working withApache Spark, thus I installBeakerX as well. This requires two other [Python] modules:py4j andpandas. This presupposes that there is an existing Java JDK version 8 or newer already installed on the system. I install all theBeakerX related packages:
sudo -H pip3 install -U py4jsudo -H pip3 install -U pandassudo -H pip3 install -U beakerx
To configure and install allBeakerX components I run:
sudo -H beakerx install
Some of the components I like to use requireNode.js. OnUbuntu I usually add the newestNode.js as a PPA and not viaUbuntu Snap. Some instructions how to achieve that can be foundhere. To installNode.js onUbuntu simply run:
sudo apt install nodejs
The following commands will add plugins and extensions toJupyter globally:
sudo -H jupyter labextension install @jupyter-widgets/jupyterlab-managersudo -H jupyter labextension install @jupyterlab/plotly-extensionsudo -H jupyter labextension install beakerx-jupyterlab
Another useful package isVoilà, which allows you to turnJupyter notebooks into standalone web applications. I install it using:
sudo -H pip3 install voila
Now the initial version of the platform is ready to go.
To start theJupyter notebook viewer/editor on your local machine change into thenotebooks folder within the cloned project folder and run the following command:
jupyter notebook
A browser window should open up that allows you full access to the notebooks.
Alternatively, check out the instructions how to launchJupyterLab,BeakerX, etc.
Enjoy!
About
Python tutorials as Jupyter Notebooks for NLP, ML, AI
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.