While I was trying to build GIZA++ for the first time, I've encountered a build break which made me enthusiastic enough to look into the code :). and play with it a little bit to solve that build break.
However when I used Cygwin after that to complie the original code before the modification, it compiled just fine and there was no need for my modification to successfuly build GIZA++
1st Issue...
Despite that, I liked to share the modification I've made to get the code build successfully, also I found that it was an issue reported at the official website of GIZA++ and the auther recommended to use different version of the gcc compliler - more info about the issue.
There are two definitions of a function and the complier get confused which one to call.
- Edit giza-pp\GIZA++-v2\collCounts.cpp, delete that function definition...
- And at the defenition...
template<classTRANSPAIR>
doublecollectCountsOverNeighborhoodForSophisticatedModels(constMoveSwapMatrix
{
return 0.0;
}
template<classTRANSPAIR,classMODEL>
doublecollectCountsOverNeighborhoodForSophisticatedModels(constMoveSwapMatrix
Change the last parameter of the following function call…
from:
_collectCountsOverNeighborhoodForSophisticatedModels
to:
_collectCountsOverNeighborhoodForSophisticatedModels
This is my first step to work with GIZA++, I don’t even know if the changes I made at the source files will cause problems or not but they seem logical to me :).
2nd Issue...
If you tried to run the command "make clean" at Cygwin the EXEs won't get cleaned because the code was written to be compiled under Linux and Linux doesn't know anything about EXEs, so you just let the Cygwin know.
- Edit \giza-pp\GIZA++-v2\Makefile and modify "-rm -f snt2plain.out plain2snt.out snt2cooc.out GIZA++" to "GIZA++.exe"
- Edit \giza-pp\mkcls-v2\Makefil and modify "-rm -f *.o mkcls" to "mkcls.exe"
Now the clean will work fine and delete the EXEs.
Hope it was a useful post for you guys.