PowerPoint プレゼンテーション

Download Report

Transcript PowerPoint プレゼンテーション

Web-based Ultra-Large-Scale Corpora
at NINJAL
Masayuki ASAHARA, Mizuho IMADA, Sachi YASUDA
Hikari KONISHI, Kikuo MAEKAWA
National Institute for Japanese Language and Linguistics, Japan
Center for Corpus Development
[Introduction]
National Institute for Japanese Language and Linguistics (NINJAL),
Japan
• Founded as the ‘National Language Research Institute’ in 1948
• Located in Tachikawa, Tokyo, since 2005
• ‘Center for Corpus Development’
–
–
–
–
2014/05/19
Released ‘Corpus of Spontaneous Japanese (CSJ)’ (2001-2005).
Released ‘Balanced Corpus of Contemporary Written Japanese (BCCWJ)’ (2006-2010)
Developing ‘NINJAL Historycal/Diachronic Corpus’ (2011-2015)
Developing ‘NINJAL Web Corpus’ (2011-201)
IIPC Open Day
2
[Introduction] An ongoing NINJAL project:
Compilation of a web-scale Japanese corpus
Project goal: To compile a ten billion-word corpus of web texts for
linguistic research
•
•
•
•
Covering rarely occurring linguistic expressions
Ensuring balanced sampling over time (seasons) and domains
Profiling originators
Annotating word boundaries, morphological information, and
syntactic dependency structures
• Providing a search environment including metadata, strings, and
annotations
Project term: Late fiscal year 2011–the end of FY 2015
2014/05/19
IIPC Open Day
3
Table of contents
• Introduction
• Previous studies
– Japanese Web corpora and linguistic resources
• Design of a web-scale Japanese corpus
– Four basic technologies
•
•
•
•
Page collection
Linguistic annotation
Release
Preservation
• Research progress
• Conclusion
2014/05/19
IIPC Open Day
4
[Previous Studies]
JAPANESE WEB CORPORA AND
LINGUISTIC RESOURCES
2014/05/19
IIPC Open Day
5
[Previous Studies]
Basic premise: Copyright Law of Japan
•
‘Publishing collected web texts’ is in a legal grey area
Types of publication
wordlist• Publish word list and n-gram
search • Provide search environment with snippets
• Publish resources by copyrighted content holders
foreign • Compile data in countries other than Japan
NDL • Exception: Web Archiving Project (WARP) by National Diet Library (NDL),
Japan
copyrighted
• Who has created Japanese web-scale language resources (JWLR)?
Types of developer
•
•
•
•
2014/05/19
Private companies
Universities and public institutes
Individuals
Foreign researchers
IIPC Open Day
6
[Previous studies]
JWLRs created by private companies
• Google: ‘Japanese Web n-gram Version 1’
wordlist
wordlist
search
copyrighted
foreign
NDL
– Word n-grams from web texts (255 billion tokens)
• Baidu: ‘Baidu Blog and Forum-Times Corpus’
wordlist
– Word list and n-grams from blogs and BBSs
– Ten million sentences crawled from 2000–2010
• Baidu: ‘Baidu Mobile Web Corpus with Emoji’
wordlist
– Word list and n-grams of texts used for mobile search
• Rakuten: ‘Rakuten Data Release’
copyrighted
– Review data from internet shopping mall
• Yahoo Japan: ‘Yahoo Answers Corpus Version 2’
copyrighted
– 26 million questions and 73 million answers
2014/05/19
IIPC Open Day
7
[Previous studies]
JWLRs by universities and public institutions
wordlist
search
copyrighted
foreign
NDL
• NICT: ‘Japanese Syntactic Dependency Database Version
1.1’
wordlist
– 480 million syntactic dependency relations in 600 million pages
and 43 billion sentences
• Kyoto University: ‘Kyoto-U Case Frames (Version 1.0)’ in
2009
wordlist
– 40,000 case frames from 1.6 billion sentences
• Tsukuba-U: ‘Tsukuba Web Corpus’
search
– 1.1 billion-word text corpus developed by lexical profiling using
Yahoo API
• NDL: ‘Web Archive Project’
NDL
– Web archive of the official websites of Japanese institutions
2014/05/19
IIPC Open Day
8
[Previous studies]
JWLR created by individuals
wordlist
search
copyrighted
foreign
NDL
• Yata: ‘Japanese Web Corpus 2010’
wordlist
– HTML and text archive using the Yahoo API in
2010
– Seed lexicon for Web API is IPADIC-2.7.0
– Provides original texts and word n-grams
2014/05/19
IIPC Open Day
9
[Previous studies]
JWLR created by countries other than Japan
wordlist
search
copyrighted
foreign
NDL
• [Ueyama and Baroni 2005]
foreign
– Two web corpora: 3.5 + 4.5 million words
• [Baroni and Ueyama 2006]
foreign
– Blog data: 62 million words
• [Srdanovic+ 2008]
foreign
– ‘JPWaC 2008’: 400 million words
• [Pomikalek and Suchomel 2012]
foreign
– ‘JpTenTen11’ :10 billion-word text corpus
developed by crawling in 2011
2014/05/19
IIPC Open Day
10
Table of contents
• Introduction
• Previous studies
– Japanese Web corpora and linguistic resources
• Design of a web-scale Japanese corpus
– Four basic technologies
•
•
•
•
Page collection
Linguistic annotation
Release
Preservation
• Research progress
• Conclusion
2014/05/19
IIPC Open Day
11
1.
2.
3.
4.
Page collection
Linguistic annotation
Release
Preservation
[Design of a web-scale Japanese corpus]
FOUR BASIC TECHNOLOGIES
2014/05/19
IIPC Open Day
12
[Design of a web-scale Japanese corpus]
Four basic technologies
1. Page collection
Crawling techniques, strategies, and plans
2. Linguistic annotation
Character normalisation, word segmentation,
morphological information annotation, syntactic
dependency parsing, and register estimation
3. Release
How to make the corpus publicly available
4. Preservation
Web archive in chronological order
2014/05/19
IIPC Open Day
13
[Design of a web-scale Japanese corpus]
Four basic technologies—1. Page collection
Performing remote harvesting (bulk collection) using a web crawler
How?
• Heritrix Crawler (Version 3.1)
– Developed by Internet Archive (United States)
– Used by national libraries (e.g., NDL in Japan)
• Crawling strategy and plan
– Crawling Japanese web pages including spam blogs (splogs) and machinegenerated pages
– Crawling 100 million pages every three months (fixed-point observation)
– Changing target pages yearly
2014/05/19
IIPC Open Day
14
[Design of a web-scale Japanese corpus]
Four basic technologies—2. Linguistic annotation
Four sorts of (automatic) annotation
2.1 Normalisation
– HTML-to-text and character-encoding normalisation
2.2 Japanese morphological analysis
– Word segmentation and POS annotation
2.3 Japanese dependency analysis
– Syntactic dependency structure annotation
2.4 Register estimation
– Metadata alternative
2014/05/19
IIPC Open Day
15
[Design of a web-scale Japanese corpus]
Four basic technologies—2. Linguistic annotation
2.1 Normalisation
• HTML to text and character encoding issues*
– NWC (Nihongo Web Corpus) Toolkit [Yata 2010]
compatible with Google Web Japanese n-gram
method
* Japanese character encoding
Encoding Japanese characters for use on a computer.
Several standard methods exist, including JIS, Shift-JIS,
EUC, and Unicode.
2014/05/19
IIPC Open Day
16
[Design of a web-scale Japanese corpus]
Four basic technologies—2. Linguistic annotation
2.2 Japanese morphological analysis
• Part-of speech (POS) tagset and word unit
– UniDic POS tagset (Kokugo-ken Short Unit)
• Analyser: MeCab with UniDic
– UniDic POS tagset (Kokugo-ken Long Unit)
• Analyser: MeCab with UniDic and Chunker CRF++
– Masuoka–Takubo POS tagset
• Analyser: JUMAN or MeCab with JUMAN compatible
dictionary
– Purely unsupervised word unit without POS
• Analyser: Bayesian unsupervised word segmenter
[Mochihashi 2009]
2014/05/19
IIPC Open Day
17
[Design of a web-scale Japanese corpus]
Four basic technologies—2. Linguistic annotation
2.3 Japanese dependency analysis
• Dependency annotation standard
– Kyoto text corpus standard
• The de facto standard in Japan
• Analyser: KNP or CaboCha
– BCCWJ Standard
• Covers phenomena in web texts
– Sentence fragments, scrambling, URLs, and smileys
• Analyser: CaboCha with the Balanced Corpus of
Contemporary Written Japanese (BCCWJ)
2014/05/19
IIPC Open Day
18
[Design of a web-scale Japanese corpus]
Four basic technologies—2. Linguistic annotation
2.4 Register estimation
• Register (style) as a category of page metadata
– Unsupervised clustering and manual annotation
on the representative pages
– (Semi-supervised) register annotation using
BCCWJ metadata
2014/05/19
IIPC Open Day
19
[Design of a web-scale Japanese corpus]
Four basic technologies—3. Release
Three sorts of release
3.1 Online release—search application
3.2 Offline release—word list and n-gram
release
3.3 Natural language analysers
2014/05/19
IIPC Open Day
20
[Design of a web-scale Japanese corpus]
Four basic technologies—3. Release
3.1 Online release—search application
• 10 billion-scale search application as a web
service
– String search
– Word-unit- and POS-based query
e.g.) Chuunagon by NINJAL using BCCWJ
– Bunsetsu unit and dependency-based query
e.g.) ChaKi.NET by Nara Institute of Science and
Technology (NAIST)
– Facet navigation by register information
2014/05/19
IIPC Open Day
21
[Design of a web-scale Japanese corpus]
Four basic technologies—3. Release
3.2 Offline release—quarterly word list and n-gram
release
– Word list
• With morphological information, orthography-based
– Character n-gram
• Without morphological information, orthography-based
– Word n-gram
• Without morphological information, lemma-based
– Frequent subtrees in dependency structure
– Frequent HTML tags
2014/05/19
IIPC Open Day
22
[Design of a web-scale Japanese corpus]
Four basic technologies—3. Release
3.3 Natural language analysers
Develop natural language analysers for webscale corpus statistics
– Lexicon for Japanese morphological analyser
– Japanese dependency analyzer based on cooccurrence statistics
2014/05/19
IIPC Open Day
23
[Design of a web-scale Japanese corpus]
Four basic technologies—4. Preservation
Preserve the data collected for linguistic studies
to monitor any changes
• Web ARChive (WARC) format
– A web archive preservation format
• Open-source wayback (hot backup)
– Harvesting WARC files on a web application
– Same as internet archives
• Linear Tape-Open (LTO) tape libraries (cold
backup)
2014/05/19
IIPC Open Day
24
Table of contents
• Introduction
• Previous studies
– Japanese Web corpora and linguistic resources
• Design of a web-scale Japanese corpus
– Four basic technologies
•
•
•
•
Page collection
Linguistic annotation
Release
Preservation
• Research progress
• Conclusion
2014/05/19
IIPC Open Day
25
RESEARCH PROGRESS
2014/05/19
IIPC Open Day
26
[Research Progress]
Page collection:
– Began on October 2012 (2012-4Q)
– Crawled six quarters (from 2012-4Q to 2014-1Q)
Linguistic annotation:
– Analyzed four quarters data (from 2012-4Q to 2013-3Q)
Statistical data (from 2012-4Q to 2013-3Q):
–
–
–
–
2014/05/19
Collected pages and page conflicts
Collected links
Analysed data: number of morphemes and sentences
N-grams
IIPC Open Day
27
[Research Progress]
Collected pages from 2012-4Q to 2013-3Q
Tokens of Pages (1 quarter)
Deduplicated Numbers of Pages
2012-4Q
2013-1Q
2013-2Q
2013-3Q
61,668,805
58,844,092
61,479,268
57,892,917
45,933,605
42,932,982
45,111,527
42,192,931
74.5%
Types of URLs (4 quarters)
Numbers of unmodified URLs
Numbers of modified URLs
73.0%
73.4%
72.9%
Statistics of page changes in 4 quarters
64,539,233
27,604,915 (42.7%)
36,934,706 (57.3%)
One quarter statistics
• 100 million crawl attempts → 60 million crawled pages
caused by HTTP errors and observance of the Robots Exclusion Protocol
• 60 million crawled pages → 42-45 million deduplicated pages (72.9-74.5%)
Four quarters statistics
• 42.7 % of URLs are unmodified in four crawls
2014/05/19
IIPC Open Day
28
[Research Progress]
Page conflict in 2012-4Q
copy sites
robots.txt or ‘soft 404’
2014/05/19
IIPC Open Day
29
[Research Progress]
Collected links from 2012-4Q to 2013-3Q
Links (Tokens)
Links (Types)
Links (Types)
2012-4Q
2013-1Q
2013-2Q
2013-3Q
6,905,805,383 6,610,763,700 7,064,611,259 7,222,958,033
892,135,930
843,166,672
865,694,816
855,684,918
Statistics in 4 quarters
1,642,699,579
• Seed URLs 100 million URLs
→ Seven billion links (tokens) in one quarter
843-892 million links (types) in one quarter
⇒ 1.6 billion links (types) in four quarters
2014/05/19
IIPC Open Day
30
[Research Progress]
Incoming links from our seed URLs to target in 2012-4Q
2014/05/19
IIPC Open Day
31
[Research Progress]
Statistics of analyzed data
2012-4Q
Number of WARC files
Number of URLs
Number of Morphemes
(w/o sentence extraction)
Number of Morphemes
(w/ sentence extraction)
Number of Sentences (Tokens)
Number of Sentences (Types)
2013-1Q
2013-2Q
2013-3Q
814
61,668,805
64,714,650,129
870
58,844,092
62,077,520,745
910
61,479,268
63,414,252,638
905
57,892,917
65,736,027,334
33,767,409,441
52.2%
2,678,315,774
1,097,011,506
32,651,138,004
52.6%
2,600,122,908
1,048,772,913
33,073,991,355
52.2%
2,659,617,620
1,063,649,324
30,923,912,566
47.0%
2,478,309,312
1,007,771,383
60 million URLs
⇒60 billion morphemes (without sentence extraction)
⇒30 billion morphemes (with sentence extraction)
filtered out 50% of non-Japanese texts
⇒2.5 billion sentences (tokens) and one billion sentences (types)
2014/05/19
IIPC Open Day
32
[Research Progress]
Sentence Duplication in 2012-4Q data
← appearing only once in the corpus
Titles, anchor texts of links or fixed phrases
← The most frequent one
‘職業とキャリア’
(occupation and career)
in Yahoo! Answers
2014/05/19
IIPC Open Day
33
[Research Progress]
Statistics of n-gram data
Number of morphemes (Tokens)
Number of sentences
1-gram
2-gram
3-gram
4-gram
5-gram
6-gram
7-gram
2014/05/19
Our Web Corpus
(2012-4Q)
(n≧3)
Dedupilicated sentences
18.0 billions
1.0 billions
3.9 millions
47 millions
160 millions
210 millions
170 millions
120 millions
84 millions
IIPC Open Day
Our Web Corpus
Google N-gram
(2012-4Q)
(n≧3)
(n≧20)
Original sentences
33.7 billions
255 billions
2.6 billions
20 billions
5.0 millions
2.5 millions
85 millions
80 millions
440 millions
390 millions
870 millions
700 millions
1030 millions
770 millions
970 millions
680 millions
850 millions
570 millions
34
Rank 1-gram
3-gram
4-gram
Our Web Corpus
1 の
して
て い ます
し て い ます
2012-4Q
2 に
まし た
ていた
て い まし た
Deduplicated
3 て
てい
してい
さ れ て いる
4 が
て いる
し て いる
していた
5 は
した
と 思い ます
されてい
6 を
では
されて
た の です が
7 た
には
に なっ て
て き まし た
8 で
され
の です が
れ て い ます
9 と
ませ ん
し まし た
は あり ませ ん
10 し
い ます
された
に なり まし た
Our Web Corpus
1 の
まし た
記事 へ の
2012-4Q
2 に
でしょ う
お願い し ます
Original
3 を
行っ て
Q&A
利用 する こと が
4 は
思っ て
続き を 読む
機能 を 利用 する
5 て
情報 を
マーク へ 投稿
おすすめ の 知恵 ノート
6 が
利用 規約
専用 ページ を
正確 性 の 保証
7 た
おすすめ の 機能 を 利用
お客様 自身 の 責任
8 で
記事 へ
済み の 質問
回答 を 指示 する
9 と
追加 する
おすすめ の 知恵
便利 に 新規 取得
場合 は
エンターテインメント と 趣味はてな ブック マーク へ
1 の
して
て い ます
し て い ます
2 に
まし た
してい
さ れ て いる
3 を
てい
ていた
4 は
て いる
し て いる
は あり ませ ん
5 て
した
されて
れ て い ます
6 が
ませ ん
に なっ て
て い まし た
7 た
され
し まし た
に なり まし た
8 で
には
された
し て おり ます
9 と
では
10 し
'Google N-gram'
2014/05/19
2-gram
10 し
い ます
IIPCれ
Open
Day
て いる
あり ま せん
‘for the social
記事 へ の トラック bookmark’
専用 ページ を 表示
れてい
‘userさpolicy’
て き まし た
していた
35
Rank 5-gram
Our Web Corpus
1 さ れ て い ます
2012-4Q
2 で は あり ませ ん
Deduplicated
3 と 思っ て い ます
4 し て い まし た
5 で は ない で しょう
6 の で は ない か
7 は ない でしょ う か
8 に なっ て い ます
9 て い まし た が
10 て い た の です
Our Web Corpus
1 記事 へ の トラック バック
2012-4Q
2 機能 を 利用 する こと
Original
3 利用 する こと が でき
4 正確 性 を 保証 し
5 お客様 自身 の 責任 と
6 はてな ブック マーク へ 投稿
7 更新 情報 が 届き ます
8 おすすめ の 解決 済み の
9 すべて の 機能 を 利用
10 質問 年月 や 画像 の
'Google N-gram'
1 さ れ て い ます
2 で は あり ませ ん
3 で お 届け し ます
4 無料 で お 届け し
5 1500 円 以上 国内 配送
6 料 無料 で お 届け
7 配送 料 無料 で お
8 国内 配送 料 無料 で
9 以上 国内 配送 料 無料
10 円 以上 国内 配送 料
6-gram
で は ない でしょ う か
て い た の です が
の で は ない でしょ う
の で は ない か と
に 行っ て き まし た
よう な 気 が し ます
タグ が 付け られ た 質問
の タグ が 付け られ た
さ せ て いただき まし た
たい と 思っ て い ます
機能 を 利用 する こと が
利用 する こと が でき ませ
正確 性 を 保証 し て
お客様 自身 の 責任 と 判断
すべて の 機能 を 利用 する
知恵袋 の すべて の 機能 を
おすすめ の 解決 済み の 質問
記事 へ の トラック バック URL
ニックネーム の My 知恵袋 で 確認
する こと が でき ませ ん
無料 で お 届け し ます
料 無料 で お 届け し
配送 料 無料 で お 届け
国内 配送 料 無料 で お
円 以上 国内 配送 料 無料
以上 国内 配送 料 無料 で
1500 円 以上 国内 配送 料
を 使用 し て い ます
インライン フレーム を 使用 し て
この 記事 へ の トラック バック
2014/05/19
IIPC Open Day
7-gram
の で は ない でしょ う か
の タグ が 付け られ た 質問
で は ない か と 思い ます
に関する ウェブ 上 の 情報 を 探す
ああ ああ ああ ああ ああ ああ ああ
の で は ない か と 思い
し て いた の です が
思っ て い た の です が
えええええええ
と 思っ て い た の です
機能 を 利用 する こと が でき
利用 する こと が でき ませ ん
正確 性 を 保証 し て おり
お客様 自身 の 責任 と 判断 で
すべて の 機能 を 利用 する こと
知恵袋 の すべて の 機能 を 利用
ニックネーム の My 知恵袋 で 確認 でき
質問 年月 や 画像 の 有無 を
質問 や 知恵 ノート は 選択 さ
以上 更新 が ない ブログ に 表示
料 無料 で お 届け し ます
配送 料 無料 で お 届け し
国内 配送 料 無料 で お 届け
以上 国内 配送 料 無料 で お
円 以上 国内 配送 料 無料 で
1500 円 以上 国内 配送 料 無料
は インライン フレーム を 使用 し て
フレーム を 使用 し て い ます
インライン フレーム を 使用 し て い
部分 は インライン フレーム を 使用 し
‘tagged question’
‘trackback for the article’
‘Free shipping within Japan for items
worth 1,500 yen or more’
36
Table of contents
• Introduction
• Previous studies
– Japanese Web corpora and linguistic resources
• Design of a web-scale Japanese corpus
– Four basic technologies
•
•
•
•
Page collection
Linguistic annotation
Release
Preservation
• Research progress
• Conclusion
2014/05/19
IIPC Open Day
37
CONCLUSION
2014/05/19
IIPC Open Day
38
[Conclusions]
An overview of the design of the web-scale corpus at
NINJAL
•
•
•
Ten billion-scale web corpus
Remote harvesting page collection
Multi-layered linguistic annotation
–
•
Release for linguists
–
–
–
•
Word unit, morphological information, syntactic dependency structure, and register information
Web service
Word list and n-gram
Language analysers
Preservation so that linguistic studies can monitor any changes
–
2014/05/19
Web archive for linguistic research
IIPC Open Day
39