wrote Install, etc...

This commit is contained in:
PyYoshi 2012-06-20 22:18:38 +09:00
parent 617b058f42
commit 66670a0e3f

View file

@ -6,19 +6,50 @@ Cython: [http://www.cython.org/](http://www.cython.org/)
uchardet-enhanced: [https://bitbucket.org/medoc/uchardet-enhanced/overview](https://bitbucket.org/medoc/uchardet-enhanced/overview) uchardet-enhanced: [https://bitbucket.org/medoc/uchardet-enhanced/overview](https://bitbucket.org/medoc/uchardet-enhanced/overview)
pip install or easy_install -U cython # Install
### Build uchardet-enhanced
$cd /tmp
$hg clone https://bitbucket.org/medoc/uchardet-enhanced
$cd uchardet-enhanced/libcharsetdetect
$./configure
$make
$sudo make install
$ls -la /usr/local/lib
$ls -la /usr/local/include
### Build cChardet
$cd /tmp
$git clone git://github.com/PyYoshi/cChardet.git
$cd cChardet
$sudo pip install or easy_install -U cython. (If your os is Ubuntu, I recommend that you do "sudo apt-get install python-dev cython")
$python setup.py build
$sudo python setup.py install
# Benchmark # Benchmark
see tests.TestCchardetSpeed see tests.TestCchardetSpeed
### Sample(shift_jis): ### Sample(shift_jis):
testdata/wikipediaJa_One_Thousand_and_One_Nights.txt testdata/wikipediaJa_One_Thousand_and_One_Nights_SJIS.txt
### PC Spec.: ### PC Spec.:
CPU: Intel Core i7 860 2.8GHz CPU: Intel Core i7 860 2.8GHz
RAM: DDR3-1333 16GB RAM: DDR3-1333 16GB
Platform: Windows 7 HP x64, Python 2.7.3 32-bit
### Result: ### Result:
chardet: 4.009999990463257s, shift_jis chardet: 4.009999990463257s, shift_jis