2006年6月6日 星期二

Baseball::Sabermetrics

之前為了統計自己玩 cpb2 (an old dos game) 的成績,也正巧遇到 ptt Sabermetrics 板上 Debugger 提到他手動抓 CPBL 官網的資料算 Win Shares (WS 的計算很複雜,需要的資料量很多),於是寫了 Baseball::Sabermetrics 這個 perl module。他的功能是提供一個簡單的 programming interface 去抓一個聯盟的統計數據,目前內建 CPB2 與 CPBL 兩個聯盟。前幾天已經 upload 到 CPAN 上了,有興趣可以到 http://search.cpan.org 找 Baseball::Sabermetrics :D

使用方法跟範列,請見 http://search.cpan.org。

目前還有不少想加強的東西,例如 CPBL 的支援目前只有當季成績,而沒有歷史成績;聯盟的支援太少,想看看能不能用 WWW::Baseball::NPB 來納入對 NPB 的支援;MLB.com 的介面已經做得很不錯,我不確定有沒有人會需要,就再看看囉。

BTW, 為了簡化介面,裡面用了一些噁心的技巧,例如 sub AUTOLOAD : lvalue,另外還有 lazy evaluation with cache :D

1 則留言:

walwynfackler 提到...

The cellular casino is simply as user-friendly as the desktop version, with extensive range|a variety} of 카지노 games and bonuses on provide. There can also be|can be} a dedicated customer help group available to assist with any issues that may come up. The majority of its recreation assortment is slot titles, whereas different games embody reside games, roulette, and blackjack. To make it simpler to find out|to search out} what you're on the lookout for, the site has dedicated sections for every casino recreation kind.