NLP 学习笔记 / NLP001

NLP:从语言特点到研究应用

自然语言处理(NLP)用计算方法处理人类语言,通过人工规则或从数据中学习模式,完成分析、信息提取、预测和生成等任务。 大语言模型是其中一类技术。 [1]

NLP: from language to research applications

Natural language processing (NLP) uses computational methods to work with human language. Systems use explicit rules or learn patterns from data to analyze, extract, predict, and generate information. Large language models are one family of technologies within this field. [1]

  • 章节 / section
  • 关键概念 / key term
  • 阅读提示 / reading note
ELLE · 阅读向导 / READING COMPANION

把概念连起来,再往下读 / Take a moment to connect the ideas

和 Elle 一起理清基础概念 / A few foundations, with Elle

需要时展开术语解释,再用一个小问题检验理解。 / Open a term when you need it, then try one quick question.

自然语言处理 / NLP

用计算方法分析和生成人类语言。 / Computational methods for analysing and generating human language.

语境 / Context

前后文和使用场景会影响一句话的含义。 / The surrounding words and situation help determine what an expression means.

总结类任务 / Summarization

在保留重要信息的前提下,把较长的文字整理得更简洁。 / Condensing a longer text while retaining its important information.

同一句话在不同语境下,含义可能不同吗? / Can the same sentence mean different things in different contexts?

一图梳理

NLP 信息图:语言特点、模型、常见任务、语音分析及访谈应用

The big picture

NLP study diagram covering language features, models, common tasks, speech analysis, and interview applications

看视频这一段 / Watch this part

语言里的信息

观察层面关注的问题例子
词的构造与词义词怎样组成,表达什么意义?happy → unhappy;“满意”与“不满意”
句子结构与句意谁做什么,评价指向谁,是否存在转折?“解释很清楚,但等得太久”:肯定解释,不满等待
前后文与表达意图指代谁?为什么在这个情境下这样说?“说明有点难懂”可能是在请求进一步解释

这些是理解语言的视角,不是每个模型都必须依次执行的步骤。 [1][2]

语言构造、句法、语义与语境的概念示意图
信息图语言构造、句法、语义与语境的概念示意图点击查看大图

语言分析的示意图,并非模型内部的固定层级。NLU 与 NLG 不必遵循严格相反的处理路线;语境也不局限于某一层。

Information in language

PerspectiveWhat to look forExample
Word structure and meaningHow words are formed and what they meanhappy → unhappy; “satisfied” versus “not satisfied”
Sentence structure and meaningRoles, evaluation targets, and contrasts“The explanation was clear, but the wait was too long” evaluates two things differently
Context and intentReferences across sentences and the purpose of an utterance“These instructions are confusing” may be a request for clarification

These perspectives help explain language; they are not mandatory sequential stages in every model. [1][2]

Conceptual illustration of morphology, syntax, semantics, and pragmatics
InfographicConceptual illustration of morphology, syntax, semantics, and pragmaticsClick to open full size

A conceptual illustration, not a fixed architecture inside a model. NLU and NLG need not follow strictly inverse pipelines, and context matters across perspectives.

看视频这一段 / Watch this part

语音分析:除了说什么,还看怎么说

线索关注内容
音量声音的大小及变化
语速说话的快慢及变化
表达方式语调、重音、停顿等

听一听:同一句话,两位患者

“I am okay with this treatment.”“我可以接受这个治疗。”

患者 A听起来很确定

约 1.6 秒 · 一口气说完,没有停顿

患者 B听起来有些犹豫

约 3.2 秒 · 语速更慢,中间有两处约 0.4 秒的停顿

两段录音转写成文字后完全一样。它们的音量几乎相同,差别主要在语速和停顿;而这些正是转写文本会丢掉的线索。语音分析可以标出值得再听一遍的片段,但它提供的是线索,不是诊断。

示例音频为本篇笔记配套视频制作的合成语音,并非真实患者录音;时长与停顿根据音频测量。

