Created
May 1, 2013 02:30
-
-
Save anonymous/5493386 to your computer and use it in GitHub Desktop.
Makefile to build Python bindings to Lingpipe (see http://alias-i.com/lingpipe/ for the code), uses JCC from Apache's PyLucene project (http://lucene.apache.org/pylucene/jcc/ ) to do the heavy lifting. Tested on OSX.
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
PYTHON=/usr/bin/python2.6 | |
JCC=$(PYTHON) -m jcc.__main__ | |
PKGVERSION=4.1.0 | |
LINGPIPEDIR=/home/username/lingpipe-4.1.0/ | |
JARS=$(LINGPIPEDIR)/lingpipe-4.1.0.jar | |
CLASSPATH=$(LINGPIPEDIR)/lib/junit-4.8.2.jar | |
GENERATE=$(JCC) $(foreach jar,$(JARS),--jar $(jar)) \ | |
$(JCCFLAGS) \ | |
--package java.lang java.lang.System \ | |
java.lang.Runtime \ | |
java.lang.IllegalStateException \ | |
java.lang.IndexOutOfBoundsException \ | |
--package java.util.HashMap \ | |
java.util.HashSet \ | |
java.util.NoSuchElementException \ | |
java.text.SimpleDateFormat \ | |
java.text.DecimalFormat \ | |
java.text.Collator \ | |
--package java.net \ | |
--package java.io java.io.StringReader \ | |
java.io.InputStreamReader \ | |
java.io.FileInputStream \ | |
--exclude com.aliasi.xml \ | |
--exclude com.aliasi.xml.XHtmlWriter \ | |
--exclude com.aliasi.xml.t_XHtmlWriter \ | |
$(foreach classpath,$(CLASSPATH),--classpath $(classpath)) \ | |
$(foreach classpath,$(CLASSPATH),--include $(classpath)) \ | |
--python lingpipe \ | |
--files 4 \ | |
--version $(PKGVERSION) | |
generate: jars | |
$(GENERATE) | |
jars: $(JARS) | |
compile: jars | |
$(GENERATE) --build $(DEBUG_OPT) | |
install: jars | |
$(GENERATE) --install $(DEBUG_OPT) $(INSTALL_OPT) | |
bdist: jars | |
$(GENERATE) --bdist | |
all: jars compile | |
@echo build of Lingpipe complete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment