Skip to Content
実践 自然言語処理 ―実世界NLPアプリケーション開発のベストプラクティス
book

実践 自然言語処理 ―実世界NLPアプリケーション開発のベストプラクティス

by Sowmya Vajjala, Bodhisattwa Majumder, Anuj Gupta, Harshit Surana, 中山 光樹
February 2022
Intermediate to advanced
512 pages
8h 17m
Japanese
O'Reilly Japan, Inc.
Content preview from 実践 自然言語処理 ―実世界NLPアプリケーション開発のベストプラクティス

3章テキストの表現

言語処理では、テキストデータからベクトル x を導出する。

テキストのさまざまな言語的特性を反映させるために。

—— Yoav Goldberg

特徴抽出は、あらゆる機械学習の問題において重要なステップです。どんなに優れたモデリングアルゴリズムを使っても、貧弱な特徴を投入したら、良い結果は得られません。コンピュータサイエンスでは、これを「ゴミを入れればゴミが出てくる(garbage in, garbage out)」と呼ぶことがあります。これまでの章では、NLPの概要、さまざまなタスクとその課題、そして典型的なNLPパイプラインを紹介してきました。本章では、「テキストデータの特徴エンジニアリングを行うにはどうすればよいか」という問題を取り上げます。つまり、与えられたテキストをどのように数値化して、NLPや機械学習のアルゴリズムに投入するかということです。NLPの用語では、生のテキストを適切な数値形式に変換することをテキスト表現(text representation)と呼びます。本章では、テキスト表現、つまりテキストを数値ベクトルで表現するためのさまざまな手法を紹介します。本章で扱うNLPパイプラインの範囲は、図3-1の点線枠で示されています。

本章で扱うNLPパイプラインの範囲

図3-1 本章で扱うNLPパイプラインの範囲

特徴の表現は、あらゆる機械学習プロジェクトにおいて共通のステップで、データがテキスト、画像、動画、音声のいずれであっても必要です。しかし、テキストの特徴表現は、他の形式のデータと比較して、はるかに複雑であることが多いのです。このことを理解するために、他のデータ形式がどのように数値で表現されるのか、いくつかの例を見てみましょう。まず、画像の場合を考えてみましょう。たとえば、猫の画像と犬の画像を区別できる分類器を作りたいとします。さて、この課題を達成する機械学習モデルを学習させるためには、ラベル付きの画像を与える必要があります。では、どのようにして画像を機械学習モデルに与えればいいでしょうか。画像をコンピュータに保存する場合、ピクセルの行列形式で保存します。ここで、行列の各要素[i,j]が画像のピクセルi,jを表します。 ...

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

実践 bashによるサイバーセキュリティ対策 ―セキュリティ技術者のためのシェルスクリプト活用術

実践 bashによるサイバーセキュリティ対策 ―セキュリティ技術者のためのシェルスクリプト活用術

Paul Troncone, Carl Albing, 髙橋 基信
Sparkによる実践データ解析 ―大規模データのための機械学習事例集

Sparkによる実践データ解析 ―大規模データのための機械学習事例集

Sandy Ryza, Uri Laserson, Sean Owen, Josh Wills, 石川 有, Sky株式会社 玉川 竜司

Publisher Resources

ISBN: 9784873119724Other