{"id":25382723,"url":"https://github.com/erenisci/nlp-learning","last_synced_at":"2025-04-09T13:38:54.052Z","repository":{"id":277085329,"uuid":"930996446","full_name":"erenisci/nlp-learning","owner":"erenisci","description":"This repository covers a journey from basic to advanced NLP models, with a focus on different approaches and solutions, including transformer-based models like GPT and BERT.","archived":false,"fork":false,"pushed_at":"2025-02-28T14:20:41.000Z","size":4203,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T20:06:28.703Z","etag":null,"topics":["ai","bert","data-science","deep-learning","gpt","machine-learning","natural-language-processing","nlp","python","transformers"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erenisci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-11T14:57:18.000Z","updated_at":"2025-02-28T14:20:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"072df59e-6662-4465-825b-db40cbf62733","html_url":"https://github.com/erenisci/nlp-learning","commit_stats":null,"previous_names":["erenisci/nlp-learning"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erenisci%2Fnlp-learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erenisci%2Fnlp-learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erenisci%2Fnlp-learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erenisci%2Fnlp-learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erenisci","download_url":"https://codeload.github.com/erenisci/nlp-learning/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248050641,"owners_count":21039426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","bert","data-science","deep-learning","gpt","machine-learning","natural-language-processing","nlp","python","transformers"],"created_at":"2025-02-15T07:38:14.065Z","updated_at":"2025-04-09T13:38:54.044Z","avatar_url":"https://github.com/erenisci.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NLP-Learning Repository\n\nWelcome to the **NLP-Learning** repository! This repository serves as a comprehensive learning resource for both basic and advanced **Natural Language Processing (NLP)** topics. It combines theoretical concepts with practical examples to give you hands-on experience.\n\n---\n\n## Table of Contents\n\n1. [Introduction](#introduction)\n2. [Text Preprocessing](#text-preprocessing)\n   - Data Cleaning\n   - Tokenization\n   - Stemming\n   - Lemmatization\n3. [Text Representation](#text-representation)\n   - Bag of Words (BoW)\n   - n-grams\n   - TF-IDF\n   - Word Embeddings\n   - Transformer-Based Models\n4. [Probabilistic Language Models](#probabilistic-language-models)\n   - N-gram Models\n   - Hidden Markov Models\n   - Maximum Entropy Models\n5. [Deep Learning Based Language Models](#deep-learning-based-language-models)\n   - RNNs\n   - LSTMs\n   - Transformers\n   - BERT\n   - GPT\n   - Llama\n6. [Basic NLP](#basic-nlp)\n   - Text Classification\n   - Named Entity Recognition (NER)\n   - Morphological Analysis\n   - Part of Speech (POS)\n   - Word Sense Disambiguation\n   - Sentiment Analysis\n7. [Advanced NLP](#advanced-nlp)\n   - Question Answering\n   - Information Retrieval\n   - Recommendation Systems\n   - Machine Translation\n   - Text Summarization\n8. [Models and Tools](#models-and-tools)\n   - GPT \u0026 Gemini\n   - Pipelines, Actions, Functions\n   - RAG (Retrieval-Augmented Generation)\n   - HuggingFace\n   - OpenWebUI\n   - LangChain\n   - Ollama\n9. [Usage](#usage)\n10. [Contributing](#contributing)\n11. [License](#license)\n\n---\n\n## [Introduction](./0-introduction/0.0-introduction.ipynb)\n\nThis section introduces the fundamental concepts of **Natural Language Processing (NLP)**. It provides an overview of the essential tasks, challenges, and techniques used in NLP. You'll learn about the applications of NLP in real-world scenarios, such as **machine translation**, **text generation**, and more.\n\n---\n\n## Text Preprocessing\n\n**Text preprocessing** is a crucial first step in any NLP task. It involves preparing raw text data to make it suitable for machine learning models. Here are the key techniques:\n\n- ### [Data Cleaning](1-text-preprocessing/1.0-text-preprocessing.ipynb)\n\n  - This step involves removing unnecessary characters like special symbols, extra spaces, and formatting inconsistencies.\n\n- ### [Tokenization](1-text-preprocessing/1.2-tokenization.ipynb)\n\n  - Tokenization breaks the text into smaller units, such as words - or sentences, making it easier to process.\n\n- ### [Stemming](1-text-preprocessing/1.3-stemming.ipynb)\n\n  - Stemming reduces words to their base or root form (e.g., - \"running\" becomes \"run\").\n\n- ### [Lemmatization](1-text-preprocessing/1.4-lemmatization.ipynb)\n\n  - Lemmatization is similar to stemming, but it considers the context and converts words to their dictionary form (e.g., \"better\" becomes \"good\").\n\n---\n\n## Text Representation\n\nConverting text into a format that machines can process is essential for any NLP task. Different techniques serve different purposes:\n\n- ### [Bag of Words (BoW)](2-text-representation/2.1-bow.ipynb)\n\n  - This method represents text as a set of word counts. While it's - simple and fast, it doesn't capture the context or semantic relationships between words.\n\n- ### [n-grams](2-text-representation/2.3-n-gram.ipynb)\n\n  - n-grams represent sequences of words. They can capture some - context and relationships between connected words, but they might require parameter tuning (e.g., n value).\n\n- ### [TF-IDF](2-text-representation/2.2-tf-idf.ipynb)\n\n  - TF-IDF emphasizes the importance of unique and relevant words by - considering both frequency and rarity in the document.\n\n- ### [Word Embeddings](2-text-representation/2.4-word-embeddings.ipynb)\n\n  - Word embeddings represent words as dense vectors in continuous space. They capture semantic similarities and relationships between words.\n\n- ### [Transformer-Based Models](2-text-representation/2.5-transformer-based.ipynb)\n\n  - Transformers (like BERT and GPT) use self-attention mechanisms to understand context and relationships in text, making them more powerful for complex NLP tasks.\n\n---\n\n## Probabilistic Language Models\n\nThese models calculate probabilities to predict the next word or sequence of words. Some popular models include:\n\n- ### [N-gram Models](3-probabilistic-language-models/3.1-n-gram-models.ipynb)\n\n  - N-grams are the simplest form of probabilistic models that predict the next word based on the previous words.\n\n- ### [Hidden Markov Models](3-probabilistic-language-models/3.2-hidden-markov-models.ipynb)\n\n  - HMMs use states and transitions between them to model sequential data, which can be useful for tasks like POS tagging or speech recognition.\n\n- ### [Maximum Entropy Models](3-probabilistic-language-models/3.3-maximum-entropy-models.ipynb)\n\n  - These models use probability distributions to estimate the likelihood of different outcomes in NLP tasks, ensuring no bias toward any specific outcome.\n\n---\n\n## Deep Learning Based Language Models\n\nDeep learning models have revolutionized NLP, as they can learn complex patterns in large datasets. Some key models include:\n\n- ### [RNNs (Recurrent Neural Networks)](4-deep-learning-based-language-models/4.2-rnn.ipynb)\n\n  - RNNs are designed to handle sequential data by maintaining hidden states that capture information from previous time steps.\n\n- ### [LSTMs (Long Short-Term Memory)](4-deep-learning-based-language-models/4.3-lstm.ipynb)\n\n  - LSTMs are a type of RNN that mitigate the vanishing gradient problem, allowing them to capture longer-range dependencies in data.\n\n- ### [Transformers](4-deep-learning-based-language-models/4.4-transformers.ipynb)\n\n  - Transformers use self-attention to capture dependencies between all words in a sentence, making them more efficient for tasks like machine translation and text generation.\n\n- ### [BERT](4-deep-learning-based-language-models/4.4-bert.ipynb)\n\n  - BERT is a transformer-based model that focuses on understanding the context of words in a sentence. It's used for tasks like question answering and sentence classification.\n\n- ### [GPT](4-deep-learning-based-language-models/4.5-gpt.ipynb)\n\n  - GPT is a generative transformer model that excels at text - generation and can be fine-tuned for various NLP tasks.\n\n- ### [Llama](7-models-and-tools/7.5-llama.ipynb)\n\n  - Llama (Large Language Model Meta AI) is a family of transformer-based language models developed by Meta. It is widely used in NLP tasks such as text generation, classification, and more.\n\n---\n\n## Basic NLP\n\n- ### [Text Classification](5-basic-nlp/5.0-text-classification.ipynb)\n\n  - Text classification assigns labels to text based on its content. Popular techniques include Naive Bayes, SVMs, and deep learning models like LSTMs.\n\n- ### [Named Entity Recognition (NER)](5-basic-nlp/5.1-named-entity-recognition.ipynb)\n\n  - NER identifies entities like people, places, and organizations in text. It's used in information extraction tasks.\n\n- ### [Morphological Analysis](5-basic-nlp/5.2-morphological-analysis.ipynb)\n\n  - This involves analyzing words based on their structure, including processes like stemming and lemmatization.\n\n- ### [Part of Speech (POS)](5-basic-nlp/5.3-part-of-speech.ipynb)\n\n  - POS tagging assigns grammatical labels (e.g., noun, verb) to words in a sentence.\n\n- ### [Word Sense Disambiguation (WSD)](5-basic-nlp/5.4-word-sense-disambiguation.ipynb)\n\n  - WSD aims to determine which meaning of a word is activated by its context, using techniques like Lesk algorithm or cosine similarity.\n\n- ### [Sentiment Analysis](5-basic-nlp/5.5-sentiment-analysis.ipynb)\n\n  - Sentiment analysis determines the sentiment (positive, negative, or neutral) behind a piece of text, often used in product reviews and social media analysis.\n\n---\n\n## Advanced NLP\n\n- ### [Question Answering](6-advanced-nlp/6.0-question-answering.ipynb)\n\n  - Learn about extracting answers from a set of documents or a knowledge base, making it one of the most advanced NLP tasks.\n\n- ### [Information Retrieval](6-advanced-nlp/6.1-information-retrieval.ipynb)\n\n  - IR systems find relevant information from large datasets or databases based on a user's query.\n\n- ### [Recommendation Systems](6-advanced-nlp/6.2-recommendation-systems.ipynb)\n\n  - Recommendation systems suggest products, movies, or services based on user preferences and historical data.\n\n- ### [Machine Translation](6-advanced-nlp/6.3-machine-translation.ipynb)\n\n  - Machine translation automatically translates text from one language to another using NLP techniques.\n\n- ### [Text Summarization](6-advanced-nlp/6.4-text-summarization.ipynb)\n\n  - Text summarization creates a short summary of a long text while preserving its key information.\n\n---\n\n## Models and Tools\n\n- ### [GPT \u0026 Gemini](7-models-and-tools/7.0-gpt-and-gemini/7.0.0-gpt-and-gemini.ipynb)\n\n  - Learn about advanced language models like GPT and Gemini, which are used for various NLP tasks such as text generation, conversation, and summarization.\n\n- ### [Pipelines, Actions, Functions](7-models-and-tools/7.1-pipelines-actions-functions/7.1.0-pipelines-actions-functions.ipynb)\n\n  - This section teaches you how to set up an NLP pipeline and create reusable actions and functions for different tasks.\n\n- ### [RAG (Retrieval-Augmented Generation)](7-models-and-tools/7.2-rag/7.2.0-rag.ipynb)\n\n  - RAG combines information retrieval with text generation, allowing models to use external knowledge for tasks like question answering.\n\n- ### [HuggingFace](7-models-and-tools/7.3-huggingface/7.3.0-huggingface.ipynb)\n\n  - HuggingFace provides state-of-the-art models and tools for NLP - tasks. Learn how to use their pre-trained models for various NLP applications.\n\n- ### [OpenWebUI](7-models-and-tools/7.4-openwebui/7.4.0-openwebui.ipynb)\n\n  - OpenWebUI provides a web-based user interface for interacting with language models, enabling users to easily work with them through a browser interface.\n\n- ### [LangChain](7-models-and-tools/7.5-langchain/7.5.0-langchain.ipynb)\n\n  - LangChain connects language models with external data sources and helps build complex applications, such as question-answering systems, recommendation engines, or other data-driven NLP tasks.\n\n- ### [Ollama](7-models-and-tools/7.6-ollama/7.6.0-ollama.ipynb)\n\n  - OLLAMA allows easy integration of language models into applications, making it simple to deploy models in various production environments.\n\n---\n\n## Usage\n\nFollow these steps to get started with this repository:\n\n1. Clone the repository:\n   `git clone https://github.com/erenisci/nlp-learning.git`\n\n2. Install the necessary dependencies:\n   `pip install -r requirements.txt`\n\n3. Open the desired notebook and run the code.\n\n---\n\n## Contributing\n\nWe welcome contributions to this project! Please follow these steps to contribute:\n\n1. Fork the repository.\n2. Create a new branch for your feature (`git checkout -b feature-name`).\n3. Commit your changes (`git commit -am 'Add new feature'`).\n4. Push to your branch (`git push origin feature-name`).\n5. Open a pull request.\n\n---\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferenisci%2Fnlp-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferenisci%2Fnlp-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferenisci%2Fnlp-learning/lists"}