ย้ายบล็อกไปที่ bact.cc แล้วนะครับ

พ.ร.บ.คอมพิวเตอร์
หยุด ร่างพ.ร.บ.คอมพิวเตอร์
พื้นที่เก็บข้อมูลออนไลน์ ฟรี 2GB จาก Dropbox (sync กับ Windows, Linux, Mac, iPhone, Android ฯลฯ ได้)

2005-12-22

Ruby NLP

ตัว Ruby Linguistics นี่น่าสนใจ ตรงวิธีการใช้ .. คือมัน รูบี๊ รูบี้ น่ะ

ตัวอย่าง:


"box".en.plural    #=> "boxes"
"mouse".en.plural  #=> "mice"
"ruby".en.plural   #=> "rubies"

"book".en.a      #=> "a book"
"article".en.a   #=> "an article"

"runs".en.present_participle    #=> "running"
"eats".en.present_participle    #=> "eating"
"spies".en.present_participle   #=> "spying"

"leaving".en.infinitive         #=> "leave"
"left".en.infinitive            #=> "leave"
"leaving".en.infinitive.suffix  #=> "ing"

"cow".en.quantify( 5 )     #=> "several cows"
"cow".en.quantify( 1005 )  #=> "thousands of cows"

อะไรทำนองนี้

update: (2007.04.02) update "NLP softwares in Ruby" link

No comments: