Here are the steps:
- Clone Brown Coherence Toolkit (BCT) from https://bitbucket.org/melsner/browncoherence/overview
Note to use Mercurial instead of Git, i.e., instead of doinggit clone
, dohg clone
. - Install WordNet (WN) and GNU Scientific Library (GSL).
sudo apt-get install wordnet-dev libgsl0-dev
- Extract Brown Coherence Toolkit.
- Edit Makefile. In this section of code below,
ifeq (${ARCH}, 64) WNDIR = /usr WNINCLUDE = -idirafter$(WNDIR)/include -DUSE_WORDNET WNLIBS = -L$(WNDIR)/lib -lwordnet # -lWN else WNDIR = /path/to/wordnet-3.0-32 WNINCLUDE = -idirafter$(WNDIR)/include -DUSE_WORDNET WNLIBS = -L$(WNDIR)/lib -lWN endif
ChangeWNDIR
to/usr
In my case, since my computer is 64-bit, I only edited out the part for 64-bit.
Then, add-fpermissive
flag toCFLAGS
. That isCFLAGS = $(WARNINGS) -Iinclude $(WNINCLUDE) $(TAO_PETSC_INCLUDE) $(GSLINCLUDE) -fpermissive
The reason of-fpermissive
is explained here: http://gcc.gnu.org/gcc-4.7/porting_to.html (See the section Name Lookup Changes). Otherwise, the order of template function definitions in BCT will cause trouble.
- Create two directories. In my case (64-bit),
mkdir bin64 lib64
- Run
make everything
References:
[1] Micha Elsner and Eugene Charniak. Extending the Entity Grid with Entity-specific Features. Proceedings of the Association for Computational Linguistics (ACL 2011), Portland, Oregon. [PDF] [Slides (PDF)]
No comments:
Post a Comment