Re: [Link Grammar] Re: Building LinkGrammar DLLs for x64 platform

127 views
Skip to first unread message

Linas Vepstas

unread,
Mar 13, 2013, 9:51:59 AM3/13/13
to link-g...@googlegroups.com
Hi Alexander,

These instructions are somewhat different than what the current README file recommends.  Could I convince you to review the README, and provide a patch that incorporates your instructions?  I already changed the lead-in to mention airesoft.com  but left the rest of the README the same.

-- Linas

On 13 March 2013 05:50, Alexander Tkachuk <alexande...@gmail.com> wrote:

Hello,

Finally I managed to build LinkGrammar DLLs for x64 platform using Visual C++ (9) 2008 and used it in Java x64 environment. Please, find all steps below:
 - install Visual Studio 2008 that contain Visual C++ 9 (you can use Pro or any other version that contains x64 compilers and tools)
 - download and extract latest LinkGrammar source files (4.7.10 was used by me)
 - download and extract Win32 and x64 binary files for PRCE regex parser (http://www.airesoft.co.uk/pcre)
 --- alternatively you can try to build it from original sources (
www.pcre.org) but it can be tricky
 - then you need to prepare PRCE folders and files
 --- replace Win32 PRCE files with x64 ones from the corresponding folder
 --- rename "inc" folder to "include"
 --- rename "pcreposix.h" file to "regex.h"
 --- rename "pcreposix3.lib" file to "regex.lib"
 - then it is time to setup environment variables which are required to build LinkGrammar DLLs
 --- in order to do that I created CMD file with following lines (another ways can be used too)
 -----
set GNUREGEX="D:\CPP\pcre-8.20_x64"
 ----- set JAVA_HOME="C:\Program Files\Java\jdk1.7.0_09"
 ----- start /d"C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\" devenv.exe "D:\CPP\link-grammar-4.7.10\msvc9\LinkGrammar.sln"
 --- note that you should edit above paths according to your environment
 - now you can run Visual Studio using this CMD file to build LinkGrammar
 --- switch target platform from Win32 to x64 and compile LinkGrammar and LinkGrammarJava projects
 --- finally you should get LinkGrammar DLLs
 - in order to use them in Java you can follow these steps
 --- add Java files from "\link-grammar-4.7.10\link-grammar\java" folder to your source files
 --- copy following DLLs to your Java app folder (just be sure that this folder is used searching DLLs)
 ----- link-grammar.dll
 ----- link-grammar-java.dll
 ----- pcre3.dll
 ----- pcreposix3.dll
 --- copy dictionary files from "\link-grammar-4.7.10\data" to your Java app folder
 --- test it with following code
 ---- LinkGrammar.setDictionariesPath(<path to dictionaries>);
 ---- LinkGrammar.init();
 ---- LinkGrammar.parse(<sample sentence>);
 ---- int numParses = LinkGrammar.getNumLinkages();
 ------- you should get non zero numParses if everything is fine
 - have fun:)

Hope it will help to somebody!

All the best,


Alex


--
You received this message because you are subscribed to the Google Groups "link-grammar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to link-grammar...@googlegroups.com.
To post to this group, send email to link-g...@googlegroups.com.
Visit this group at http://groups.google.com/group/link-grammar?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages