Machine Learning: Natural Language Processing¶

Overview¶

The Program is broken into several sections, which are each presented in their own notebook:

  1. Introduction
  2. Sequence to Sequence Model
  3. Translation model
  4. ML Issues in Vietnamese
  5. Demo of API from OpenAI

Introduction¶

Natural language processing (NLP) has been used widely for a very long time ago. However, recently with the high development of Machine Learning, NLP becomes one of the most important tasks in the industry and is used by many giant companies including Google, Amazon, Apple, and Meta. These companies have dedicated teams researching and developing state-of-the-art algorithms and models. Recently, OpenAI gathers a lot of attention by providing their ChatGPT and API for developers. These enhancements show a fast pace picture of NLP industries and the bright future of NLP.

In this project, I will develop a basic NLP model - seq2seq framework and show a demo of API from OpenAI.

Setup¶

Clone or download the repo¶

First get local copies of the program:

$ git clone https://github.com/linhhlp/nlp-ml-1.git

Or download from: https://github.com/linhhlp/nlp-ml-1/archive/main.zip

Install the dependencies¶

This program has been developed and tested on:

  • python 3.8
  • notebook 6.4.6
  • numpy 1.21.5
  • tensorflow 2.5.0
  • tensorflow-gpu 2.5.0
  • tensorflow-addons 0.13.0 (only work with tensorflow versions between 2.3 and below 2.6)
  • sklearn 1.0.2

The quickest, easiest way to install is to use Anaconda:

Installing with anaconda¶

Install anaconda

The quickest, easiest way to install dependencies is to use the command line to create an environment and install the packages:

$ conda env create
$ source activate new_env

Install the remaining dependencies with:

conda install tensorflow sklearn seaborn
pip install tensorflow-addons

References¶

[1] Natural Language Processing with Machine Learning https://www.educative.io/module/nlp-with-ml

[2] TensorFlow Manual and Tutorial: https://www.tensorflow.org/addons/tutorials/networks_seq2seq_nmt

[3] ML in Vietnamese Blog https://blog.luyencode.net/phan-loai-van-ban-tieng-viet/

[4] https://medium.com/@Aj.Cheng/seq2seq-18a0730d1d77

[5] How to Develop an Encoder-Decoder Model https://machinelearningmastery.com/develop-encoder-decoder-model-sequence-sequence-prediction-keras/

In [ ]: