Wednesday, June 27, 2012

how to change the language of Windows 7 Business

Microsoft provides free language solutions for Windows 7 Ultimate/Enterprise, but not for Windows 7 Business.
Of course, you can pay some money to upgrade your Windows 7 Business to Ultimate/Enterprise for the privilege of changing languages.

There is also one free solution: using Vistalizator:

This website also provides the language files, MUI language pack, for different Windows systems.

Wednesday, June 13, 2012

Berkeley language model and Google Web 1T language model

Berkeley language model provides a library for estimating storing large n-gram language models in memory and accessing them efficiently. The most amazing contribution of it is that it can be used with the Google Web 1T language model, and it also provides the binary Web 1T language models for many languages:

The homepage of the Berkeley language model project is here, and you can find the binary language models of the Google Web 1T here.

Tuesday, June 12, 2012

Static variables in Python

While Python introduces a lot of new features to the programming community, the variable types in Python are always not clearly defined. In this post, I will discuss the static variables in Python.

(1) How to use static variables in Python classes
class Foo(object):
  counter = 0
  def __call__(self):
    Foo.counter += 1
    print Foo.counter
foo = Foo()
foo() #prints 1
foo() #prints 2
foo() #prints 3

(2) How to use static variable in Python functions (Python does not really have static variables in functions, so here we use the attribute of a function instead of real static variables)
def myfunc():
  if not hasattr(myfunc, "counter"):
     myfunc.counter = 0  # it doesn't exist yet, so initialize it
  myfunc.counter += 

Tuesday, June 5, 2012

How to download Jazzy

Jazzy is a Java spell checker, which is similar to Aspell.
However, on the sourceforge download page of Jazzy, we can only download the source codes of Jazzy, excluding the necessary dictionaries, which makes it hard to use Jazzy.
One possible solution that I just found is to download Jazzy from its CVS repository, on which page you can click the link Download GNU tarball to download a tarball of the complete Jazzy.