Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Natural Language APIとその裏側を覗く〜完全版〜
Search
akatsuki174
August 27, 2017
Technology
1
1.5k
Natural Language APIとその裏側を覗く〜完全版〜
5分に収まるように削らなかったバージョンの資料です。
削った方は08/28 potatotips #43で使用します。
akatsuki174
August 27, 2017
Tweet
Share
More Decks by akatsuki174
See All by akatsuki174
SwiftUI、UIKitでキャプチャを撮ろう!
akatsuki174
1
44
Appleにおけるプライバシーの全容を把握する
akatsuki174
0
5.4k
近年のAppleにおける位置情報とプライバシー
akatsuki174
3
400
オフライン勉強会ぼっち対策
akatsuki174
1
590
Xcode 15の新機能
akatsuki174
0
2.6k
AndroidにもSelect Photosがやってきた
akatsuki174
0
1.2k
Famm Android改善記
akatsuki174
0
350
Flutterアプリ開発にネイティブコードはどこまで求められるのか
akatsuki174
2
4.5k
UIKitのアップデート #WWDC22
akatsuki174
4
1.3k
Other Decks in Technology
See All in Technology
Working as a Server-side Engineer at LY Corporation
lycorp_recruit_jp
0
380
サーバーなしでWordPress運用、できますよ。
sogaoh
PRO
0
120
Storage Browser for Amazon S3
miu_crescent
1
290
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
3
280
2024年にチャレンジしたことを振り返るぞ
mitchan
0
150
能動的ドメイン名ライフサイクル管理のすゝめ / Practice on Active Domain Name Lifecycle Management
nttcom
0
250
Qiita埋め込み用スライド
naoki_0531
0
5.3k
オプトインカメラ:UWB測位を応用したオプトイン型のカメラ計測
matthewlujp
0
200
5分でわかるDuckDB
chanyou0311
10
3.3k
小学3年生夏休みの自由研究「夏休みに Copilot で遊んでみた」
taichinakamura
0
180
[トレノケ雲の会 mod.13] 3回目のre:Inventで気づいたこと -CloudOperationsを添えて-
shintaro_fukatsu
0
110
APIとはなにか
mikanichinose
0
110
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
A better future with KSS
kneath
238
17k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.6k
Site-Speed That Sticks
csswizardry
2
190
Code Reviewing Like a Champion
maltzj
521
39k
YesSQL, Process and Tooling at Scale
rocio
170
14k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Transcript
Natural Language APIͱ ͦͷཪଆΛ͘ ʙશ൛ʙ @akatsuki174
ࣗݾհ • ਢ౻ຘ • iOSΤϯδχΞ • גࣜձࣾZaimॴଐ • Twitter, Qiita,
SlideShare, Github, SpeakerDeck →akatsuki174
None
એ̍ 10/13(ۚ)ɺ10/20(ۚ)ͷ2days 19:20ʙ
એ̎ 9/1(ۚ) 19:30ʙ
ࢲͱࣗવݴޠॲཧ ɾେֶͷଔۀݚڀͰΏΔΏΔ1ؒ ʢॏཁޠఆʣ ɾ࠷ॳͷձࣾͰ2,3ϲ݄ ʢτϐοΫఆʣ ɾ2ࣾͰΏΔΏΔ ʢSolrͰݕࡧνϡʔχϯάʣ
ࠓճͷࢿྉɺ͜ͷొஃࢿྉΛ࡞ΔաఔͰઢͯ͠ ௐͨ͜ͱΛ·ͱΊͨࢿྉʹͳΓ·͢ɻ 9/17() Track C 14:40ʙΑΖ͓͘͠ئ͍͠·͢ʂ
ɾNatural Language Processing and your ɹApps[WWDC 2017]ͷͬ͘͟Γͱͨ͠༰ ɾཪଆͰΘΕ͍ͯΔٕज़ʹ͍ͭͯ ࠓ͢͜ͱ
ɾϑΝʔετύʔςΟΞϓϦͰͲͷΑ͏ͳ ɹ׆༻͕͞ΕΔ͔ ɾNLP APIͱ ɾ͋ͳͨͷΞϓϦͰͲͷΑ͏ʹ͏ͱ ɹྑ͍͔ʢͨͿΜɻ·ͩશ෦؍ͯͳ͍ʣ Natural Language Processing and
your Apps
ɾϑΝʔετύʔςΟΞϓϦͰͲͷΑ͏ͳ ɹ׆༻͕͞ΕΔ͔ ɾNLP APIͱ ɾ͋ͳͨͷΞϓϦͰͲͷΑ͏ʹ͏ͱ ɹྑ͍͔ʢͨͿΜɻ·ͩશ෦؍ͯͳ͍ʣ Natural Language Processing and
your Apps
Natural Language Processing and your Apps https://developer.apple.com/videos/play/wwdc2017/208/ Go to iMessage
app
Natural Language Processing and your Apps https://developer.apple.com/videos/play/wwdc2017/208/ Go to News
app
Natural Language Processing and your Apps https://developer.apple.com/videos/play/wwdc2017/208/ Back to iMessage
app
ݻ༗දݱநग़ͷٕज़Λ͍ͬͯΔ ͷͰɺͦ͜Λ۷ΓԼ͛ͯΈ·͢ ʢҎԼɺiOSશؔ͘ͳ͍ʹͳΓ·͢ʣ ͓ͦΒ͘ɺ
ݻ༗໊ࢺʢਓ໊ɺ໊ʣɺ࣌ؒදݱ ʢɺ࣌ࠁʣͳͲΛςΩετ͔Βநग़͢Δٕज़ ͜ͷٕज़͕ొͨ͠എܠ ɹɾࣙॻʹ୯ޠ͕ొ͞Ε͍ͯͳ͍ͱղੳ ɹɹޡΓΛҾ͖ى͜͢ͷͰࣗಈͰநग़͍ͨ͠ ɹɾจষʹ͓͍ͯॏཁͳใ্هͷ ɹɹΑ͏ͳݻ༗දݱͰ͋Δ ݻ༗දݱநग़ͱ
ଠ5݄18ͷே9࣌ʹՖࢠʹձ͍ʹߦͬͨɻ ↓ɹநग़ʂ ଠʢpersonʣ5݄18ʢdateʣͷே9࣌ ʢtimeʣʹՖࢠʢpersonʣʹձ͍ʹߦͬͨɻ ݻ༗දݱநग़ͷྫ
ɾ࣭ԠγεςϜɺରγεςϜɹ ɹʢWatsonɺνϟοτϘοτʣ ɾใநग़ ݻ༗දݱநग़ͷ׆༻υίϩ
ɾ࣭ԠγεςϜɺରγεςϜɹ ɹʢWatsonɺνϟοτϘοτʣ ɾใநग़ ݻ༗දݱநग़ͷ׆༻υίϩ ࣗવݴޠ͔Βݻ༗දݱΛநग़͠ɺͦͷݻ༗දݱΛ ΫΤϦͱͯ͛ͯ͠จॻݕࡧΛߦ͏ɻಘΒΕͨճ ͱݻ༗දݱΛͱʹճީิΛ࡞͠ɺͦͷதͰ είΞ͕ߴ͍ͷΛճͱ͢Δɻ
࣭ԠγεςϜɺରγεςϜ ौ୩Ͱ໌19:30͔Β༧ Ͱ͖ΔళΛ୳ͯ͠ʂ q=ौ୩, ໌19:30 ճީิ࡞ ※࣮ࡍʹଞͷޠ͍͛ͯΔͣ ͳΔ΄Ͳ͒ʂ είΞܭࢉ
ɾ࣭ԠγεςϜɺରγεςϜɹ ɹʢWatsonɺνϟοτϘοτʣ ɾใநग़ ݻ༗දݱநग़ͷ׆༻υίϩ ༧ΊܾΊͨʮΓ͍ͨ͜ͱ߲ʯΛຒΊΔܗͰใ Λநग़͢Δ͜ͱɻߏԽ͞Ε͍ͯͳ͍ςΩετใ ΛߏԽ͞Εͨσʔλϕʔεܗࣜʹม͢Δ͜ͱͱ ଊ͑Δ͜ͱ͕Ͱ͖Δɻ
ݻ༗දݱநग़ͷ׆༻υίϩ ࡢ͋ͬͨͷ࠷େɺ Ϛάχνϡʔυɺݯʹ ͍ͭͯΓ͍ͨ ʔʔʔ Ϛάχνϡʔυ Mʔ ݯ ʙݝʙࢢ
※ͪΐͬͱΠϝʔδਤҧ͏͔ ςΩετ͔Βݻ༗දݱΛநग़
ɾࣝϕʔεख๏ ɾ౷ܭతख๏ ݻ༗දݱநग़Λ͢Δʹ
ɾنଇʢύλʔϯʣΛਓखͰ࡞͠ɺ ɹͦΕʹͯ·ΔͷΛநग़͢Δ ɹྫʣ໊ࢺʴʮ͞Μʯˠਓ໊ ɹɹɹ໊ࢺʴʮࢯʯˠ໊ ɾنଇΛཏతʹߏங͠Α͏ͱ͢Δͱ ɹലେͳίετ͕͔͔Δ ࣝϕʔεख๏
ɾڭࢣ͋ΓֶशΛͤ͞ɺநग़نଇΛࣗಈ ɹֶश͢ΔΑ͏ʹ͢Δ ɾSVMʢSupport Vector Machine / ࣝผ ɹؔʣCRFʢConditional Random ɹFields
/ ࣝผϞσϧʣ͕༗໊ ౷ܭతख๏
͍Ζ͍Ζ͍͕͠ग़͖ͯͨ͠ɺຊޠͷ ղੳͱͯෳࡶ ͳͷͰݻ༗දݱநग़Λָʹ͢ΔπʔϧΛ հͯ͠Έ·͢ɻ
ɾMeCab ͱڞʹ͏୯ޠ͔ͪॻ͖ࣙॻ ɾ࠷݄2ճΞοϓσʔτ ɹɾ৽ޠɺݻ༗දݱʹڧ͍ ɾApache License 2.0 ɾࠃ࢈ mecab-ipadic-NEologd
ɾಈ࡞ʹඞཁͳϥΠϒϥϦͷΠϯετʔϧ $ brew install mecab mecab-ipadic git curl xz ɾgit
clone $ git clone --depth 1 https://github.com/ neologd/mecab-ipadic-neologd.git ɾcloneͨ͠σΟϨΫτϦͰΠϯετʔϧ $ ./bin/install-mecab-ipadic-neologd -n Πϯετʔϧ
ɾશ෦ೖΓͳmecab-ipadic-NEologdΛ ɹΠϯετʔϧ $ ./bin/install-mecab-ipadic-neologd -n -a ɾΠϯετʔϧઌΛ֬ೝ $ echo `mecab-config
--dicdir`"/mecab- ipadic-neologd" Πϯετʔϧ
ɾී௨ͷIPAࣙॻΛ͏߹ $ mecab ɾNEologdΛ͏߹ $ mecab -d [ΠϯετʔϧઌΛࢦఆ] ͬͯΈΔ
ɾී௨ͷIPAࣙॻ ྫจʣϝϩϯύϯΛ৯·ͨ͠ ϝϩϯ ໊ࢺ,Ұൠ,*,*,*,*,ϝϩϯ,ϝϩϯ,ϝϩϯ ύϯ ໊ࢺ,Ұൠ,*,*,*,*,ύϯ,ύϯ,ύϯ Λ ॿࢺ,֨ॿࢺ,Ұൠ,*,*,*,Λ,Ϯ,Ϯ ৯ ಈࢺ,ཱࣗ,*,*,Ұஈ,࿈༻ܗ,৯Δ,λϕ,λϕ
·͠ ॿಈࢺ,*,*,*,ಛघɾϚε,࿈༻ܗ,·͢,Ϛγ,Ϛγ ͨ ॿಈࢺ,*,*,*,ಛघɾλ,جຊܗ,ͨ,λ,λ ൺֱͯ͠ΈΔ̍
ɾNEologd ྫจʣϝϩϯύϯΛ৯·ͨ͠ ϝϩϯύϯ ໊ࢺ,ݻ༗໊ࢺ,Ұൠ,*,*,*,ϝϩϯύϯ,ϝ ϩϯύϯ,ϝϩϯύϯ Λ ॿࢺ,֨ॿࢺ,Ұൠ,*,*,*,Λ,Ϯ,Ϯ ৯ ಈࢺ,ཱࣗ,*,*,Ұஈ,࿈༻ܗ,৯Δ,λϕ,λϕ ·͠
ॿಈࢺ,*,*,*,ಛघɾϚε,࿈༻ܗ,·͢,Ϛγ,Ϛγ ͨ ॿಈࢺ,*,*,*,ಛघɾλ,جຊܗ,ͨ,λ,λ ൺֱͯ͠ΈΔ̍
ɾී௨ͷIPAࣙॻ ྫจʣ3݄ͷϥΠΦϯΛಡΜͩ 3 ໊ࢺ,,*,*,*,*,* ݄ ໊ࢺ,Ұൠ,*,*,*,*,݄,πΩ,πΩ ͷ ॿࢺ,࿈ମԽ,*,*,*,*,ͷ,ϊ,ϊ ϥΠΦϯ ໊ࢺ,Ұൠ,*,*,*,*,ϥΠΦϯ,ϥΠΦϯ,ϥΠΦϯ
Λ ॿࢺ,֨ॿࢺ,Ұൠ,*,*,*,Λ,Ϯ,Ϯ ಡΜ ಈࢺ,ཱࣗ,*,*,ޒஈɾϚߦ,࿈༻λଓ,ಡΉ,Ϥϯ,Ϥϯ ͩ ॿಈࢺ,*,*,*,ಛघɾλ,جຊܗ,ͩ,μ,μ ൺֱͯ͠ΈΔ̎
ɾNEologd ྫจʣ3݄ͷϥΠΦϯΛಡΜͩ 3݄ͷϥΠΦϯ ໊ࢺ,ݻ༗໊ࢺ,Ұൠ,*,*,*,3݄ͷϥΠ Φϯ,αϯΨπϊϥΠΦϯ,αϯΨπϊϥΠΦϯ Λ ॿࢺ,֨ॿࢺ,Ұൠ,*,*,*,Λ,Ϯ,Ϯ ಡΜ ಈࢺ,ཱࣗ,*,*,ޒஈɾϚߦ,࿈༻λଓ,ಡΉ,Ϥ ϯ,Ϥϯ
ͩ ॿಈࢺ,*,*,*,ಛघɾλ,جຊܗ,ͩ,μ,μ ൺֱͯ͠ΈΔ̎ ΞχϝλΠτϧ ͳͲOK
ɾී௨ͷIPAࣙॻ ྫจʣApple WatchΛങͬͨɻ Apple ໊ࢺ,ݻ༗໊ࢺ,৫,*,*,*,* Watch ໊ࢺ,Ұൠ,*,*,*,*,* Λ ॿࢺ,֨ॿࢺ,Ұൠ,*,*,*,Λ,Ϯ,Ϯ ങͬ
ಈࢺ,ཱࣗ,*,*,ޒஈɾϫߦଅԻศ,࿈༻λଓ,ങ͏, Χο,Χο ͨ ॿಈࢺ,*,*,*,ಛघɾλ,جຊܗ,ͨ,λ,λ ɻ ه߸,۟,*,*,*,*,ɻ,ɻ,ɻ ൺֱͯ͠ΈΔ̏
ɾNEologd ྫจʣApple WatchΛങͬͨɻ Apple Watch ໊ࢺ,ݻ༗໊ࢺ,Ұൠ,*,*,*,Apple Watch,Ξο ϓϧΥον,ΞοϓϧΥον Λ ॿࢺ,֨ॿࢺ,Ұൠ,*,*,*,Λ,Ϯ,Ϯ
ങͬ ಈࢺ,ཱࣗ,*,*,ޒஈɾϫߦଅԻศ,࿈༻λଓ,ങ͏, Χο,Χο ͨ ॿಈࢺ,*,*,*,ಛघɾλ,جຊܗ,ͨ,λ,λ ɻ ه߸,۟,*,*,*,*,ɻ,ɻ,ɻ ൺֱͯ͠ΈΔ̏ ۭനεϖʔε͕ ͋ͬͯOK
͍͢͝ ʢখฒײʣ
Կ͕ݴ͍͍͔ͨΘ͔Βͳ͘ ͳ͖ͬͯͨͷͰऴΘΓʹ͠·͢
͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