hands-dirty-nlp is an open-source course project for NLP beginners, maintained by Datawhale. The course is positioned to help learners who have a machine learning foundation but have not yet started NLP or have limited experience understand model design ideas through code and sort out the technical evolution of each module, so that they know both the trees and the forest.
The course prerequisite is that the required courses are assumed to have been completed. The content is organized by core NLP tasks, including:
-
Text representation: introduces the evolution of converting text into numerical vectors, covering discrete representation (one-hot, bag-of-word, tf-idf), dense representation-word vectors (word2vec, glove), first acquaintance with pretrained models (elmo), as well as autoencoding (bert, ernie, etc.), autoregressive (gpt, etc.), and Prompt.
-
Sequence labeling: using named entity recognition as the entry point, introduces the task overview (labeling methods, evaluation metrics), traditional methods (dictionary matching, CRF, HMM), deep learning methods (LSTM+CRF, BERT+CRF), methods incorporating vocabulary (lattice, FLAT, LEBERT, the importance of positional encoding in NER), and decoding methods (softmax, CRF, span-pointer, segment arrangement).
-
Text classification: using intent recognition as the entry point, introduces the task overview and evaluation metrics, classic deep learning methods (fasttext, text-cnn, lstm), and methods based on pretrained models (bert).
-
Text matching: using query-query matching as the entry point, introduces the task overview, two-tower methods (advantages and disadvantages, dssm, bert two-tower), and interaction methods (advantages and disadvantages, ESIM, simbert).
-
Text generation: focuses on text-to-text generation, using dialogue generation and machine translation as entry points, and introduces the task overview and methods (dialogue generation: bert-base-s2s, gpt; machine translation: rnn-base-s2s, bert-base-s2s).
-
Reading comprehension: introduces four types of tasks: cloze, multiple choice, answer extraction, and free-form question answering, and uses multiple choice and answer extraction as entry points to introduce classic methods.
The course is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Specific installation commands, code running methods, and detailed usage steps are not provided for now.