Dive Into Python 3 available

November 24, 2009

Yes, yes, a bit late. But: Mark Pilgrim’s excellent Dive Into Python has been adapted to Python 3, and is now available under CC-A-SA license (seen on LWN).

Case Study: Porting chardet to Python 3 documents my (ultimately successful) effort to port a non-trivial library from Python 2 to Python 3. It may help you; it may not. There’s a fairly steep learning curve, since you need to kind of understand the library first, so you can understand why it broke and how I fixed it. A lot of the breakage centers around strings.

Comments Off

Build an Automatic Tagger in 200 lines with BOSS

November 24, 2009

No idea where I came across this, but it’s an interesting read: building an automatic tagger in 200 lines with BOSS.

Here’s another way to use it:

tagger viksi$ python classify.py apple microsoft bill gates steve ballmer windows vista xp

microsoft

tagger viksi$ python classify.py apple microsoft steve jobs ipod iphone macbook

apple

classify combines the above steps into an application that, given two tags and some text, will return which tag more likely describes the text. Or, in command line form, ‘python classify.py [tag1] [tag2] [some free text]‘ => ‘tag1′ or ‘tag2′

Machine learning has only caught on a little bit in the personal computing space, and only in web-based services like Google Search and Amazon/Netflix-style "you might also like" features. Is that about to change? I’m skeptical..

Comments Off