What is NLP?

NLP is a field of linguistics and machine learning focused on understanding everything related to human language. The aim of NLP tasks is not only to understand single words individually, but to be able to understand the context of those words. 🔗

Tasks

  1. Spell Check
    1. Using the Web for Language Independent Spellchecking and Autocorrection
    2. Spelling correction
    3. How to Write a Spelling Corrector
  2. Predictive Text/Typing
    1. github/Typing-Assistant
    2. Bayesian Recurrent Neural Networks
    3. Contextual LSTM (CLSTM) models for Large scale NLP tasks
  3. Translation
    1. Language Models are Few-Shot Learners
  4. Dialog Systems/Speech Recognition
    1. Chapter 14, Speech and Language Processing, Daniel Jurafsky & James H. Martin
  5. Sentiment/Opinion Analysis
    1. Sentiment Analysis of Twitter Data
  6. Text Classification
  7. Survey Analysis
  8. Question Answering
    1. Efficient and Robust Question Answering from Minimal Context over Documents
    2. Learning to Compose Neural Networks for Question Answering
    3. CoQA: A Conversational Question Answering Challenge
  9. Natural Language Instruction / Digital Personal Assistant
    1. Translating Navigation Instructions in Natural Language to a High-Level Plan for Behavioral Robot Navigation
    2. Inferring Maps and Behaviors from Natural Language Instructions
    3. Grounding Natural Language Instructions to Mobile UI Actions
  10. Information Extraction, Summarization & Language Compression
  11. Handwriting Recognition

Why is NLP Hard?

  • Semantic ambiguity: a word can have multiple meanings
  • Meaning ambiguity: phrases can have multiple meanings (“Call me an ambulance”)
  • Prepositional phrase attachment ambiguity: “San Jose cops kill man with knife
  • Pronoun reference ambiguity: Dr. Macklin often brings his dog to visit the patients. He just loves to give kisses.
  • Lingo: LOL (laugh out loud), Idk (I don’t know), brb (be right back) etc.
  • Meanings shift across time: same word can have different interpretation over the years
  • Scale: the Web contains billions of words

A spectrum of NLP problems

  • Part-of-Speech Tagging: (tag prepositions, pronouns, adjectives, nouns etc.)
  • Syntactic (Constituency) Tagging: (NP: Noun Phrase (the hungry cat), VP: Verb Phrase (chased the mouse), PP: Prepositional Phrase (in the house), S: Sentence)
  • Syntactic Categories (Lexical and phrasal categories together are called syntactic categories)
  • Dependency Parsing: Dependencies are asymmetrical relations between two lexical items (words)

Unlike constituency parsing, dependency parsing does not utilize the phrasal constituents or sub-phrases.

  • Semantic Analysis
  • Co-reference Resolution
  • Discourse Analysis
  • Learning Representations

HuggingFace Pipelines/Tasks

Text pipelines

  • text-generation: Generate text from a prompt
  • text-classification: Classify text into predefined categories
  • summarization: Create a shorter version of a text while preserving key information
  • translation: Translate text from one language to another
  • zero-shot-classification: Classify text without prior training on specific labels
  • feature-extraction: Extract vector representations of text

Image pipelines

  • image-to-text: Generate text descriptions of images
  • image-classification: Identify objects in an image
  • object-detection: Locate and identify objects in images

Audio pipelines

  • automatic-speech-recognition: Convert speech to text
  • audio-classification: Classify audio into categories
  • text-to-speech: Convert text to spoken audio

Multimodal pipelines

  • image-text-to-text: Respond to an image based on a text prompt