这些声学与韵律线索需要结合话语内容和情境理解。普通转写文本通常不能完整保留它们;分析时需要音频或相应声学特征。语音分析与文本分析可以结合使用,但测量声音特征并不等同于理解语言内容。 [3]

Speech analysis: how something is said

CueWhat it captures
LoudnessHow loud or soft the voice is, and how it changes
Speaking rateHow quickly or slowly someone speaks
DeliveryIntonation, stress, pauses, and related patterns

Listen: same words, two patients

“I am okay with this treatment.”

Patient Asounds sure

About 1.6 s · one smooth phrase, no pauses

Patient Bsounds unsure

About 3.2 s · slower, with two pauses of about 0.4 s

Transcribed, both recordings read exactly the same. Their loudness is almost identical; the difference lies mainly in speaking rate and pauses, which are the cues a transcript drops. Voice analysis can flag moments like this for a second listen. It offers a cue, not a diagnosis.

The clips are synthesized voices made for this note's companion video, not recordings of real patients. Durations and pauses were measured from the audio.

Interpret acoustic and prosodic cues alongside the words and the situation. A plain transcript usually does not preserve all of them; analysis needs audio or the relevant acoustic features. Speech and text analysis can be combined, but measuring vocal features is different from interpreting linguistic content. [3]

看视频这一段 / Watch this part

常见任务

任务解决什么问题
情感分析对什么持正面、负面或混合评价?
情绪线索识别表达中有哪些直接或间接的情绪线索?线索不等于临床诊断
信息提取找出研究需要的主题、实体或事件,组织为字段/标签并关联原文
总结类任务(summarization)归纳要点,形成访谈总结、会议总结或材料概览,保留重要转折与不确定性
翻译与问答跨语言表达信息,或针对材料回答问题

总结类任务关注内容要点,语音分析关注声音及表达线索,两者可以在同一工作流中使用。

Common tasks

TaskThe question it addresses
Sentiment analysisWhat is being evaluated positively, negatively, or in mixed terms?
Emotion cue recognitionWhat feelings are expressed or implied? A cue is not a clinical diagnosis
Information extractionWhich themes, entities, or events should become fields or labels linked to the source?
SummarizationWhat are the main points of an interview, meeting, or body of material? Preserve important contrasts and uncertainty
Translation and question answeringHow can information be expressed in another language, or used to answer a question?

Summarization concerns the key content, while speech analysis examines vocal cues. A workflow can use both.

看视频这一段 / Watch this part

我的思考与应用

我的理解

从词、句子到语境,NLP 的入口是语言本身;把语言特点和具体任务联系起来,框架就更容易理解。

我的应用方向

我过去通过手动标记和关键词提取处理访谈。接下来想尝试用 NLP 辅助整理,并归纳受访者表达的主要观点。

  1. 研究问题
  2. 所需信息
  3. 字段/标签
  4. 回到原文核对

是否有效,需要看遗漏、标签质量,以及纠错后真正节省的时间。

下一步探索

文本如何成为模型输入

My perspective & use case

My starting point

Language itself makes NLP more approachable. Connecting words, sentences, and context to specific tasks helps me understand the broader framework.

My research direction

I have worked with interviews by manually marking passages and extracting keywords. I want to explore NLP-assisted organization and summaries of participants' main points.

  1. Research question
  2. Information needed
  3. Fields or labels
  4. Source check

Usefulness depends on omissions, label quality, and time saved after corrections.

Exploring next

How text becomes model input

看视频这一段 / Watch this part

手写笔记

中英文手写 NLP 笔记,记录模型、语言特点、情感分析、语音与文本任务

一页关于语言特点、常见任务与语音表达的学习记录。

Handwritten notes

Original bilingual handwritten NLP notes on models, language, sentiment, speech, and text tasks

A working note on language features, common tasks, and vocal expression.

References

  1. Jurafsky & Martin, Speech and Language Processing ↗
  2. Words and Tokens ↗
  3. audEERING, prosody and speech features ↗

Further reading

Tang et al. (2023), evaluating medical evidence summarization ↗

Its findings concern particular models and a specific task; they do not validate an interview-analysis workflow.

原图 / Original ↗