[レポート] ドメイン固有のデータのための自然言語処理をどのように使うか #AIM363 #reinvent 2019

ラスベガスで開催されたre:Invent2019のセッション「AIM363 - How to use NLP for domain-specific data」に参加したのでレポートします。
2019.12.16

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

AWS re:Invent 2019「AIM363 - How to use NLP for domain-specific data」セッションに参加したのでレポートします。

セッション概要

Market segments like finance, insurance, or manufacturing all have documents and data that are very specific to their business. In this chalk talk, we discuss how you can utilize Amazon Comprehend custom entity recognition and classification, and AutoML features, to build state-of-the-art custom models to extract domain-specific terms and classifiers completely automatically.

Presented by

  • Ben Snively - Solutions Architect, Amazon Web Services
  • Sameer Karnik - Sr. Product Manager - Technical, Amazon Web Services
  • Swapan Golla - Director (Data Analytics & AI/ML), Gallup

レポート

Amazon Comprehend カスタム機能

  • 顧客のもとには、大量の自然言語データで溢れている
    • カスタマーサポート
    • レビュー
    • ニュース
    • 契約書類
    • 調査資料

  • 機械学習を自分で行う必要がない、フルマネージドのNLP体験が求められている
    • ドキュメントをAmazon Comprehendに渡し、エンティティやキーフレーズ、感情判定などを行わせる

  • Amazon Comprehendによるテキスト解析
    • "Amazon.com, Inc., is located in Seattle, WA, and was founded July 5, 1994, by Jess Bezos. Our customers love buying everything from books to blenders ad great prices." という文章を解析させた結果は以下。
    • Named entities
      • Amazon.com: Organization
      • Seattle, WA: Location
      • July 5, 1994: Data
      • Jeff Bezos: Person
    • Key phrases
      • Our customers
      • Books
      • Blenders
      • Great prices
    • Sentiment
      • Postive
    • Language
      • English

  • カスタムエンティティ
    • "I never received the shipment for part number XT1764PY98"
      • XT1764PY98: 固有の製品番号
    • "Trading of ETFs was halted today"
      • ETF: 金融商品
    • "I liked the shawarma but loved the hummus"
      • shawarma, hummus: 料理のメニュー

  • カスタムエンティティレコナイザーを使う
    • サンプル&文書:用語やフレーズのサンプル、それを含んだ文書を準備する
    • 学習:自動で注釈/アルゴリズム選定/チューニングとテスト
    • 解析:ドメイン個別のエンティティを判定する

  • カスタムクラスを使う
    • ラベル付け:トレーニングデータを含んだCSVファイル
    • 学習:自動で注釈/アルゴリズム選定/チューニングとテスト
    • クラス化:非同期またはリアルタイム

Amazon Comprehend コンソールデモ

  • トレーニング用のCSVファイルを準備する

  • コンソールからカスタムクラスのトレーニングを実行

  • トレーニングされたモデルのエンドポイント設定

  • トレーニングされたモデルに、Lambda上からAPIを使ってアクセスする

Gallup

  • Gallup Access platformの紹介
    • マネージャーのための従業員管理ツール
    • NLPによる従業員のカレントレポートの作成

おわりに

実際にデモを交えて、Amazon Comprehendのカスタム機能を使ったドメイン固有データを自然言語処理で認識させる方法の解説でした。
NLPを業務に取り入れようとした場合、一般的な単語だけでなく業務特有の単語やフレーズも自然言語処理で認識させるニーズが出てくるかと思います。
そのようなケースにおいて、Comprehendのカスタム機能によるトレーニングでNLPの機能を強化することは必須になるのではないでしょうか。