:feature_index.cpp.patch
--- mecab-0.996.org/src/feature_index.cpp Sun Nov 25 14:35:33 2012
+++ mecab-0.996/src/feature_index.cpp Sat Mar 1 11:19:20 2014
@@ -353,7 +353,7 @@
if (!r) goto NEXT;
os_ << r;
} break;
- case 't': os_ << (size_t)path->rnode->char_type; break;
+ case 't': os_ << (unsigned int)path->rnode->char_type; break;
case 'u': os_ << ufeature; break;
case 'w':
if (path->rnode->stat == MECAB_NOR_NODE) {
:writer.cpp.patch
--- mecab-0.996.org/src/writer.cpp Sun Sep 30 01:44:27 2012
+++ mecab-0.996/src/writer.cpp Sat Mar 1 11:20:32 2014
@@ -257,7 +257,7 @@
// input sentence
case 'S': os->write(lattice->sentence(), lattice->size()); break;
// sentence length
- case 'L': *os << lattice->size(); break;
+ case 'L': *os << (unsigned int)lattice->size(); break;
// morph
case 'm': os->write(node->surface, node->length); break;
case 'M': os->write(reinterpret_cast<const char *>
:Makefile.msvc.in.patch
--- mecab-0.996.org/src/Makefile.msvc.in Sun Sep 30 01:44:27 2012
+++ mecab-0.996/src/Makefile.msvc.in Thu Mar 6 02:36:41 2014
@@ -3,7 +3,7 @@
LINK=link.exe
CFLAGS = /EHsc /O2 /GL /GA /Ob2 /nologo /W3 /MT /Zi /wd4800 /wd4305 /wd4244
-LDFLAGS = /nologo /OPT:REF /OPT:ICF /LTCG /NXCOMPAT /DYNAMICBASE /MACHINE:X86 ADVAPI32.LIB
+LDFLAGS = /nologo /OPT:REF /OPT:ICF /LTCG /NXCOMPAT /DYNAMICBASE /MACHINE:X86_amd64 ADVAPI32.LIB
DEFS = -D_CRT_SECURE_NO_DEPRECATE -DMECAB_USE_THREAD \
-DDLL_EXPORT -DHAVE_GETENV -DHAVE_WINDOWS_H -DDIC_VERSION=@DIC_VERSION@ \
-DVERSION="\"@VERSION@\"" -DPACKAGE="\"mecab\"" \
> call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" X86_amd64
> nmake -f Makefile.msvc.in
setup.py
#!/usr/bin/env python
from distutils.core import setup,Extension
setup(name = "mecab-python",
version = "0.996",
py_modules=["MeCab"],
ext_modules = [
Extension("_MeCab",
["MeCab_wrap.cxx",],
include_dirs=['C:/Program Files (x86)/MeCab/sdk'],
library_dirs=['C:/Program Files (x86)/MeCab/sdk'],
libraries=["libmecab"])
])
> python setup.py bdist_wininst
> python test.py
0.996
Taro noun,Proper noun,Personal name,Name,*,*,Taro,Taro,Taro
Is a particle,Particle,*,*,*,*,Is,C,Wow
This adnominal adjective,*,*,*,*,*,this,this,this
Book noun,General,*,*,*,*,Book,Hong,Hong
Particles,Case particles,General,*,*,*,To,Wo,Wo
Two nouns,number,*,*,*,*,two,D,D
Ro noun,General,*,*,*,*,Ro,Rowe,Low
Particles,Case particles,General,*,*,*,To,Wo,Wo
See verb,Independence,*,*,One step,Continuous form,to see,Mi,Mi
Auxiliary verb,*,*,*,Special,Uninflected word,Ta,Ta,Ta
Feminine noun,General,*,*,*,*,Female,Josei,Josei
Particles,Case particles,General,*,*,*,To,D,D
Passing verb,Independence,*,*,Godan / Sa line,Continuous form,hand over,I,I
Auxiliary verb,*,*,*,Special,Uninflected word,Ta,Ta,Ta
.. Symbol,Kuten,*,*,*,*,。,。,。
EOS
BOS/EOS,*,*,*,*,*,*,*,*
Taro noun,Proper noun,Personal name,Name,*,*,Taro,Taro,Taro
Is a particle,Particle,*,*,*,*,Is,C,Wow
This adnominal adjective,*,*,*,*,*,this,this,this
Book noun,General,*,*,*,*,Book,Hong,Hong
Particles,Case particles,General,*,*,*,To,Wo,Wo
Two nouns,number,*,*,*,*,two,D,D
Ro noun,General,*,*,*,*,Ro,Rowe,Low
Particles,Case particles,General,*,*,*,To,Wo,Wo
See verb,Independence,*,*,One step,Continuous form,to see,Mi,Mi
Auxiliary verb,*,*,*,Special,Uninflected word,Ta,Ta,Ta
Feminine noun,General,*,*,*,*,Female,Josei,Josei
Particles,Case particles,General,*,*,*,To,D,D
Passing verb,Independence,*,*,Godan / Sa line,Continuous form,hand over,I,I
Auxiliary verb,*,*,*,Special,Uninflected word,Ta,Ta,Ta
.. Symbol,Kuten,*,*,*,*,。,。,。
BOS/EOS,*,*,*,*,*,*,*,*
EOS
EOS
filename: C:\Program Files (x86)\MeCab\etc\..\dic\ipadic\sys.dic
charset: UTF-8
size: 392126
type: 0
lsize: 1316
rsize: 1316
version: 102
Recommended Posts