Skip to Content
Python和NLTK实现自然语言处理
book

Python和NLTK实现自然语言处理

by Posts & Telecom Press, Nitin Hardeniya
February 2024
Intermediate to advanced
649 pages
9h 58m
Chinese
Packt Publishing
Content preview from Python和NLTK实现自然语言处理

第10章 NLP系统的评估——性能分析

对NLP系统进行评估后,我们就可以分析给定的NLP系统是否能够生成所需的结果,所期望的性能是否能够达到。可以使用预定义的指标自动执行评估,或者通过将NLP系统的输出与人类输出做比较,手动执行评估。

本章包括以下主题。

  • 对NLP系统进行评估的需求。
  • NLP工具(POS标注器、词干还原器和形态分析器)的评估。
  • 使用黄金数据评估解析器。
  • IR系统的评估。
  • 错误识别指标。
  • 基于词汇匹配的指标。
  • 基于语法匹配的指标。
  • 使用浅层语义匹配的指标。

完成NLP系统的评估工作后,我们就可以分析NLP系统给出的输出是否与预期的人类输出相似。如果在早期阶段就识别出了在模块中的错误,那么更正NLP系统的成本将会降到相当低的程度。

假设要评估一个标注器。可以将标注器的输出与人类的输出作比较来完成评估。很多时候,我们不能找到一个公正的人或专家。此时,可以构建黄金标准测试数据对标注器进行评估。这是一个已得到手动标记的语料库,因此可以认为它是一个标准的语料库,它可以用于对标注器进行评估。如果标注器以标签的形式给出的输出与黄金标准测试数据提供的标签相同,那么我们则认为标注器是正确的。

黄金标准注释语料库的创建是一项重大且昂贵的任务。通过手动标记给定的测试数据来完成这个任务。将以这种方式所选择的标签作为标准标签,用于表示大范围的信息。

可以对NLP系统(如POS标注器、词干还原器、形态分析器、基于NER的系统、机器翻译等)进行评估。思考以下NLTK代码,可以使用这段代码训练一元组标注器。在执行句子标记后,完成评估,检查标记器给出的输出是否与黄金标准测试数据给出的标签相同。 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Java持续交付

Java持续交付

Daniel Bryant, Abraham Marín-Pérez
C++语言导学(原书第2版)

C++语言导学(原书第2版)

本贾尼 斯特劳斯特鲁普
软件开发实践:项目驱动式的Java开发指南

软件开发实践:项目驱动式的Java开发指南

Raoul-Gabriel Urma, Richard Warburton
Spark机器学习实战

Spark机器学习实战

Posts & Telecom Press, Siamak Amirghodsi, Meenakshi Rajendran, Broderick Hall, Shuen Mei

Publisher Resources

ISBN: 9781835083451