Created
October 8, 2010 07:25
-
-
Save hideki/616466 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JAVA_BASE=/System/Library/Frameworks/JavaVM.framework/Versions/1.6 | |
JAVA_HOME=$(JAVA_BASE)/Home | |
TARGET=MeCab | |
JAVAC=$(JAVA_HOME)/bin/javac -encoding utf-8 | |
JAVA=$(JAVA_HOME)/bin/java -Dfile.encoding=utf-8 | |
JAR=$(JAVA_HOME)/bin/jar | |
CXX=g++ | |
INCLUDE=$(JAVA_BASE)/Headers | |
PACKAGE=org/chasen/mecab | |
LIBS=`mecab-config --libs` | |
INC=`mecab-config --cflags` -I$(INCLUDE) | |
all: | |
$(CXX) -O3 -c -fPIC $(TARGET)_wrap.cxx $(INC) | |
$(CXX) -dynamiclib $(TARGET)_wrap.o -o lib$(TARGET).dylib $(LIBS) | |
$(JAVAC) $(PACKAGE)/*.java | |
$(JAVAC) test.java | |
$(JAR) cfv $(TARGET).jar $(PACKAGE)/*.class | |
test: | |
env DYLD_LIBRARY_PATH=. $(JAVA) test | |
clean: | |
rm -fr *.jar *.o *.dylib *.class $(PACKAGE)/*.class | |
cleanall: | |
rm -fr $(TARGET).java *.cxx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[hideki@ mecab-java-0.98]$ make test | |
env DYLD_LIBRARY_PATH=. /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java -Dfile.encoding=utf-8 test | |
0.98 | |
太郎 名詞,固有名詞,人名,名,*,*,太郎,タロウ,タロー | |
は 助詞,係助詞,*,*,*,*,は,ハ,ワ | |
二郎 名詞,固有名詞,人名,名,*,*,二郎,ジロウ,ジロー | |
に 助詞,格助詞,一般,*,*,*,に,ニ,ニ | |
この 連体詞,*,*,*,*,*,この,コノ,コノ | |
本 名詞,一般,*,*,*,*,本,ホン,ホン | |
を 助詞,格助詞,一般,*,*,*,を,ヲ,ヲ | |
渡し 動詞,自立,*,*,五段・サ行,連用形,渡す,ワタシ,ワタシ | |
た 助動詞,*,*,*,特殊・タ,基本形,た,タ,タ | |
。 記号,句点,*,*,*,*,。,。,。 | |
EOS | |
BOS/EOS,*,*,*,*,*,*,*,* | |
太郎 名詞,固有名詞,人名,名,*,*,太郎,タロウ,タロー | |
は 助詞,係助詞,*,*,*,*,は,ハ,ワ | |
二郎 名詞,固有名詞,人名,名,*,*,二郎,ジロウ,ジロー | |
に 助詞,格助詞,一般,*,*,*,に,ニ,ニ | |
この 連体詞,*,*,*,*,*,この,コノ,コノ | |
本 名詞,一般,*,*,*,*,本,ホン,ホン | |
を 助詞,格助詞,一般,*,*,*,を,ヲ,ヲ | |
渡し 動詞,自立,*,*,五段・サ行,連用形,渡す,ワタシ,ワタシ | |
た 助動詞,*,*,*,特殊・タ,基本形,た,タ,タ | |
。 記号,句点,*,*,*,*,。,。,。 | |
BOS/EOS,*,*,*,*,*,*,*,* | |
EOS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment