Finding Japanese Flatmates with Ruby (English and Japanese)

Preview:

Citation preview

Ruby で日本人のルームメイトを見つける技術 Andrew Grimm10 September 20162016 年 9 月 10 日

アンチハラスメントポリシー• ツイートするときは、 RubyKaigi の行動規範に従って投稿をお願いします。

– 特に、女性に対する攻撃的なツイートに気をつけて下さい– Please follow RubyKaigi’s Code of Conduct and

Anti-Harassment Policy when tweeting about this talk– In particular, please avoid tweets that are

offensive about women

背景2011 年から日本語を学んでいます日本人のルームメイトも探していますLearning Japanese since 2011Want to find Japanese roommate

アイデア日 本 語 を 発 信 す る 情 報 源 で 学 ぶ

(Nichigo press, JAMS TV など ) Japanese にある広告で探すAlternative approaches:

Japanese-language classifiedsJust searching for “Japanese” in

roomshare ads

現状の案Roomshare の 広 告 (Gumtree) でシドニー地域を対象に絞ってみる具 体 的 に は 、 「 日 本 人 っ ぽ い 名 前 」の人がいないか探してみたいMain approach

Download roomshare ads on Gumtree for SydneyCheck if any words match Japanese names

日本人っぽい名前 # とはname.japanese?

Wikipedia を使ってみた 日本語のカテゴリで名前に関する記事がある• ただし、結果は色々とあって煩雑• Wikipedia

• Tried using the title of articles in Japanese-related categories

• Results were too messy

ENAMDICT

と言うのも、日本語の名前には、日本人の名前と ( カタカナ表記の ) 外国人の名前がある

ENAMDICT (English slide)

Dictionary of Japanese and non-Japanese names, written in Japanese

ENAMDICT

何が難しいのか ?

細かなデータがないどのくらいの単語が日本人の日本語名なのか ?どのくらいの単語が外国人の日本語名なのか ?どのくらいの単語が英語としてそのまま使われるのか ?

No frequency data - how often is it used as a Japanese name, a non-Japanese name, or as an ordinary word?

煩雑なデータ例 (messy results)

現代風な大きな “日本製の (Japanese)” バスタブとシャワーがアパートにあります “Large modern bathroom with japanese

bathtub and shower in apartment”

煩雑なデータ例 (messy results)

インド人やバングラディッシュ人、イタリア人にも日本語っぽいように見える名前がある Indian, Bangladeshi, Italian people with

Japanese-looking names

煩雑なデータ例 (messy results)

日本人のルームメイトを探している人がいるPeople looking for Japanese roommates

煩雑なデータ例 (messy results)

“Machine” は英語なのか日本語なのか “Machine” is a Japanese name, but usually

refers to a washing machine

Medline ( 生命科学のデータベース )

科学雑誌のデータベース (Journal database)

Advantages of Medline

より多くの情報量を取得できる執筆者の名前を調べることができる共著者の名前からデータを抽出できるShould help with frequency dataCan look at which names co-occurLook at author affiliation

Medline XML

Current status

• Reasonably successful at distinguishing Japanese and non-Japanese names

• Tried finding a Mongolian-speaking roommate this year. Too hard! Not enough Mongolian scientists!

• Ended up with a Japanese couple as roommates by coincidence