Climbing Mt. Fuji

Climbing Mt. Fuji

One of my unforgettable trips in my life was a climbing trip two weeks ago to Mt. Fuji, the highest mountain in Japan at 3,776m. At first, I and three friends at JAIST went by bus from Kanazawa station at 11 pm on August 13, and we arrived at Shinjuku station at [...]

n-gram and perplexity

Hai slide mình search được

1) http://minhpham0902.googlepages.com/emnlp04-1×2.pdf

2) http://minhpham0902.googlepages.com/ngrams_speech_reco.ppt

Thống kê số lượng xuất hiện của từ

cat file_name | tr ‘ ‘ ‘\n’ | sort | uniq –c | sort –rn | head –n 20

Lập trình ruby (xử lý mảng)

Hàm inject

Nguyên mẫu:

enum.inject(initial) { |memo, obj| block}

enum.inject { |memo, obj| block}

Combines the elements of enum by applying the block to an accumulator value (memo) and each element in turn. At each step, memo is set to the value returned by the block. The first form lets you supply an initial value [...]

Họ trong tiếng Nhật

Một số họ trong tiếng Nhật mà mình biết

島津 (shimazu)

中村 (nakamura)

堀口 (horiguchi)

佐藤 (sato)

高野 (takano)

田中 (tanaka)

重枝 (shigeda)

金子 (kaneko)

徳田 (tokuda)

鈴木 (Suzuki)

伊藤 (itou)

川向 (kawamukai)

本田 (Honda)

二木 (futatsugi)

Lập trình Ruby (1)

Có thể dùng kiểu Hash để lưu trữ n-gram với key là mảng n phần từ (n words) và value là số lượng n-gram

Có thể dùng phương thức split để tách thành mảng của các xâu. Sau đó lấy ra phần tử đầu

Phương thức destroying và không destroying: Một phương thức được gọi là destroying [...]