Skip to Content
移动端AI与ML应用开发:基于iOS和Android
book

移动端AI与ML应用开发:基于iOS和Android

by Laurence Moroney
January 2023
Intermediate to advanced
288 pages
6h 6m
Chinese
China Machine Press
Content preview from 移动端AI与ML应用开发:基于iOS和Android
108
7
iOS 上使用 ML Kit 的文本处理
应用程序
在第 6 章中,你了解了如何在 iOS 应用程序中使用 ML Kit 来处理一些计算机视觉场景,
包括图像识别和物体检测。也许机器学习应用程序的下一个最大部分就是那些执行自然
语言处理任务的应用程序。因此,在本章中,我们将通过几个示例来了解 ML Kit 中的
模型如何为你提供一些常见的机器学习任务,包括从文本中提取实体,例如识别电子邮
件地址或日期;进行手写识别,将笔画转为文字;分析对话来生成智能回复。如果你想
创建使用其他自然语言处理概念和自定义模型的应用程序,例如对文本进行分类,那么
你需要构建自己的模型,我们将在后续章节中探讨这一点。
7.1
实体提取
通常,你会希望从文本中提取重要信息。毫无疑问,你已经见过可以确定一段文本中何
时有地址并自动生成指向该地址地图的链接的应用程序,或者其他理解电子邮件地址并
生成链接的应用程序,该链接让你启动电子邮件应用程序来将邮件发送到该地址。这个
概念称为实体提取,在本节中,你将探索为你执行这个操作的完整模型。这是 ML 的一
个非常酷的实现,因为如果考虑如何用基于规则的方法来解决这个问题,那么你将要编
写大量的代码!
因此,请考虑图 7-1,其中我向我的朋友 Nizhoni 发送了一条消息,其内容包含一些详
细信息。阅读后,你自动从中提取有价值的信息并对其进行解析。你会看到“明天下午
5 点”这样的词,并自动推断日期和时间。代码将有很多 if...then 语句!
正文.indd 108正文.indd ...
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

人工智能驱动的商业智能

人工智能驱动的商业智能

Tobias Zwingmann
Lua游戏AI开发指南

Lua游戏AI开发指南

Posts & Telecom Press, David Young
人工智能技术与大数据

人工智能技术与大数据

Posts & Telecom Press, Anand Deshpande, Manish Kumar

Publisher Resources

ISBN: 9787111713081