You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@joshua.apache.org by mj...@apache.org on 2016/06/01 02:51:43 UTC
[48/94] [abbrv] [partial] incubator-joshua git commit: Pulled
JOSHUA-252 changes and Resolved Merge Conflicts
http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/ef91969a/ext/giza-pp/GIZA++-v2/dependencies
----------------------------------------------------------------------
diff --git a/ext/giza-pp/GIZA++-v2/dependencies b/ext/giza-pp/GIZA++-v2/dependencies
deleted file mode 100644
index 682ff2d..0000000
--- a/ext/giza-pp/GIZA++-v2/dependencies
+++ /dev/null
@@ -1,635 +0,0 @@
-#Automatically generated dependecy list
-optimized/alignment.o: alignment.cpp alignment.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h defs.h
-optimized/AlignTables.o: AlignTables.cpp AlignTables.h defs.h Vector.h mystl.h \
- myassert.h mymath.h Array2.h transpair_model1.h NTables.h vocab.h \
- ATables.h Array4.h TTables.h Globals.h alignment.h
-optimized/ATables.o: ATables.cpp ATables.h defs.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h Array4.h Globals.h Parameter.h Pointer.h
-optimized/collCounts.o: collCounts.cpp alignment.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h defs.h transpair_model3.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h transpair_model2.h transpair_model1.h \
- collCounts.h MoveSwapMatrix.h D4Tables.h WordClasses.h \
- transpair_model4.h D5Tables.h transpair_model5.h transpair_modelhmm.h \
- ForwardBackward.h Array.h hmm.h getSentence.h model2.h model1.h \
- Perplexity.h Dictionary.h HMMTables.h FlexArray.h Parameter.h Pointer.h
-optimized/Dictionary.o: Dictionary.cpp Dictionary.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h
-optimized/ForwardBackward.o: ForwardBackward.cpp ForwardBackward.h myassert.h \
- Array.h Vector.h mystl.h mymath.h Array2.h Globals.h defs.h HMMTables.h \
- FlexArray.h
-optimized/getSentence.o: getSentence.cpp getSentence.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h defs.h vocab.h Globals.h Parameter.h Pointer.h
-optimized/hmm.o: hmm.cpp hmm.h Vector.h mystl.h myassert.h mymath.h Array2.h \
- TTables.h defs.h vocab.h Globals.h ATables.h Array4.h getSentence.h \
- model2.h model1.h Perplexity.h Dictionary.h WordClasses.h HMMTables.h \
- FlexArray.h Array.h ForwardBackward.h utility.h Parameter.h Pointer.h \
- HMMTables.cpp
-optimized/HMMTables.o: HMMTables.cpp HMMTables.h FlexArray.h Array.h Vector.h \
- mystl.h myassert.h mymath.h Array2.h Globals.h defs.h Parameter.h \
- Pointer.h
-optimized/logprob.o: logprob.cpp logprob.h
-optimized/main.o: main.cpp getSentence.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h defs.h vocab.h Globals.h TTables.h model1.h Perplexity.h \
- Dictionary.h model2.h ATables.h Array4.h model3.h MoveSwapMatrix.h \
- alignment.h transpair_model3.h NTables.h transpair_model2.h \
- transpair_model1.h transpair_modelhmm.h ForwardBackward.h Array.h hmm.h \
- WordClasses.h HMMTables.h FlexArray.h D4Tables.h AlignTables.h \
- file_spec.h utility.h Parameter.h Pointer.h D5Tables.h \
- transpair_model4.h transpair_model5.h
-optimized/model1.o: model1.cpp model1.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h vocab.h defs.h TTables.h Globals.h getSentence.h Perplexity.h \
- Dictionary.h utility.h Parameter.h Pointer.h
-optimized/model2.o: model2.cpp model2.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h TTables.h defs.h vocab.h Globals.h ATables.h Array4.h \
- getSentence.h model1.h Perplexity.h Dictionary.h utility.h Parameter.h \
- Pointer.h
-optimized/model2to3.o: model2to3.cpp model3.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h MoveSwapMatrix.h alignment.h defs.h transpair_model3.h \
- NTables.h vocab.h ATables.h Array4.h TTables.h Globals.h \
- transpair_model2.h transpair_model1.h getSentence.h model2.h model1.h \
- Perplexity.h Dictionary.h transpair_modelhmm.h ForwardBackward.h \
- Array.h hmm.h WordClasses.h HMMTables.h FlexArray.h D4Tables.h \
- AlignTables.h utility.h
-optimized/model345-peg.o: model345-peg.cpp model3.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h MoveSwapMatrix.h alignment.h defs.h \
- transpair_model3.h NTables.h vocab.h ATables.h Array4.h TTables.h \
- Globals.h transpair_model2.h transpair_model1.h getSentence.h model2.h \
- model1.h Perplexity.h Dictionary.h transpair_modelhmm.h \
- ForwardBackward.h Array.h hmm.h WordClasses.h HMMTables.h FlexArray.h \
- D4Tables.h AlignTables.h collCounts.h transpair_model4.h
-optimized/model3.o: model3.cpp model3.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h MoveSwapMatrix.h alignment.h defs.h transpair_model3.h \
- NTables.h vocab.h ATables.h Array4.h TTables.h Globals.h \
- transpair_model2.h transpair_model1.h getSentence.h model2.h model1.h \
- Perplexity.h Dictionary.h transpair_modelhmm.h ForwardBackward.h \
- Array.h hmm.h WordClasses.h HMMTables.h FlexArray.h D4Tables.h \
- AlignTables.h collCounts.h transpair_model4.h utility.h D5Tables.h \
- transpair_model5.h Parameter.h Pointer.h
-optimized/model3_viterbi.o: model3_viterbi.cpp model3.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h MoveSwapMatrix.h alignment.h defs.h \
- transpair_model3.h NTables.h vocab.h ATables.h Array4.h TTables.h \
- Globals.h transpair_model2.h transpair_model1.h getSentence.h model2.h \
- model1.h Perplexity.h Dictionary.h transpair_modelhmm.h \
- ForwardBackward.h Array.h hmm.h WordClasses.h HMMTables.h FlexArray.h \
- D4Tables.h AlignTables.h utility.h
-optimized/model3_viterbi_with_tricks.o: model3_viterbi_with_tricks.cpp mystl.h \
- myassert.h mymath.h Array2.h model3.h Vector.h MoveSwapMatrix.h \
- alignment.h defs.h transpair_model3.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h transpair_model2.h transpair_model1.h \
- getSentence.h model2.h model1.h Perplexity.h Dictionary.h \
- transpair_modelhmm.h ForwardBackward.h Array.h hmm.h WordClasses.h \
- HMMTables.h FlexArray.h D4Tables.h AlignTables.h collCounts.h \
- transpair_model4.h utility.h D5Tables.h transpair_model5.h Parameter.h \
- Pointer.h collCounts.cpp
-optimized/MoveSwapMatrix.o: MoveSwapMatrix.cpp MoveSwapMatrix.h alignment.h Vector.h \
- mystl.h myassert.h mymath.h Array2.h defs.h transpair_model3.h \
- NTables.h vocab.h ATables.h Array4.h TTables.h Globals.h \
- transpair_model2.h transpair_model1.h transpair_model4.h D4Tables.h \
- WordClasses.h transpair_model5.h D5Tables.h transpair_modelhmm.h \
- ForwardBackward.h Array.h hmm.h getSentence.h model2.h model1.h \
- Perplexity.h Dictionary.h HMMTables.h FlexArray.h
-optimized/myassert.o: myassert.cpp mystl.h myassert.h mymath.h Array2.h
-optimized/NTables.o: NTables.cpp NTables.h Array2.h mystl.h myassert.h mymath.h \
- Vector.h defs.h vocab.h Parameter.h Pointer.h Globals.h
-optimized/Parameter.o: Parameter.cpp Parameter.h mystl.h myassert.h mymath.h \
- Array2.h Pointer.h Globals.h defs.h Vector.h
-optimized/parse.o: parse.cpp defs.h utility.h Perplexity.h Vector.h mystl.h \
- myassert.h mymath.h Array2.h Globals.h TTables.h vocab.h getSentence.h \
- D4Tables.h WordClasses.h D5Tables.h ATables.h Array4.h Parameter.h \
- Pointer.h
-optimized/Perplexity.o: Perplexity.cpp Perplexity.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h defs.h Globals.h
-optimized/plain2snt.o: plain2snt.cpp
-optimized/reports.o: reports.cpp defs.h vocab.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h Perplexity.h Globals.h getSentence.h TTables.h Parameter.h \
- Pointer.h
-optimized/snt2cooc.o: snt2cooc.cpp
-optimized/snt2plain.o: snt2plain.cpp
-optimized/transpair_model3.o: transpair_model3.cpp transpair_model3.h Array2.h \
- mystl.h myassert.h mymath.h defs.h Vector.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h alignment.h transpair_model2.h \
- transpair_model1.h
-optimized/transpair_model4.o: transpair_model4.cpp transpair_model4.h Array2.h \
- mystl.h myassert.h mymath.h defs.h Vector.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h alignment.h D4Tables.h WordClasses.h \
- transpair_model3.h transpair_model2.h transpair_model1.h Parameter.h \
- Pointer.h
-optimized/transpair_model5.o: transpair_model5.cpp transpair_model5.h Array2.h \
- mystl.h myassert.h mymath.h defs.h Vector.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h alignment.h D5Tables.h D4Tables.h \
- WordClasses.h transpair_model4.h transpair_model3.h transpair_model2.h \
- transpair_model1.h Parameter.h Pointer.h
-optimized/TTables.o: TTables.cpp TTables.h defs.h vocab.h Vector.h mystl.h \
- myassert.h mymath.h Array2.h Globals.h Parameter.h Pointer.h
-optimized/utility.o: utility.cpp mymath.h
-optimized/vocab.o: vocab.cpp vocab.h defs.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h
-#Automatically generated dependecy list
-debug/alignment.o: alignment.cpp alignment.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h defs.h
-debug/AlignTables.o: AlignTables.cpp AlignTables.h defs.h Vector.h mystl.h \
- myassert.h mymath.h Array2.h transpair_model1.h NTables.h vocab.h \
- ATables.h Array4.h TTables.h Globals.h alignment.h
-debug/ATables.o: ATables.cpp ATables.h defs.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h Array4.h Globals.h Parameter.h Pointer.h
-debug/collCounts.o: collCounts.cpp alignment.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h defs.h transpair_model3.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h transpair_model2.h transpair_model1.h \
- collCounts.h MoveSwapMatrix.h D4Tables.h WordClasses.h \
- transpair_model4.h D5Tables.h transpair_model5.h transpair_modelhmm.h \
- ForwardBackward.h Array.h hmm.h getSentence.h model2.h model1.h \
- Perplexity.h Dictionary.h HMMTables.h FlexArray.h Parameter.h Pointer.h
-debug/Dictionary.o: Dictionary.cpp Dictionary.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h
-debug/ForwardBackward.o: ForwardBackward.cpp ForwardBackward.h myassert.h \
- Array.h Vector.h mystl.h mymath.h Array2.h Globals.h defs.h HMMTables.h \
- FlexArray.h
-debug/getSentence.o: getSentence.cpp getSentence.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h defs.h vocab.h Globals.h Parameter.h Pointer.h
-debug/hmm.o: hmm.cpp hmm.h Vector.h mystl.h myassert.h mymath.h Array2.h \
- TTables.h defs.h vocab.h Globals.h ATables.h Array4.h getSentence.h \
- model2.h model1.h Perplexity.h Dictionary.h WordClasses.h HMMTables.h \
- FlexArray.h Array.h ForwardBackward.h utility.h Parameter.h Pointer.h \
- HMMTables.cpp
-debug/HMMTables.o: HMMTables.cpp HMMTables.h FlexArray.h Array.h Vector.h \
- mystl.h myassert.h mymath.h Array2.h Globals.h defs.h Parameter.h \
- Pointer.h
-debug/logprob.o: logprob.cpp logprob.h
-debug/main.o: main.cpp getSentence.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h defs.h vocab.h Globals.h TTables.h model1.h Perplexity.h \
- Dictionary.h model2.h ATables.h Array4.h model3.h MoveSwapMatrix.h \
- alignment.h transpair_model3.h NTables.h transpair_model2.h \
- transpair_model1.h transpair_modelhmm.h ForwardBackward.h Array.h hmm.h \
- WordClasses.h HMMTables.h FlexArray.h D4Tables.h AlignTables.h \
- file_spec.h utility.h Parameter.h Pointer.h D5Tables.h \
- transpair_model4.h transpair_model5.h
-debug/model1.o: model1.cpp model1.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h vocab.h defs.h TTables.h Globals.h getSentence.h Perplexity.h \
- Dictionary.h utility.h Parameter.h Pointer.h
-debug/model2.o: model2.cpp model2.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h TTables.h defs.h vocab.h Globals.h ATables.h Array4.h \
- getSentence.h model1.h Perplexity.h Dictionary.h utility.h Parameter.h \
- Pointer.h
-debug/model2to3.o: model2to3.cpp model3.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h MoveSwapMatrix.h alignment.h defs.h transpair_model3.h \
- NTables.h vocab.h ATables.h Array4.h TTables.h Globals.h \
- transpair_model2.h transpair_model1.h getSentence.h model2.h model1.h \
- Perplexity.h Dictionary.h transpair_modelhmm.h ForwardBackward.h \
- Array.h hmm.h WordClasses.h HMMTables.h FlexArray.h D4Tables.h \
- AlignTables.h utility.h
-debug/model345-peg.o: model345-peg.cpp model3.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h MoveSwapMatrix.h alignment.h defs.h \
- transpair_model3.h NTables.h vocab.h ATables.h Array4.h TTables.h \
- Globals.h transpair_model2.h transpair_model1.h getSentence.h model2.h \
- model1.h Perplexity.h Dictionary.h transpair_modelhmm.h \
- ForwardBackward.h Array.h hmm.h WordClasses.h HMMTables.h FlexArray.h \
- D4Tables.h AlignTables.h collCounts.h transpair_model4.h
-debug/model3.o: model3.cpp model3.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h MoveSwapMatrix.h alignment.h defs.h transpair_model3.h \
- NTables.h vocab.h ATables.h Array4.h TTables.h Globals.h \
- transpair_model2.h transpair_model1.h getSentence.h model2.h model1.h \
- Perplexity.h Dictionary.h transpair_modelhmm.h ForwardBackward.h \
- Array.h hmm.h WordClasses.h HMMTables.h FlexArray.h D4Tables.h \
- AlignTables.h collCounts.h transpair_model4.h utility.h D5Tables.h \
- transpair_model5.h Parameter.h Pointer.h
-debug/model3_viterbi.o: model3_viterbi.cpp model3.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h MoveSwapMatrix.h alignment.h defs.h \
- transpair_model3.h NTables.h vocab.h ATables.h Array4.h TTables.h \
- Globals.h transpair_model2.h transpair_model1.h getSentence.h model2.h \
- model1.h Perplexity.h Dictionary.h transpair_modelhmm.h \
- ForwardBackward.h Array.h hmm.h WordClasses.h HMMTables.h FlexArray.h \
- D4Tables.h AlignTables.h utility.h
-debug/model3_viterbi_with_tricks.o: model3_viterbi_with_tricks.cpp mystl.h \
- myassert.h mymath.h Array2.h model3.h Vector.h MoveSwapMatrix.h \
- alignment.h defs.h transpair_model3.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h transpair_model2.h transpair_model1.h \
- getSentence.h model2.h model1.h Perplexity.h Dictionary.h \
- transpair_modelhmm.h ForwardBackward.h Array.h hmm.h WordClasses.h \
- HMMTables.h FlexArray.h D4Tables.h AlignTables.h collCounts.h \
- transpair_model4.h utility.h D5Tables.h transpair_model5.h Parameter.h \
- Pointer.h collCounts.cpp
-debug/MoveSwapMatrix.o: MoveSwapMatrix.cpp MoveSwapMatrix.h alignment.h Vector.h \
- mystl.h myassert.h mymath.h Array2.h defs.h transpair_model3.h \
- NTables.h vocab.h ATables.h Array4.h TTables.h Globals.h \
- transpair_model2.h transpair_model1.h transpair_model4.h D4Tables.h \
- WordClasses.h transpair_model5.h D5Tables.h transpair_modelhmm.h \
- ForwardBackward.h Array.h hmm.h getSentence.h model2.h model1.h \
- Perplexity.h Dictionary.h HMMTables.h FlexArray.h
-debug/myassert.o: myassert.cpp mystl.h myassert.h mymath.h Array2.h
-debug/NTables.o: NTables.cpp NTables.h Array2.h mystl.h myassert.h mymath.h \
- Vector.h defs.h vocab.h Parameter.h Pointer.h Globals.h
-debug/Parameter.o: Parameter.cpp Parameter.h mystl.h myassert.h mymath.h \
- Array2.h Pointer.h Globals.h defs.h Vector.h
-debug/parse.o: parse.cpp defs.h utility.h Perplexity.h Vector.h mystl.h \
- myassert.h mymath.h Array2.h Globals.h TTables.h vocab.h getSentence.h \
- D4Tables.h WordClasses.h D5Tables.h ATables.h Array4.h Parameter.h \
- Pointer.h
-debug/Perplexity.o: Perplexity.cpp Perplexity.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h defs.h Globals.h
-debug/plain2snt.o: plain2snt.cpp
-debug/reports.o: reports.cpp defs.h vocab.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h Perplexity.h Globals.h getSentence.h TTables.h Parameter.h \
- Pointer.h
-debug/snt2cooc.o: snt2cooc.cpp
-debug/snt2plain.o: snt2plain.cpp
-debug/transpair_model3.o: transpair_model3.cpp transpair_model3.h Array2.h \
- mystl.h myassert.h mymath.h defs.h Vector.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h alignment.h transpair_model2.h \
- transpair_model1.h
-debug/transpair_model4.o: transpair_model4.cpp transpair_model4.h Array2.h \
- mystl.h myassert.h mymath.h defs.h Vector.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h alignment.h D4Tables.h WordClasses.h \
- transpair_model3.h transpair_model2.h transpair_model1.h Parameter.h \
- Pointer.h
-debug/transpair_model5.o: transpair_model5.cpp transpair_model5.h Array2.h \
- mystl.h myassert.h mymath.h defs.h Vector.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h alignment.h D5Tables.h D4Tables.h \
- WordClasses.h transpair_model4.h transpair_model3.h transpair_model2.h \
- transpair_model1.h Parameter.h Pointer.h
-debug/TTables.o: TTables.cpp TTables.h defs.h vocab.h Vector.h mystl.h \
- myassert.h mymath.h Array2.h Globals.h Parameter.h Pointer.h
-debug/utility.o: utility.cpp mymath.h
-debug/vocab.o: vocab.cpp vocab.h defs.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h
-#Automatically generated dependecy list
-vdebug/alignment.o: alignment.cpp alignment.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h defs.h
-vdebug/AlignTables.o: AlignTables.cpp AlignTables.h defs.h Vector.h mystl.h \
- myassert.h mymath.h Array2.h transpair_model1.h NTables.h vocab.h \
- ATables.h Array4.h TTables.h Globals.h alignment.h
-vdebug/ATables.o: ATables.cpp ATables.h defs.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h Array4.h Globals.h Parameter.h Pointer.h
-vdebug/collCounts.o: collCounts.cpp alignment.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h defs.h transpair_model3.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h transpair_model2.h transpair_model1.h \
- collCounts.h MoveSwapMatrix.h D4Tables.h WordClasses.h \
- transpair_model4.h D5Tables.h transpair_model5.h transpair_modelhmm.h \
- ForwardBackward.h Array.h hmm.h getSentence.h model2.h model1.h \
- Perplexity.h Dictionary.h HMMTables.h FlexArray.h Parameter.h Pointer.h
-vdebug/Dictionary.o: Dictionary.cpp Dictionary.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h
-vdebug/ForwardBackward.o: ForwardBackward.cpp ForwardBackward.h myassert.h \
- Array.h Vector.h mystl.h mymath.h Array2.h Globals.h defs.h HMMTables.h \
- FlexArray.h
-vdebug/getSentence.o: getSentence.cpp getSentence.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h defs.h vocab.h Globals.h Parameter.h Pointer.h
-vdebug/hmm.o: hmm.cpp hmm.h Vector.h mystl.h myassert.h mymath.h Array2.h \
- TTables.h defs.h vocab.h Globals.h ATables.h Array4.h getSentence.h \
- model2.h model1.h Perplexity.h Dictionary.h WordClasses.h HMMTables.h \
- FlexArray.h Array.h ForwardBackward.h utility.h Parameter.h Pointer.h \
- HMMTables.cpp
-vdebug/HMMTables.o: HMMTables.cpp HMMTables.h FlexArray.h Array.h Vector.h \
- mystl.h myassert.h mymath.h Array2.h Globals.h defs.h Parameter.h \
- Pointer.h
-vdebug/logprob.o: logprob.cpp logprob.h
-vdebug/main.o: main.cpp getSentence.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h defs.h vocab.h Globals.h TTables.h model1.h Perplexity.h \
- Dictionary.h model2.h ATables.h Array4.h model3.h MoveSwapMatrix.h \
- alignment.h transpair_model3.h NTables.h transpair_model2.h \
- transpair_model1.h transpair_modelhmm.h ForwardBackward.h Array.h hmm.h \
- WordClasses.h HMMTables.h FlexArray.h D4Tables.h AlignTables.h \
- file_spec.h utility.h Parameter.h Pointer.h D5Tables.h \
- transpair_model4.h transpair_model5.h
-vdebug/model1.o: model1.cpp model1.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h vocab.h defs.h TTables.h Globals.h getSentence.h Perplexity.h \
- Dictionary.h utility.h Parameter.h Pointer.h
-vdebug/model2.o: model2.cpp model2.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h TTables.h defs.h vocab.h Globals.h ATables.h Array4.h \
- getSentence.h model1.h Perplexity.h Dictionary.h utility.h Parameter.h \
- Pointer.h
-vdebug/model2to3.o: model2to3.cpp model3.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h MoveSwapMatrix.h alignment.h defs.h transpair_model3.h \
- NTables.h vocab.h ATables.h Array4.h TTables.h Globals.h \
- transpair_model2.h transpair_model1.h getSentence.h model2.h model1.h \
- Perplexity.h Dictionary.h transpair_modelhmm.h ForwardBackward.h \
- Array.h hmm.h WordClasses.h HMMTables.h FlexArray.h D4Tables.h \
- AlignTables.h utility.h
-vdebug/model345-peg.o: model345-peg.cpp model3.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h MoveSwapMatrix.h alignment.h defs.h \
- transpair_model3.h NTables.h vocab.h ATables.h Array4.h TTables.h \
- Globals.h transpair_model2.h transpair_model1.h getSentence.h model2.h \
- model1.h Perplexity.h Dictionary.h transpair_modelhmm.h \
- ForwardBackward.h Array.h hmm.h WordClasses.h HMMTables.h FlexArray.h \
- D4Tables.h AlignTables.h collCounts.h transpair_model4.h
-vdebug/model3.o: model3.cpp model3.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h MoveSwapMatrix.h alignment.h defs.h transpair_model3.h \
- NTables.h vocab.h ATables.h Array4.h TTables.h Globals.h \
- transpair_model2.h transpair_model1.h getSentence.h model2.h model1.h \
- Perplexity.h Dictionary.h transpair_modelhmm.h ForwardBackward.h \
- Array.h hmm.h WordClasses.h HMMTables.h FlexArray.h D4Tables.h \
- AlignTables.h collCounts.h transpair_model4.h utility.h D5Tables.h \
- transpair_model5.h Parameter.h Pointer.h
-vdebug/model3_viterbi.o: model3_viterbi.cpp model3.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h MoveSwapMatrix.h alignment.h defs.h \
- transpair_model3.h NTables.h vocab.h ATables.h Array4.h TTables.h \
- Globals.h transpair_model2.h transpair_model1.h getSentence.h model2.h \
- model1.h Perplexity.h Dictionary.h transpair_modelhmm.h \
- ForwardBackward.h Array.h hmm.h WordClasses.h HMMTables.h FlexArray.h \
- D4Tables.h AlignTables.h utility.h
-vdebug/model3_viterbi_with_tricks.o: model3_viterbi_with_tricks.cpp mystl.h \
- myassert.h mymath.h Array2.h model3.h Vector.h MoveSwapMatrix.h \
- alignment.h defs.h transpair_model3.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h transpair_model2.h transpair_model1.h \
- getSentence.h model2.h model1.h Perplexity.h Dictionary.h \
- transpair_modelhmm.h ForwardBackward.h Array.h hmm.h WordClasses.h \
- HMMTables.h FlexArray.h D4Tables.h AlignTables.h collCounts.h \
- transpair_model4.h utility.h D5Tables.h transpair_model5.h Parameter.h \
- Pointer.h collCounts.cpp
-vdebug/MoveSwapMatrix.o: MoveSwapMatrix.cpp MoveSwapMatrix.h alignment.h Vector.h \
- mystl.h myassert.h mymath.h Array2.h defs.h transpair_model3.h \
- NTables.h vocab.h ATables.h Array4.h TTables.h Globals.h \
- transpair_model2.h transpair_model1.h transpair_model4.h D4Tables.h \
- WordClasses.h transpair_model5.h D5Tables.h transpair_modelhmm.h \
- ForwardBackward.h Array.h hmm.h getSentence.h model2.h model1.h \
- Perplexity.h Dictionary.h HMMTables.h FlexArray.h
-vdebug/myassert.o: myassert.cpp mystl.h myassert.h mymath.h Array2.h
-vdebug/NTables.o: NTables.cpp NTables.h Array2.h mystl.h myassert.h mymath.h \
- Vector.h defs.h vocab.h Parameter.h Pointer.h Globals.h
-vdebug/Parameter.o: Parameter.cpp Parameter.h mystl.h myassert.h mymath.h \
- Array2.h Pointer.h Globals.h defs.h Vector.h
-vdebug/parse.o: parse.cpp defs.h utility.h Perplexity.h Vector.h mystl.h \
- myassert.h mymath.h Array2.h Globals.h TTables.h vocab.h getSentence.h \
- D4Tables.h WordClasses.h D5Tables.h ATables.h Array4.h Parameter.h \
- Pointer.h
-vdebug/Perplexity.o: Perplexity.cpp Perplexity.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h defs.h Globals.h
-vdebug/plain2snt.o: plain2snt.cpp
-vdebug/reports.o: reports.cpp defs.h vocab.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h Perplexity.h Globals.h getSentence.h TTables.h Parameter.h \
- Pointer.h
-vdebug/snt2cooc.o: snt2cooc.cpp
-vdebug/snt2plain.o: snt2plain.cpp
-vdebug/transpair_model3.o: transpair_model3.cpp transpair_model3.h Array2.h \
- mystl.h myassert.h mymath.h defs.h Vector.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h alignment.h transpair_model2.h \
- transpair_model1.h
-vdebug/transpair_model4.o: transpair_model4.cpp transpair_model4.h Array2.h \
- mystl.h myassert.h mymath.h defs.h Vector.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h alignment.h D4Tables.h WordClasses.h \
- transpair_model3.h transpair_model2.h transpair_model1.h Parameter.h \
- Pointer.h
-vdebug/transpair_model5.o: transpair_model5.cpp transpair_model5.h Array2.h \
- mystl.h myassert.h mymath.h defs.h Vector.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h alignment.h D5Tables.h D4Tables.h \
- WordClasses.h transpair_model4.h transpair_model3.h transpair_model2.h \
- transpair_model1.h Parameter.h Pointer.h
-vdebug/TTables.o: TTables.cpp TTables.h defs.h vocab.h Vector.h mystl.h \
- myassert.h mymath.h Array2.h Globals.h Parameter.h Pointer.h
-vdebug/utility.o: utility.cpp mymath.h
-vdebug/vocab.o: vocab.cpp vocab.h defs.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h
-#Automatically generated dependecy list
-norm/alignment.o: alignment.cpp alignment.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h defs.h
-norm/AlignTables.o: AlignTables.cpp AlignTables.h defs.h Vector.h mystl.h \
- myassert.h mymath.h Array2.h transpair_model1.h NTables.h vocab.h \
- ATables.h Array4.h TTables.h Globals.h alignment.h
-norm/ATables.o: ATables.cpp ATables.h defs.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h Array4.h Globals.h Parameter.h Pointer.h
-norm/collCounts.o: collCounts.cpp alignment.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h defs.h transpair_model3.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h transpair_model2.h transpair_model1.h \
- collCounts.h MoveSwapMatrix.h D4Tables.h WordClasses.h \
- transpair_model4.h D5Tables.h transpair_model5.h transpair_modelhmm.h \
- ForwardBackward.h Array.h hmm.h getSentence.h model2.h model1.h \
- Perplexity.h Dictionary.h HMMTables.h FlexArray.h Parameter.h Pointer.h
-norm/Dictionary.o: Dictionary.cpp Dictionary.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h
-norm/ForwardBackward.o: ForwardBackward.cpp ForwardBackward.h myassert.h \
- Array.h Vector.h mystl.h mymath.h Array2.h Globals.h defs.h HMMTables.h \
- FlexArray.h
-norm/getSentence.o: getSentence.cpp getSentence.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h defs.h vocab.h Globals.h Parameter.h Pointer.h
-norm/hmm.o: hmm.cpp hmm.h Vector.h mystl.h myassert.h mymath.h Array2.h \
- TTables.h defs.h vocab.h Globals.h ATables.h Array4.h getSentence.h \
- model2.h model1.h Perplexity.h Dictionary.h WordClasses.h HMMTables.h \
- FlexArray.h Array.h ForwardBackward.h utility.h Parameter.h Pointer.h \
- HMMTables.cpp
-norm/HMMTables.o: HMMTables.cpp HMMTables.h FlexArray.h Array.h Vector.h \
- mystl.h myassert.h mymath.h Array2.h Globals.h defs.h Parameter.h \
- Pointer.h
-norm/logprob.o: logprob.cpp logprob.h
-norm/main.o: main.cpp getSentence.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h defs.h vocab.h Globals.h TTables.h model1.h Perplexity.h \
- Dictionary.h model2.h ATables.h Array4.h model3.h MoveSwapMatrix.h \
- alignment.h transpair_model3.h NTables.h transpair_model2.h \
- transpair_model1.h transpair_modelhmm.h ForwardBackward.h Array.h hmm.h \
- WordClasses.h HMMTables.h FlexArray.h D4Tables.h AlignTables.h \
- file_spec.h utility.h Parameter.h Pointer.h D5Tables.h \
- transpair_model4.h transpair_model5.h
-norm/model1.o: model1.cpp model1.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h vocab.h defs.h TTables.h Globals.h getSentence.h Perplexity.h \
- Dictionary.h utility.h Parameter.h Pointer.h
-norm/model2.o: model2.cpp model2.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h TTables.h defs.h vocab.h Globals.h ATables.h Array4.h \
- getSentence.h model1.h Perplexity.h Dictionary.h utility.h Parameter.h \
- Pointer.h
-norm/model2to3.o: model2to3.cpp model3.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h MoveSwapMatrix.h alignment.h defs.h transpair_model3.h \
- NTables.h vocab.h ATables.h Array4.h TTables.h Globals.h \
- transpair_model2.h transpair_model1.h getSentence.h model2.h model1.h \
- Perplexity.h Dictionary.h transpair_modelhmm.h ForwardBackward.h \
- Array.h hmm.h WordClasses.h HMMTables.h FlexArray.h D4Tables.h \
- AlignTables.h utility.h
-norm/model345-peg.o: model345-peg.cpp model3.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h MoveSwapMatrix.h alignment.h defs.h \
- transpair_model3.h NTables.h vocab.h ATables.h Array4.h TTables.h \
- Globals.h transpair_model2.h transpair_model1.h getSentence.h model2.h \
- model1.h Perplexity.h Dictionary.h transpair_modelhmm.h \
- ForwardBackward.h Array.h hmm.h WordClasses.h HMMTables.h FlexArray.h \
- D4Tables.h AlignTables.h collCounts.h transpair_model4.h
-norm/model3.o: model3.cpp model3.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h MoveSwapMatrix.h alignment.h defs.h transpair_model3.h \
- NTables.h vocab.h ATables.h Array4.h TTables.h Globals.h \
- transpair_model2.h transpair_model1.h getSentence.h model2.h model1.h \
- Perplexity.h Dictionary.h transpair_modelhmm.h ForwardBackward.h \
- Array.h hmm.h WordClasses.h HMMTables.h FlexArray.h D4Tables.h \
- AlignTables.h collCounts.h transpair_model4.h utility.h D5Tables.h \
- transpair_model5.h Parameter.h Pointer.h
-norm/model3_viterbi.o: model3_viterbi.cpp model3.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h MoveSwapMatrix.h alignment.h defs.h \
- transpair_model3.h NTables.h vocab.h ATables.h Array4.h TTables.h \
- Globals.h transpair_model2.h transpair_model1.h getSentence.h model2.h \
- model1.h Perplexity.h Dictionary.h transpair_modelhmm.h \
- ForwardBackward.h Array.h hmm.h WordClasses.h HMMTables.h FlexArray.h \
- D4Tables.h AlignTables.h utility.h
-norm/model3_viterbi_with_tricks.o: model3_viterbi_with_tricks.cpp mystl.h \
- myassert.h mymath.h Array2.h model3.h Vector.h MoveSwapMatrix.h \
- alignment.h defs.h transpair_model3.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h transpair_model2.h transpair_model1.h \
- getSentence.h model2.h model1.h Perplexity.h Dictionary.h \
- transpair_modelhmm.h ForwardBackward.h Array.h hmm.h WordClasses.h \
- HMMTables.h FlexArray.h D4Tables.h AlignTables.h collCounts.h \
- transpair_model4.h utility.h D5Tables.h transpair_model5.h Parameter.h \
- Pointer.h collCounts.cpp
-norm/MoveSwapMatrix.o: MoveSwapMatrix.cpp MoveSwapMatrix.h alignment.h Vector.h \
- mystl.h myassert.h mymath.h Array2.h defs.h transpair_model3.h \
- NTables.h vocab.h ATables.h Array4.h TTables.h Globals.h \
- transpair_model2.h transpair_model1.h transpair_model4.h D4Tables.h \
- WordClasses.h transpair_model5.h D5Tables.h transpair_modelhmm.h \
- ForwardBackward.h Array.h hmm.h getSentence.h model2.h model1.h \
- Perplexity.h Dictionary.h HMMTables.h FlexArray.h
-norm/myassert.o: myassert.cpp mystl.h myassert.h mymath.h Array2.h
-norm/NTables.o: NTables.cpp NTables.h Array2.h mystl.h myassert.h mymath.h \
- Vector.h defs.h vocab.h Parameter.h Pointer.h Globals.h
-norm/Parameter.o: Parameter.cpp Parameter.h mystl.h myassert.h mymath.h \
- Array2.h Pointer.h Globals.h defs.h Vector.h
-norm/parse.o: parse.cpp defs.h utility.h Perplexity.h Vector.h mystl.h \
- myassert.h mymath.h Array2.h Globals.h TTables.h vocab.h getSentence.h \
- D4Tables.h WordClasses.h D5Tables.h ATables.h Array4.h Parameter.h \
- Pointer.h
-norm/Perplexity.o: Perplexity.cpp Perplexity.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h defs.h Globals.h
-norm/plain2snt.o: plain2snt.cpp
-norm/reports.o: reports.cpp defs.h vocab.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h Perplexity.h Globals.h getSentence.h TTables.h Parameter.h \
- Pointer.h
-norm/snt2cooc.o: snt2cooc.cpp
-norm/snt2plain.o: snt2plain.cpp
-norm/transpair_model3.o: transpair_model3.cpp transpair_model3.h Array2.h \
- mystl.h myassert.h mymath.h defs.h Vector.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h alignment.h transpair_model2.h \
- transpair_model1.h
-norm/transpair_model4.o: transpair_model4.cpp transpair_model4.h Array2.h \
- mystl.h myassert.h mymath.h defs.h Vector.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h alignment.h D4Tables.h WordClasses.h \
- transpair_model3.h transpair_model2.h transpair_model1.h Parameter.h \
- Pointer.h
-norm/transpair_model5.o: transpair_model5.cpp transpair_model5.h Array2.h \
- mystl.h myassert.h mymath.h defs.h Vector.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h alignment.h D5Tables.h D4Tables.h \
- WordClasses.h transpair_model4.h transpair_model3.h transpair_model2.h \
- transpair_model1.h Parameter.h Pointer.h
-norm/TTables.o: TTables.cpp TTables.h defs.h vocab.h Vector.h mystl.h \
- myassert.h mymath.h Array2.h Globals.h Parameter.h Pointer.h
-norm/utility.o: utility.cpp mymath.h
-norm/vocab.o: vocab.cpp vocab.h defs.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h
-#Automatically generated dependecy list
-profile/alignment.o: alignment.cpp alignment.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h defs.h
-profile/AlignTables.o: AlignTables.cpp AlignTables.h defs.h Vector.h mystl.h \
- myassert.h mymath.h Array2.h transpair_model1.h NTables.h vocab.h \
- ATables.h Array4.h TTables.h Globals.h alignment.h
-profile/ATables.o: ATables.cpp ATables.h defs.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h Array4.h Globals.h Parameter.h Pointer.h
-profile/collCounts.o: collCounts.cpp alignment.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h defs.h transpair_model3.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h transpair_model2.h transpair_model1.h \
- collCounts.h MoveSwapMatrix.h D4Tables.h WordClasses.h \
- transpair_model4.h D5Tables.h transpair_model5.h transpair_modelhmm.h \
- ForwardBackward.h Array.h hmm.h getSentence.h model2.h model1.h \
- Perplexity.h Dictionary.h HMMTables.h FlexArray.h Parameter.h Pointer.h
-profile/Dictionary.o: Dictionary.cpp Dictionary.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h
-profile/ForwardBackward.o: ForwardBackward.cpp ForwardBackward.h myassert.h \
- Array.h Vector.h mystl.h mymath.h Array2.h Globals.h defs.h HMMTables.h \
- FlexArray.h
-profile/getSentence.o: getSentence.cpp getSentence.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h defs.h vocab.h Globals.h Parameter.h Pointer.h
-profile/hmm.o: hmm.cpp hmm.h Vector.h mystl.h myassert.h mymath.h Array2.h \
- TTables.h defs.h vocab.h Globals.h ATables.h Array4.h getSentence.h \
- model2.h model1.h Perplexity.h Dictionary.h WordClasses.h HMMTables.h \
- FlexArray.h Array.h ForwardBackward.h utility.h Parameter.h Pointer.h \
- HMMTables.cpp
-profile/HMMTables.o: HMMTables.cpp HMMTables.h FlexArray.h Array.h Vector.h \
- mystl.h myassert.h mymath.h Array2.h Globals.h defs.h Parameter.h \
- Pointer.h
-profile/logprob.o: logprob.cpp logprob.h
-profile/main.o: main.cpp getSentence.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h defs.h vocab.h Globals.h TTables.h model1.h Perplexity.h \
- Dictionary.h model2.h ATables.h Array4.h model3.h MoveSwapMatrix.h \
- alignment.h transpair_model3.h NTables.h transpair_model2.h \
- transpair_model1.h transpair_modelhmm.h ForwardBackward.h Array.h hmm.h \
- WordClasses.h HMMTables.h FlexArray.h D4Tables.h AlignTables.h \
- file_spec.h utility.h Parameter.h Pointer.h D5Tables.h \
- transpair_model4.h transpair_model5.h
-profile/model1.o: model1.cpp model1.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h vocab.h defs.h TTables.h Globals.h getSentence.h Perplexity.h \
- Dictionary.h utility.h Parameter.h Pointer.h
-profile/model2.o: model2.cpp model2.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h TTables.h defs.h vocab.h Globals.h ATables.h Array4.h \
- getSentence.h model1.h Perplexity.h Dictionary.h utility.h Parameter.h \
- Pointer.h
-profile/model2to3.o: model2to3.cpp model3.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h MoveSwapMatrix.h alignment.h defs.h transpair_model3.h \
- NTables.h vocab.h ATables.h Array4.h TTables.h Globals.h \
- transpair_model2.h transpair_model1.h getSentence.h model2.h model1.h \
- Perplexity.h Dictionary.h transpair_modelhmm.h ForwardBackward.h \
- Array.h hmm.h WordClasses.h HMMTables.h FlexArray.h D4Tables.h \
- AlignTables.h utility.h
-profile/model345-peg.o: model345-peg.cpp model3.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h MoveSwapMatrix.h alignment.h defs.h \
- transpair_model3.h NTables.h vocab.h ATables.h Array4.h TTables.h \
- Globals.h transpair_model2.h transpair_model1.h getSentence.h model2.h \
- model1.h Perplexity.h Dictionary.h transpair_modelhmm.h \
- ForwardBackward.h Array.h hmm.h WordClasses.h HMMTables.h FlexArray.h \
- D4Tables.h AlignTables.h collCounts.h transpair_model4.h
-profile/model3.o: model3.cpp model3.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h MoveSwapMatrix.h alignment.h defs.h transpair_model3.h \
- NTables.h vocab.h ATables.h Array4.h TTables.h Globals.h \
- transpair_model2.h transpair_model1.h getSentence.h model2.h model1.h \
- Perplexity.h Dictionary.h transpair_modelhmm.h ForwardBackward.h \
- Array.h hmm.h WordClasses.h HMMTables.h FlexArray.h D4Tables.h \
- AlignTables.h collCounts.h transpair_model4.h utility.h D5Tables.h \
- transpair_model5.h Parameter.h Pointer.h
-profile/model3_viterbi.o: model3_viterbi.cpp model3.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h MoveSwapMatrix.h alignment.h defs.h \
- transpair_model3.h NTables.h vocab.h ATables.h Array4.h TTables.h \
- Globals.h transpair_model2.h transpair_model1.h getSentence.h model2.h \
- model1.h Perplexity.h Dictionary.h transpair_modelhmm.h \
- ForwardBackward.h Array.h hmm.h WordClasses.h HMMTables.h FlexArray.h \
- D4Tables.h AlignTables.h utility.h
-profile/model3_viterbi_with_tricks.o: model3_viterbi_with_tricks.cpp mystl.h \
- myassert.h mymath.h Array2.h model3.h Vector.h MoveSwapMatrix.h \
- alignment.h defs.h transpair_model3.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h transpair_model2.h transpair_model1.h \
- getSentence.h model2.h model1.h Perplexity.h Dictionary.h \
- transpair_modelhmm.h ForwardBackward.h Array.h hmm.h WordClasses.h \
- HMMTables.h FlexArray.h D4Tables.h AlignTables.h collCounts.h \
- transpair_model4.h utility.h D5Tables.h transpair_model5.h Parameter.h \
- Pointer.h collCounts.cpp
-profile/MoveSwapMatrix.o: MoveSwapMatrix.cpp MoveSwapMatrix.h alignment.h Vector.h \
- mystl.h myassert.h mymath.h Array2.h defs.h transpair_model3.h \
- NTables.h vocab.h ATables.h Array4.h TTables.h Globals.h \
- transpair_model2.h transpair_model1.h transpair_model4.h D4Tables.h \
- WordClasses.h transpair_model5.h D5Tables.h transpair_modelhmm.h \
- ForwardBackward.h Array.h hmm.h getSentence.h model2.h model1.h \
- Perplexity.h Dictionary.h HMMTables.h FlexArray.h
-profile/myassert.o: myassert.cpp mystl.h myassert.h mymath.h Array2.h
-profile/NTables.o: NTables.cpp NTables.h Array2.h mystl.h myassert.h mymath.h \
- Vector.h defs.h vocab.h Parameter.h Pointer.h Globals.h
-profile/Parameter.o: Parameter.cpp Parameter.h mystl.h myassert.h mymath.h \
- Array2.h Pointer.h Globals.h defs.h Vector.h
-profile/parse.o: parse.cpp defs.h utility.h Perplexity.h Vector.h mystl.h \
- myassert.h mymath.h Array2.h Globals.h TTables.h vocab.h getSentence.h \
- D4Tables.h WordClasses.h D5Tables.h ATables.h Array4.h Parameter.h \
- Pointer.h
-profile/Perplexity.o: Perplexity.cpp Perplexity.h Vector.h mystl.h myassert.h \
- mymath.h Array2.h defs.h Globals.h
-profile/plain2snt.o: plain2snt.cpp
-profile/reports.o: reports.cpp defs.h vocab.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h Perplexity.h Globals.h getSentence.h TTables.h Parameter.h \
- Pointer.h
-profile/snt2cooc.o: snt2cooc.cpp
-profile/snt2plain.o: snt2plain.cpp
-profile/transpair_model3.o: transpair_model3.cpp transpair_model3.h Array2.h \
- mystl.h myassert.h mymath.h defs.h Vector.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h alignment.h transpair_model2.h \
- transpair_model1.h
-profile/transpair_model4.o: transpair_model4.cpp transpair_model4.h Array2.h \
- mystl.h myassert.h mymath.h defs.h Vector.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h alignment.h D4Tables.h WordClasses.h \
- transpair_model3.h transpair_model2.h transpair_model1.h Parameter.h \
- Pointer.h
-profile/transpair_model5.o: transpair_model5.cpp transpair_model5.h Array2.h \
- mystl.h myassert.h mymath.h defs.h Vector.h NTables.h vocab.h ATables.h \
- Array4.h TTables.h Globals.h alignment.h D5Tables.h D4Tables.h \
- WordClasses.h transpair_model4.h transpair_model3.h transpair_model2.h \
- transpair_model1.h Parameter.h Pointer.h
-profile/TTables.o: TTables.cpp TTables.h defs.h vocab.h Vector.h mystl.h \
- myassert.h mymath.h Array2.h Globals.h Parameter.h Pointer.h
-profile/utility.o: utility.cpp mymath.h
-profile/vocab.o: vocab.cpp vocab.h defs.h Vector.h mystl.h myassert.h mymath.h \
- Array2.h
http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/ef91969a/ext/giza-pp/GIZA++-v2/file_spec.h
----------------------------------------------------------------------
diff --git a/ext/giza-pp/GIZA++-v2/file_spec.h b/ext/giza-pp/GIZA++-v2/file_spec.h
deleted file mode 100644
index 2d43295..0000000
--- a/ext/giza-pp/GIZA++-v2/file_spec.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-
-EGYPT Toolkit for Statistical Machine Translation
-Written by Yaser Al-Onaizan, Jan Curin, Michael Jahr, Kevin Knight, John Lafferty, Dan Melamed, David Purdy, Franz Och, Noah Smith, and David Yarowsky.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-USA.
-
-*/
-#ifndef FILE_SPEC_H
-#define FILE_SPEC_H
-
-#include <time.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-
-/* This function returns a string, locally called file_spec. This
- string is the concatenation of the date and time of execution
- and the user who is performing the execution */
-/* Originally implemented in C by Yaser Al-Onaizan;
- editions for C++ and formatting by Noah A. Smith, 9 July 1999 */
-
-char *Get_File_Spec (){
- struct tm *local;
- time_t t;
- char *user;
- char time_stmp[19];
- char *file_spec = 0;
-
- t = time(NULL);
- local = localtime(&t);
-
- sprintf(time_stmp, "%02d-%02d-%02d.%02d%02d%02d.", local->tm_year,
- (local->tm_mon + 1), local->tm_mday, local->tm_hour,
- local->tm_min, local->tm_sec);
- user = getenv("USER");
-
- file_spec = (char *)malloc(sizeof(char) *
- (strlen(time_stmp) + strlen(user) + 1));
- file_spec[0] = '\0';
- strcat(file_spec, time_stmp) ;
- strcat(file_spec, user);
- return file_spec;
-}
-
-#endif
http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/ef91969a/ext/giza-pp/GIZA++-v2/getSentence.cpp
----------------------------------------------------------------------
diff --git a/ext/giza-pp/GIZA++-v2/getSentence.cpp b/ext/giza-pp/GIZA++-v2/getSentence.cpp
deleted file mode 100644
index 125a6f7..0000000
--- a/ext/giza-pp/GIZA++-v2/getSentence.cpp
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
-
-EGYPT Toolkit for Statistical Machine Translation
-Written by Yaser Al-Onaizan, Jan Curin, Michael Jahr, Kevin Knight, John Lafferty, Dan Melamed, David Purdy, Franz Och, Noah Smith, and David Yarowsky.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-USA.
-
-*/
-/* --------------------------------------------------------------------------*
- * *
- * Module : getSentece *
- * *
- * Method Definitions File: getSentence.cc *
- * *
- * Objective: Defines clases and methods for handling I/O for the parallel *
- * corpus. *
- *****************************************************************************/
-
-
-#include "getSentence.h"
-#include <iostream>
-#include <sstream>
-#include "Parameter.h"
-#include "errno.h"
-
-int PrintedTooLong=0;
-
-/* -------------- Method Defnitions for Class sentenceHandler ---------------*/
-
-GLOBAL_PARAMETER(double,ManlexMAX_MULTIPLICITY,"manlexMAX_MULTIPLICITY","",PARLEV_EM,20.0);
-GLOBAL_PARAMETER(double,Manlexfactor1,"manlexfactor1","",PARLEV_EM,0.0);
-GLOBAL_PARAMETER(double,Manlexfactor2,"manlexfactor2","",PARLEV_EM,0.0);
-
-sentenceHandler::sentenceHandler(const char* filename, vcbList* elist,
- vcbList* flist) : realCount(0)
- // This method is the constructor of the class, it also intitializes the
- // sentence pair sequential number (count) to zero.
-
-{
- readflag = false ;
- allInMemory = false ;
- inputFilename = filename ;
- inputFile = new ifstream(filename);
- pair_no = 0 ;
- if(!(*inputFile)){
- cerr << "\nERROR:(a) Cannot open " << filename;
- exit(1);
- }
- currentSentence = 0;
- totalPairs1 = 0 ;
- totalPairs2 =0;
- pair_no = 0 ;
- noSentInBuffer = 0 ;
- Buffer.clear();
- bool isNegative=0;
- if (elist && flist){
- cout << "Calculating vocabulary frequencies from corpus " << filename << '\n';
- sentPair s ;
- while (getNextSentence(s, elist, flist))
- {
- totalPairs1++;
- totalPairs2+=s.realCount;
- // NOTE: this value might change during training
- // for words from the manual dictionary, yet this is ignored!
-
- if( s.noOcc<0 )
- isNegative=1;
- }
- }
- if( isNegative==1 )
- {
- cerr << "WARNING: corpus contains negative occurrency frequencies => these are interpreted as entries of a manual dictionary.\n";
- realCount=new Vector<double>(totalPairs1,1.0);
- }
- else
- realCount=0;
-}
-
-void sentenceHandler::rewind()
-{
- currentSentence = 0;
- readflag = false ;
- if (!allInMemory ||
- !(Buffer.size() >= 1 && Buffer[currentSentence].sentenceNo == 1)){
- // check if the buffer doe not already has the first chunk of pairs
- if (Buffer.size() > 0)
- cerr << ' ' << Buffer[currentSentence].sentenceNo << '\n';
- // totalPairs = 0 ;
- pair_no = 0 ;
- noSentInBuffer = 0 ;
- Buffer.clear();
- }
- if (!allInMemory){
- delete inputFile;
- inputFile = new ifstream(inputFilename);
- if(!(*inputFile)){
- cerr << "\nERROR:(b) Cannot open " << inputFilename << " " << (int)errno;
- }
- }
-}
-
-
-bool sentenceHandler::getNextSentence(sentPair& sent, vcbList* elist, vcbList* flist)
-{
- sentPair s ;
- if (readflag){
- cerr << "Attempting to read from the end of corpus, rewinding\n";
- rewind();
- return(false);
- }
- if (currentSentence >= noSentInBuffer){
- if (allInMemory)
- return(false);
- /* no more sentences in buffer */
- noSentInBuffer = 0 ;
- currentSentence = 0 ;
- Buffer.clear();
- cout << "Reading more sentence pairs into memory ... \n";
- while((noSentInBuffer < TRAIN_BUFFER_SIZE) && readNextSentence(s)){
- if ((s.fSent.size()-1) > (MAX_FERTILITY-1) * (s.eSent.size()-1)){
- cerr << "WARNING: The following sentence pair has source/target sentence length ration more than\n"<<
- "the maximum allowed limit for a source word fertility\n"<<
- " source length = " << s.eSent.size()-1 << " target length = " << s.fSent.size()-1 <<
- " ratio " << double(s.fSent.size()-1)/ (s.eSent.size()-1) << " ferility limit : " <<
- MAX_FERTILITY-1 << '\n';
- cerr << "Shortening sentence \n";
- cerr << s;
- s.eSent.resize(min(s.eSent.size(),s.fSent.size()));
- s.fSent.resize(min(s.eSent.size(),s.fSent.size()));
- }
- Buffer.push_back(s) ;
- if (elist && flist){
- if ((*elist).size() > 0)
- for (WordIndex i= 0 ; i < s.eSent.size() ; i++){
- if (s.eSent[i] >= (*elist).uniqTokens()){
- if( PrintedTooLong++<100)
- cerr << "ERROR: source word " << s.eSent[i] << " is not in the vocabulary list \n";
- exit(-1);
- }
- (*elist).incFreq(s.eSent[i], s.realCount);
- }
- if ((*flist).size() > 0)
- for (WordIndex j= 1 ; j < s.fSent.size() ; j++){
- if (s.fSent[j] >= (*flist).uniqTokens()){
- cerr << "ERROR: target word " << s.fSent[j] << " is not in the vocabulary list \n";
- exit(-1);
- }
- (*flist).incFreq(s.fSent[j], s.realCount);
- }
- }
- noSentInBuffer++;
- }
- if (inputFile->eof()){
- allInMemory = (Buffer.size() >= 1 &&
- Buffer[currentSentence].sentenceNo == 1) ;
- if (allInMemory)
- cout << "Corpus fits in memory, corpus has: " << Buffer.size() <<
- " sentence pairs.\n";
- }
- }
- if(noSentInBuffer <= 0 ){
- //cerr << "# sent in buffer " << noSentInBuffer << '\n';
- readflag = true ;
- return(false);
- }
- sent = Buffer[currentSentence++] ;
- if( sent.noOcc<0 && realCount )
- {
- if( Manlexfactor1 && sent.noOcc==-1.0 )
- sent.realCount=Manlexfactor1;
- else if( Manlexfactor2 && sent.noOcc==-2.0 )
- sent.realCount=Manlexfactor2;
- else
- sent.realCount=(*realCount)[sent.getSentenceNo()-1];
- }
- return true ;
-}
-bool sentenceHandler::readNextSentence(sentPair& sent)
- /* This method reads in a new pair of sentences, each pair is read from the
- corpus file as line triples. The first line the no of times this line
- pair occured in the corpus, the second line is the source sentence and
- the third is the target sentence. The sentences are represented by a space
- separated positive integer token ids. */
-{
-
- string line;
- bool fail(false) ;
-
- sent.clear();
- if (getline(*inputFile, line)){
- istringstream buffer(line);
- buffer >> sent.noOcc;
- if( sent.noOcc<0 )
- {
- if( realCount )
- {
- if( Manlexfactor1 && sent.noOcc==-1.0 )
- sent.realCount=Manlexfactor1;
- else if( Manlexfactor2 && sent.noOcc==-2.0 )
- sent.realCount=Manlexfactor2;
- else
- {
- sent.realCount=(*realCount)[pair_no];
- }
- }
- else
- sent.realCount=1.0;
- }
- else
- sent.realCount=sent.noOcc;
- }
- else {
- fail = true ;;
- }
- if (getline(*inputFile, line)){
- istringstream buffer(line);
- WordIndex w; // w is a local variabe for token id
- sent.eSent.push_back(0); // each source word is assumed to have 0 ==
- // a null word (id 0) at the begining of the sentence.
- while(buffer>>w){ // read source sentece , word by word .
- if (sent.eSent.size() < MAX_SENTENCE_LENGTH)
- sent.eSent.push_back(w);
- else {
- if( PrintedTooLong++<100)
- cerr << "{WARNING:(a)truncated sentence "<<pair_no<<"}";
- //cerr << "ERROR: getSentence.cc:getNextSentence(): sentence exceeds preset length limit of : " << MAX_SENTENCE_LENGTH << '\n';
- //cerr << "The following sentence will be truncated\n" << line;
- break ;
- }
- }
- }
- else {
- fail = true ;
- }
- if (getline(*inputFile, line)){
- istringstream buffer(line);
- WordIndex w; // w is a local variabe for token id
- sent.fSent.push_back(0); //0 is inserted for program uniformity
- while(buffer>>w){ // read target sentece , word by word .
- if (sent.fSent.size() < MAX_SENTENCE_LENGTH)
- sent.fSent.push_back(w);
- else {
- if( PrintedTooLong++<100)
- cerr << "{WARNING:(b)truncated sentence "<<pair_no<<"}";
- //cerr << "ERROR: getSentence.cc:getNextSentence(): sentence exceeds preset length limit of : " << MAX_SENTENCE_LENGTH << '\n';
- //cerr << "The following sentence will be truncated\n" << line;
- break ;
- }
- }
- }
- else {
- fail = true ;
- }
- if (fail){
- sent.eSent.clear();
- sent.fSent.clear();
- sent.sentenceNo = 0 ;
- sent.noOcc = 0 ;
- sent.realCount=0;
- return(false);
- }
- if( sent.eSent.size()==1||sent.fSent.size()==1 )
- cerr << "ERROR: Forbidden zero sentence length " << sent.sentenceNo << endl;
- sent.sentenceNo = ++pair_no;
- if(pair_no % 100000 == 0)
- cout << "[sent:" << sent.sentenceNo << "]"<< '\n';
- return true;
-}
-
-double optimize_lambda(Vector<double>&vd)
-{
- Vector<double> l;
- for(double lambda=1.0;lambda<ManlexMAX_MULTIPLICITY;lambda+=0.33)
- {
- double prod=0.0;
- for(unsigned int i=0;i<vd.size();++i)
- {
- prod += vd[i]*exp(lambda*vd[i])/(exp(lambda*vd[i])-1.0);
- }
- l.push_back(fabs(prod-1.0));
- }
- double lam=double(min_element(l.begin(),l.end())-l.begin())*0.33+1.0;
- if( lam<1.0 )
- {
- cerr << "ERROR: lambda is smaller than one: " << lam << endl;
- for(unsigned int i=0;i<vd.size();++i)
- cerr << vd[i] << ' ';
- cerr << endl;
- }
- return lam;
-}
-
-void sentenceHandler::setProbOfSentence(const sentPair&s,double d)
-{
- if( realCount==0 )
- return;
- else
- {
- if( s.noOcc<=0 )
- {
- double ed=exp(d);
- if( oldPairs.size()>0&&(oldPairs.back().get_eSent()!=s.get_eSent()||oldPairs.back().getSentenceNo()>=s.getSentenceNo()) )
- {
- double lambda=optimize_lambda(oldProbs);
- for(unsigned int i=0;i<oldPairs.size();++i)
- {
- if( oldProbs[i]<1e-5 )
- (*realCount)[oldPairs[i].getSentenceNo()-1]=1.0;
- else
- (*realCount)[oldPairs[i].getSentenceNo()-1]=lambda*oldProbs[i]/(1-exp(-lambda*oldProbs[i]));
- }
- oldPairs.clear();
- oldProbs.clear();
- }
- oldPairs.push_back(s);
- oldProbs.push_back(ed);
- }
- }
-}
-
-/* ------------- End of Method Definition of Class sentenceHandler ----------*/
-
-
-
-
-
-
http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/ef91969a/ext/giza-pp/GIZA++-v2/getSentence.h
----------------------------------------------------------------------
diff --git a/ext/giza-pp/GIZA++-v2/getSentence.h b/ext/giza-pp/GIZA++-v2/getSentence.h
deleted file mode 100644
index 246ae1c..0000000
--- a/ext/giza-pp/GIZA++-v2/getSentence.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
-
-EGYPT Toolkit for Statistical Machine Translation
-Written by Yaser Al-Onaizan, Jan Curin, Michael Jahr, Kevin Knight, John Lafferty, Dan Melamed, David Purdy, Franz Och, Noah Smith, and David Yarowsky.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-USA.
-
-*/
-/* --------------------------------------------------------------------------*
- * *
- * Module : getSentence *
- * *
- * Prototypes File: getSentence.h *
- * *
- * Objective: Defines clases and methods for handling I/O for the parallel *
- * corpus. *
- *****************************************************************************/
-
-
-
-
-
-#ifndef _sentenceHandler_h
-#define _sentenceHandler_h 1
-
-
-#include <iostream>
-#include <fstream>
-#include <string>
-#include "Vector.h"
-#include "defs.h"
-#include "vocab.h"
-#include "Globals.h"
-/*----------------------- Class Prototype Definition ------------------------*
- Class Name: sentenceHandleer
- Objective: This class is defined to handle training sentece pairs from the
- parallel corpus. Each pair has: a target sentece, called here French; a
- source sentece, called here English sentece; and an integer number denoting
- the number of times this pair occured in trining corpus. Both source and
- target senteces are represented as integer vector (variable size arrays),
- each entry is a numeric value which is the token id for the particular token
- in the sentece.
-
- *---------------------------------------------------------------------------*/
-
-class sentPair{
- public:
- int sentenceNo ;
- float noOcc;
- float realCount;
- Vector<WordIndex> eSent ;
- Vector<WordIndex> fSent;
-
- public:
- sentPair(){};
- void clear(){ eSent.clear(); fSent.clear(); noOcc=0; realCount=0; sentenceNo=0;};
- const Vector<WordIndex>&get_eSent()const
- { return eSent; }
- const Vector<WordIndex>&get_fSent()const
- { return fSent; }
- int getSentenceNo()const
- { return sentenceNo; }
- double getCount()const
- { return realCount; }
-};
-
-inline ostream&operator<<(ostream&of,const sentPair&s)
-{
- of << "Sent No: " << s.sentenceNo << " , No. Occurrences: " << s.noOcc << '\n';
- if( s.noOcc!=s.realCount )
- of << " Used No. Occurrences: " << s.realCount << '\n';
- unsigned int i;
- for(i=0; i < s.eSent.size(); i++)
- of << s.eSent[i] << ' ';
- of << '\n';
- for(i=1; i < s.fSent.size(); i++)
- of << s.fSent[i] << ' ';
- of << '\n';
- return of;
-}
-
-class sentenceHandler{
-public:
- const char * inputFilename; // parallel corpus file name, similar for all
- // sentence pair objects
- ifstream *inputFile; // parallel corpus file handler
- Vector<sentPair> Buffer;
- int noSentInBuffer ;
- int currentSentence ;
- int totalPairs1 ;
- double totalPairs2;
- bool readflag ; // true if you reach the end of file
- bool allInMemory ;
- int pair_no ;
- Vector<double> *realCount;
-
- Vector<sentPair> oldPairs;
- Vector<double> oldProbs;
- sentenceHandler(const char* filename, vcbList* elist=0, vcbList* flist=0);
- void rewind();
- bool getNextSentence(sentPair&, vcbList* = 0, vcbList* = 0); // will be defined in the definition file, this
- int getTotalNoPairs1()const {return totalPairs1;};
- double getTotalNoPairs2()const {return totalPairs2;};
- // method will read the next pair of sentence from memory buffer
- bool readNextSentence(sentPair&); // will be defined in the definition file, this
- void setProbOfSentence(const sentPair&s,double d);
-};
-
-#endif
-
http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/ef91969a/ext/giza-pp/GIZA++-v2/hmm.cpp
----------------------------------------------------------------------
diff --git a/ext/giza-pp/GIZA++-v2/hmm.cpp b/ext/giza-pp/GIZA++-v2/hmm.cpp
deleted file mode 100644
index fc4284c..0000000
--- a/ext/giza-pp/GIZA++-v2/hmm.cpp
+++ /dev/null
@@ -1,405 +0,0 @@
-/*
-
-Copyright (C) 1998,1999,2000,2001 Franz Josef Och (RWTH Aachen - Lehrstuhl fuer Informatik VI)
-
-This file is part of GIZA++ ( extension of GIZA ).
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-USA.
-
-*/
-#include "hmm.h"
-#include "Globals.h"
-#include "utility.h"
-#include "HMMTables.h"
-#include "ForwardBackward.h"
-#include "Parameter.h"
-
-#define CLASSIFY(i,empty,ianf) bool empty=(i>=l); unsigned int ianf=(i%l);
-#define CLASSIFY2(i,ianf) unsigned int ianf=(i%l);
-
-
-short PredictionInAlignments=0;
-short UniformEntryExit=3;
-short HMMTrainingSpecialFlags=0;
-
-GLOBAL_PARAMETER2(int,ModelH_Dump_Freq,"HMM DUMP FREQUENCY","th","dump frequency of HMM",PARLEV_OUTPUT,0);
-
-GLOBAL_PARAMETER(short,CompareAlDeps,"emAlignmentDependencies",
- "lextrain: dependencies in the HMM alignment model. "
- " &1: sentence length; &2: previous class; &4: previous position; "
- " &8: French position; &16: French class"
- ,PARLEV_MODELS,2);
-GLOBAL_PARAMETER(double,GLOBALProbabilityForEmpty,"emProbForEmpty",
- "f-b-trn: probability for empty word",PARLEV_MODELS,0.4);
-GLOBAL_PARAMETER(short,SmoothHMM,"emSmoothHMM",
- "f-b-trn: smooth HMM model &1: modified counts; &2:perform smoothing with -emAlSmooth",PARLEV_SPECIAL,2);
-GLOBAL_PARAMETER(double,HMMAlignmentModelSmoothFactor,"emAlSmooth",
- "f-b-trn: smoothing factor for HMM alignment model (can be ignored by -emSmoothHMM)",PARLEV_SMOOTH,0.2);
-
-
-/*template<class T>
-void smooth_standard(T*a,T*b,double p)
-{
- int n=b-a;
- if( n==0 )
- return;
- double pp=p/n;
- for(T*i=a;i!=b;++i)
- *i = (1.0-p)*(*i)+pp;
-}*/
-
-
-hmm::hmm(model2& m)
- : model2(m),counts(GLOBALProbabilityForEmpty,ewordclasses,fwordclasses),
- probs(GLOBALProbabilityForEmpty,ewordclasses,fwordclasses)
-{ }
-
-void hmm::initialize_table_uniformly(sentenceHandler&){}
-
-int hmm::em_with_tricks(int noIterations)
-{
- double minErrors=1.0;int minIter=0;
- string modelName="Hmm",shortModelName="hmm";
- int dumpFreq=ModelH_Dump_Freq;
- time_t it_st, st, it_fn, fn;
- string tfile, afile,afileh, number, alignfile, test_alignfile;
- int pair_no = 0;
- bool dump_files = false ;
- ofstream of2 ;
- st = time(NULL) ;
- sHandler1.rewind();
- cout << "\n==========================================================\n";
- cout << modelName << " Training Started at: " << ctime(&st);
- for(int it=1; it <= noIterations ; it++){
- pair_no = 0;
- it_st = time(NULL) ;
- cout << endl << "-----------\n" << modelName << ": Iteration " << it << '\n';
- dump_files = (dumpFreq != 0) && ((it % dumpFreq) == 0) && !NODUMPS;
- number = "";
- int n = it;
- do{
- number.insert((size_t)0, 1, (char)(n % 10 + '0'));
- } while((n /= 10) > 0);
- tfile = Prefix + ".t" + shortModelName + "." + number ;
- afile = Prefix + ".a" + shortModelName + "." + number ;
- afileh = Prefix + ".h" + shortModelName + "." + number ;
- alignfile = Prefix + ".A" + shortModelName + "." + number ;
- test_alignfile = Prefix + ".tst.A" + shortModelName + "." + number ;
- counts=HMMTables<int,WordClasses>(GLOBALProbabilityForEmpty,ewordclasses,fwordclasses);
- aCountTable.clear();
- initAL();
- em_loop(perp, sHandler1, dump_files , alignfile.c_str(), trainViterbiPerp, false,it==1,it);
- if( errorsAL()<minErrors )
- {
- minErrors=errorsAL();
- minIter=it;
- }
- if (testPerp && testHandler)
- em_loop(*testPerp, *testHandler, dump_files, test_alignfile.c_str(), *testViterbiPerp, true,it==1,it);
- if (dump_files&&OutputInAachenFormat==1)
- tTable.printCountTable(tfile.c_str(),Elist.getVocabList(),Flist.getVocabList(),1);
- tTable.normalizeTable(Elist, Flist);
- aCountTable.normalize(aTable);
- probs=counts;
- cout << modelName << ": ("<<it<<") TRAIN CROSS-ENTROPY " << perp.cross_entropy()
- << " PERPLEXITY " << perp.perplexity() << '\n';
- if (testPerp && testHandler)
- cout << modelName << ": ("<<it<<") TEST CROSS-ENTROPY " << (*testPerp).cross_entropy()
- << " PERPLEXITY " << (*testPerp).perplexity()
- << '\n';
- cout << modelName << ": ("<<it<<") VITERBI TRAIN CROSS-ENTROPY " << trainViterbiPerp.cross_entropy()
- << " PERPLEXITY " << trainViterbiPerp.perplexity() << '\n';
- if (testPerp && testHandler)
- cout << modelName << ": ("<<it<<") VITERBI TEST CROSS-ENTROPY " << testViterbiPerp->cross_entropy()
- << " PERPLEXITY " << testViterbiPerp->perplexity()
- << '\n';
- if (dump_files){
- if( OutputInAachenFormat==0)
- tTable.printProbTable(tfile.c_str(),Elist.getVocabList(),Flist.getVocabList(),OutputInAachenFormat);
- ofstream afilestream(afileh.c_str());
- probs.writeJumps(afilestream);
- aCountTable.printTable(afile.c_str());
- }
- it_fn = time(NULL) ;
- cout << "\n" << modelName << " Iteration: " << it<< " took: " <<
- difftime(it_fn, it_st) << " seconds\n";
- } // end of iterations
- fn = time(NULL) ;
- cout << endl << "Entire " << modelName << " Training took: " << difftime(fn, st) << " seconds\n";
- //cout << "tTable contains " << tTable.getHash().bucket_count()
- // << " buckets and " << tTable.getHash().size() << " entries." ;
- cout << "==========================================================\n";
- return minIter;
-}
-
-/*template<class T>
-T normalize_if_possible_with_increment(T*a,T*b,int increment)
-{
- T sum=0;
- for(T*i=a;i!=b;i+=increment)
- sum+=*i;
- if( sum )
- for(T*i=a;i!=b;i+=increment)
- *i/=sum;
- else
- {
- T factor=increment/(b-a);
- for(T*i=a;i!=b;i+=increment)
- *i=factor;
- }
- return sum;
-}*/
-
-void hmm::load_table(const char* aname){
- cout << "Hmm: loading a table not implemented.\n";
- abort();
- ifstream anamefile(aname);
- probs.readJumps(anamefile);
-}
-
-HMMNetwork *hmm::makeHMMNetwork(const Vector<WordIndex>& es,const Vector<WordIndex>&fs,bool doInit)const
-{
- unsigned int i,j;
- unsigned int l = es.size() - 1;
- unsigned int m = fs.size() - 1;
- unsigned int I=2*l,J=m;
- int IJ=I*J;
- bool DependencyOfJ=(CompareAlDeps&(16|8))||(PredictionInAlignments==2);
- bool DependencyOfPrevAJ=(CompareAlDeps&(2|4))||(PredictionInAlignments==0);
- HMMNetwork *net = new HMMNetwork(I,J);
- fill(net->alphainit.begin(),net->alphainit.end(),0.0);
- fill(net->betainit.begin(),net->betainit.end(),0.0);
- for(j=1;j<=m;j++)
- {
- for(i=1;i<=l;i++)
- net->n(i-1,j-1)=tTable.getProb(es[i], fs[j]) ;
- double emptyContribution=0;
- emptyContribution=tTable.getProb(es[0],fs[j]) ;
- for(i=1;i<=l;i++)
- net->n(i+l-1,j-1)=emptyContribution;
- net->finalMultiply*=max(normalize_if_possible_with_increment(&net->n(0,j-1),&net->n(0,j-1)+IJ,J),double(1e-12));
- }
- if( DependencyOfJ )
- net->e.resize(m-1);
- else
- net->e.resize(J>1);
- for(j=0;j<net->e.size();j++)
- {
- int frenchClass=fwordclasses.getClass(fs[1+min(int(m)-1,int(j)+1)]);
- net->e[j].resize(I,I,0);
- for(unsigned int i1=0;i1<I;++i1) {
- Array<double> al(l);
- CLASSIFY2(i1,i1real);
- for(unsigned int i2=0;i2<l;i2++)
- al[i2]=probs.getAlProb(i1real,i2,l,m,ewordclasses.getClass(es[1+i1real]),frenchClass
- ,j+1);
- normalize_if_possible(conv<double>(al.begin()),conv<double>(al.end()));
- if( SmoothHMM&2 )
- smooth_standard(conv<double>(al.begin()),conv<double>(al.end()),HMMAlignmentModelSmoothFactor);
- for(unsigned int i2=0;i2<I;i2++) {
- CLASSIFY(i2,empty_i2,i2real);
- net->e[j](i1,i2) = al[i2real];
-
- if( empty_i2 )
- if(i1real!=i2real)
- {
- net->e[j](i1,i2)=0;
- }
- else
- {
- net->e[j](i1,i2)=doInit?al[0]:(probs.getProbabilityForEmpty()); // make first HMM iteration like IBM-1
- }
- }
- normalize_if_possible(&net->e[j](i1,0),&net->e[j](i1,0)+I);
- }
- }
- if( doInit )
- {
- for(unsigned int i=0;i<I;++i)
- {
- net->alphainit[i]=net->betainit[i]=(i<I/2)?1:(2.0/I);
- net->betainit[i]=1.0;
- }
- }
- else
- {
- if( DependencyOfPrevAJ==0 )
- {
- for(i=0;i<I;i++)
- {
- CLASSIFY2(i,ireal);
- net->alphainit[i]=probs.getAlProb(-1,ireal,l,m,0,fwordclasses.getClass(fs[1+0]),0);
- }
- }
- else
- {
- if( UniformEntryExit&2 )probs.getBetaInit(I,net->betainit);
- if( UniformEntryExit&1 )probs.getAlphaInit(I,net->alphainit);
- }
- }
- massert( net->alphainit.size()==I );massert( net->betainit.size()==I );
- normalize_if_possible(conv<double>(net->alphainit.begin()),conv<double>(net->alphainit.end()));
- normalize_if_possible(conv<double>(net->betainit.begin()),conv<double>(net->betainit.end()));
- transform(net->betainit.begin(),net->betainit.end(),net->betainit.begin(),bind1st(multiplies<double>(),2*l));
- return net;
-}
-extern float MINCOUNTINCREASE;
-
-void hmm::em_loop(Perplexity& perp, sentenceHandler& sHandler1,
- bool dump_alignment, const char* alignfile, Perplexity& viterbi_perp,
- bool test,bool doInit,int
-)
-{
- WordIndex i, j, l, m ;
- double cross_entropy;
- int pair_no=0 ;
- perp.clear();
- viterbi_perp.clear();
- ofstream of2;
- // for each sentence pair in the corpus
- if (dump_alignment||FEWDUMPS )
- of2.open(alignfile);
- sentPair sent ;
- sHandler1.rewind();
- while(sHandler1.getNextSentence(sent)){
- const Vector<WordIndex>& es = sent.get_eSent();
- const Vector<WordIndex>& fs = sent.get_fSent();
- const float so = sent.getCount();
- l = es.size() - 1;
- m = fs.size() - 1;
- cross_entropy = log(1.0);
- Vector<WordIndex> viterbi_alignment(fs.size());
-
- unsigned int I=2*l,J=m;
- bool DependencyOfJ=(CompareAlDeps&(16|8))||(PredictionInAlignments==2);
- bool DependencyOfPrevAJ=(CompareAlDeps&(2|4))||(PredictionInAlignments==0);
- HMMNetwork *net=makeHMMNetwork(es,fs,doInit);
- Array<double> gamma;
- Array<Array2<double> > epsilon(DependencyOfJ?(m-1):1);
- double trainProb;
- trainProb=ForwardBackwardTraining(*net,gamma,epsilon);
- if( !test )
- {
- double *gp=conv<double>(gamma.begin());
- for(unsigned int i2=0;i2<J;i2++)for(unsigned int i1=0;i1<I;++i1,++gp)
- if( *gp>MINCOUNTINCREASE )
- {
- COUNT add= *gp*so;
- if( i1>=l )
- {
- tTable.incCount(es[0],fs[1+i2],add);
- aCountTable.getRef(0,i2+1,l,m)+=add;
- }
- else
- {
- tTable.incCount(es[1+i1],fs[1+i2],add);
- aCountTable.getRef(1+i1,1+i2,l,m)+=add;
- }
- }
- double p0c=0.0,np0c=0.0;
- for(unsigned int jj=0;jj<epsilon.size();jj++)
- {
- int frenchClass=fwordclasses.getClass(fs[1+min(int(m)-1,int(jj)+1)]);
- double *ep=epsilon[jj].begin();
- if( ep )
- {
- //for(i=0;i<I;i++)
- // normalize_if_possible_with_increment(ep+i,ep+i+I*I,I);
- // for(i=0;i<I*I;++i)
- // ep[i] *= I;
- //if( DependencyOfJ )
- // if( J-1 )
- // for(i=0;i<I*I;++i)
- // ep[i] /= (J-1);
- double mult=1.0;
- mult*=l;
- //if( DependencyOfJ && J-1)
- // mult/=(J-1);
- for(i=0;i<I;i++)
- {
- for(unsigned int i_bef=0;i_bef<I;i_bef++,ep++)
- {
- CLASSIFY(i,i_empty,ireal);
- CLASSIFY2(i_bef,i_befreal);
- if( i_empty )
- p0c+=*ep * mult;
- else
- {
- counts.addAlCount(i_befreal,ireal,l,m,ewordclasses.getClass(es[1+i_befreal]),
- frenchClass ,jj+1,*ep * mult,0.0);
- np0c+=*ep * mult;
- }
- massert( &epsilon[jj](i,i_bef)== ep);
- }
- }
- }
- }
- double *gp1=conv<double>(gamma.begin()),*gp2=conv<double>(gamma.end())-I;
- Array<double>&ai=counts.doGetAlphaInit(I);
- Array<double>&bi=counts.doGetBetaInit(I);
- int firstFrenchClass=(fs.size()>1)?(fwordclasses.getClass(fs[1+0])):0;
- for(i=0;i<I;i++,gp1++,gp2++)
- {
- CLASSIFY(i,i_empty,ireal);
- ai[i]+= *gp1;
- bi[i]+= *gp2;
- if( DependencyOfPrevAJ==0 )
- {
- if( i_empty )
- p0c+=*gp1;
- else
- {
- counts.addAlCount(-1,ireal,l,m,0,firstFrenchClass,0,*gp1,0.0);
- np0c+=*gp1;
- }
- }
- }
- if( Verbose )
- cout << "l: " << l << "m: " << m << " p0c: " << p0c << " np0c: " << np0c << endl;
- }
- cross_entropy+=log(max(trainProb,1e-100))+log(max(net->finalMultiply,1e-100));
- Array<int>vit;
- double viterbi_score=1.0;
- if( (HMMTrainingSpecialFlags&1) )
- HMMViterbi(*net,gamma,vit);
- else
- viterbi_score=HMMRealViterbi(*net,vit);
- for(j=1;j<=m;j++)
- {
- viterbi_alignment[j]=vit[j-1]+1;
- if( viterbi_alignment[j]>l)
- viterbi_alignment[j]=0;
- }
- sHandler1.setProbOfSentence(sent,cross_entropy);
- perp.addFactor(cross_entropy, so, l, m,1);
- viterbi_perp.addFactor(log(viterbi_score)+log(max(net->finalMultiply,1e-100)), so, l, m,1);
- if( Verbose )
- cout << "Viterbi-perp: " << log(viterbi_score) << ' ' << log(max(net->finalMultiply,1e-100)) << ' ' << viterbi_score << ' ' << net->finalMultiply << ' ' << *net << "gamma: " << gamma << endl;
- delete net;net=0;
- if (dump_alignment||(FEWDUMPS&&sent.getSentenceNo()<1000) )
- printAlignToFile(es, fs, Elist.getVocabList(), Flist.getVocabList(), of2, viterbi_alignment, sent.getSentenceNo(), viterbi_score);
- addAL(viterbi_alignment,sent.getSentenceNo(),l);
- pair_no++;
- } /* of while */
- sHandler1.rewind();
- perp.record("HMM");
- viterbi_perp.record("HMM");
- errorReportAL(cout,"HMM");
-}
-
-#include "HMMTables.cpp"
-template class HMMTables<int,WordClasses>;
-
http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/ef91969a/ext/giza-pp/GIZA++-v2/hmm.h
----------------------------------------------------------------------
diff --git a/ext/giza-pp/GIZA++-v2/hmm.h b/ext/giza-pp/GIZA++-v2/hmm.h
deleted file mode 100644
index 6909bea..0000000
--- a/ext/giza-pp/GIZA++-v2/hmm.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-
-EGYPT Toolkit for Statistical Machine Translation
-Written by Yaser Al-Onaizan, Jan Curin, Michael Jahr, Kevin Knight, John Lafferty, Dan Melamed, David Purdy, Franz Och, Noah Smith, and David Yarowsky.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-USA.
-
-*/
-#ifndef _hmm_h
-#define _hmm_h 1
-
-#include <cassert>
-
-#include <iostream>
-#include <algorithm>
-#include <functional>
-#include <map>
-#include <set>
-#include "Vector.h"
-#include <utility>
-
-#include <fstream>
-#include <cmath>
-#include <ctime>
-
-#include "TTables.h"
-#include "ATables.h"
-#include "getSentence.h"
-#include "defs.h"
-#include "model2.h"
-#include "Perplexity.h"
-#include "vocab.h"
-#include "WordClasses.h"
-#include "HMMTables.h"
-#include "ForwardBackward.h"
-
-class hmm : public model2
-{
- private:
- WordClasses ewordclasses;
- WordClasses fwordclasses;
- HMMTables<int,WordClasses> counts,probs;
- public:
- template<class MAPPER>
- void makeWordClasses(const MAPPER&m1,const MAPPER&m2,string efile,string ffile)
- {
- ifstream estrm(efile.c_str()),fstrm(ffile.c_str());
- if( !estrm )
- {
- cerr << "ERROR: can not read " << efile << endl;
- }
- else
- ewordclasses.read(estrm,m1);
- if( !fstrm )
- cerr << "ERROR: can not read " << ffile << endl;
- else
- fwordclasses.read(fstrm,m2);
- }
- hmm(model2&m2);
- void initialize_table_uniformly(sentenceHandler&);
- int em_with_tricks(int);
- void load_table(const char* aname);
- void em_loop(Perplexity& perp, sentenceHandler& sHandler1, bool dump_files,
- const char* alignfile, Perplexity&, bool test,bool doInit,int iter);
- HMMNetwork *makeHMMNetwork(const Vector<WordIndex>& es,const Vector<WordIndex>&fs,bool doInit)const;
- friend class model3;
-};
-
-#endif
http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/ef91969a/ext/giza-pp/GIZA++-v2/logprob.cpp
----------------------------------------------------------------------
diff --git a/ext/giza-pp/GIZA++-v2/logprob.cpp b/ext/giza-pp/GIZA++-v2/logprob.cpp
deleted file mode 100644
index 9035f80..0000000
--- a/ext/giza-pp/GIZA++-v2/logprob.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
-
-EGYPT Toolkit for Statistical Machine Translation
-Written by Yaser Al-Onaizan, Jan Curin, Michael Jahr, Kevin Knight, John Lafferty, Dan Melamed, David Purdy, Franz Och, Noah Smith, and David Yarowsky.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-USA.
-
-*/
-
-// Routines to perform integer exponential arithmetic.
-// A number x is represented as n, where x = b**n.
-// It is assumed that b > 1, something like b = 1.001;
-
-#include "logprob.h"
-#include <stdlib.h>
-#include <stdio.h>
-#include <iostream>
-#include <fstream>
-#include <string>
-double *LogProb::ntof = NULL; // Tables will be initialized
-int *LogProb::addtbl = NULL; // in Initialize function.
-int *LogProb::subtbl = NULL; //
-
-const int LogProb::max_2byte_integer = 32767;
-const int LogProb::min_2byte_integer = -32768;
-const double LogProb::b = 1.001; // a logarithm basis
-const double LogProb::logb2 = log(b);
-//const int LogProb::nmax = round(78.0E0 * log(1.0E1) / logb2);
-const int LogProb::nmax = round(300.0E0 * log(1.0E1) / logb2);
-const int LogProb::nmin = -nmax;
-const int LogProb::tblbnd = round(log((b-1.0E0)/2.0E0)/logb2);
-const int LogProb::zeron = round(pow(-2, 23));
-const int LogProb::onen = 0;
-const int LogProb::infn = onen - zeron;
-
-const int LogProb::initialized = LogProb::Initialize();
-const LogProb LogProb::zero(0);
-const LogProb LogProb::one(1);
-const LogProb LogProb::minus2(1e-2);
-const LogProb LogProb::minus4(1e-4);
-const LogProb LogProb::minus6(1e-6);
-const LogProb LogProb::minus8(1e-8);
-const LogProb LogProb::minus10(1e-10);
-const LogProb LogProb::minus12(1e-12);
-const LogProb LogProb::minus14(1e-14);
-const LogProb LogProb::minus16(1e-16);
-
-// static table initialization function
-int LogProb::Initialize()
-{
- int nbytes = sizeof(double)*(nmax-nmin+1) + sizeof(int)*(0-tblbnd+1);
- std::cerr << nbytes << " bytes used for LogProb tables (C++ version)\n";
- ntof = new double[nmax-nmin+1];
- addtbl = new int[-tblbnd+1];
- subtbl = new int[-tblbnd+1];
-
- // char filename[257];
- // string filename ;
- // ifstream ifs;
- // ifs.open(filename.c_str());
- // if (!ifs)
- // {
- int i;
- std::cerr << "Building integer logs conversion tables\n";
- ntof[0] = 0 ;
-
- for (i=nmin+1; i<=nmax; ++i)
- {
- double x = i;
- ntof[i-nmin] = exp(x*logb2);
-
- }
- for (i=tblbnd; i<=0; ++i)
- {
- double x = 1.0 + pow(b, i);
- addtbl[i-tblbnd] = round(log(x)/logb2);
- }
- double sqrtb = exp(0.5*logb2);
- for (i=0; i<=-tblbnd; ++i)
- {
- double x = sqrtb * pow(b, i) - 1.0;
- subtbl[i] = round(log(x)/logb2);
- }
- // if (toolsRoot)
- // {
- // ofstream ofs(filename.c_str());
- // if (!ofs)
- // cerr << "Could not write LogProb data to " << filename << endl;
- // else
- // {
- // ofs.write((const char *)ntof, sizeof(double) * (nmax-nmin+1));
- // ofs.write((const char *)addtbl, sizeof(int) * (-tblbnd+1));
- // ofs.write((const char *)subtbl, sizeof(int) * (-tblbnd+1));
- // }
- // }
- // }
- // else
- // {
- // ifs.read((char *)ntof, sizeof(double) * (nmax - nmin + 1));
- // ifs.read((char *)addtbl, sizeof(int) * (-tblbnd+1));
- // ifs.read((char *)subtbl, sizeof(int) * (-tblbnd+1));
- // }
- return 1;
-}
-
-void LogProb::FreeTables()
-{
- delete [] addtbl;
- delete [] subtbl;
- delete [] ntof;
-}
-
-//---------------------------------------------------------------------------
-// Aritmetic operators
-//---------------------------------------------------------------------------
-
-
-// Subtract two logarithm numbers. Use the following method:
-// b**n - b**m = b**m( b**(n-m) - 1 ), assuming n >= m.
-LogProb& LogProb::operator-=(const LogProb &subs)
-{
- if (subs.logr == zeron)
- return *this;
- int a = logr - subs.logr;
- if (a <= 0)
- {
- if (a < 0)
- {
- std::cerr << "WARNING(logprob): Invalid arguments to nsub" <<(*this)<< " " << subs << std::endl;
- //abort();
- }
- logr = zeron;
- return *this;
- }
- if (a > -tblbnd)
- return *this;
- logr = subs.logr + subtbl[a];
- return *this;
-}
-
-
http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/ef91969a/ext/giza-pp/GIZA++-v2/logprob.h
----------------------------------------------------------------------
diff --git a/ext/giza-pp/GIZA++-v2/logprob.h b/ext/giza-pp/GIZA++-v2/logprob.h
deleted file mode 100644
index 14696ac..0000000
--- a/ext/giza-pp/GIZA++-v2/logprob.h
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
-
-EGYPT Toolkit for Statistical Machine Translation
-Written by Yaser Al-Onaizan, Jan Curin, Michael Jahr, Kevin Knight, John Lafferty, Dan Melamed, David Purdy, Franz Och, Noah Smith, and David Yarowsky.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-USA.
-
-*/
-#ifndef _LOGPROB_H
-#define _LOGPROB_H
-
-// Routines to perform integer exponential arithmetic.
-// A number x is represented as n, where x = b**n
-// It is assumed that b > 1, something like b = 1.001
-
-#include <iostream>
-#include <math.h>
-#include <algorithm>
-
-//#define MAX(A,B) ((A) > (B) ? (A) : (B))
-//#define MIN(A,B) ((A) > (B) ? (B) : (A))
-
-
-class LogProb {
-public:
- // mj for cross entropy
- double base2() const {
- return (logr * logb2 / log(2));
- }
-
- // Constructors
- LogProb() : logr(zeron) {}
- LogProb(const LogProb &obj) : logr(obj.logr) {}
- LogProb(double x) : logr(x == 0.0 ? zeron : round(log(x)/logb2)) {}
- // destructor
- ~LogProb() {} // default destructor
-
- operator double() const // converts logr to (double) b**logr
- {
- if (logr < nmin) return ntof[0];
- if (logr > nmax) return ntof[nmax-nmin];
- return ntof[logr-nmin];
- }
-
- LogProb &operator=(const LogProb &obj) { logr = obj.logr; return *this; }
- int operator!() const { return logr == zeron; }
-
- // iostream friend specifications
- friend std::ostream& operator<<(std::ostream& os, const LogProb &obj);
- friend std::istream& operator>>(std::istream& is, LogProb &obj);
- friend std::ostream& operator<<=(std::ostream& os, const LogProb &obj);
- friend std::istream& operator>>=(std::istream& is, LogProb &obj);
-
- // arithmetic operators
- LogProb &operator+=(const LogProb &add) // logr2 = logb ( b**logr2 + b**logr1 )
- // Add two numbers represented as logarithms. Use the following method:
- // b**n + b**m = b**n(1 + b**(m-n)), assuming n >= m.
- {
- if (add.logr == zeron)
- return *this;
- if (logr == zeron)
- {
- logr = add.logr;
- return *this;
- }
- int a = add.logr - logr;
- if (a > 0)
- {
- a = -a;
- logr = add.logr;
- }
- if (a < tblbnd)
- return *this;
- logr += addtbl[a-tblbnd];
- return *this;
- }
-
- LogProb &operator-=(const LogProb &); // logr2 = logb ( b**logr2 + b**logr1 )
- LogProb operator*(const LogProb &mul) const // logr3 = logr2 + logr1
- {
- LogProb result; // start out with result == 0
- if ((logr != zeron) && (mul.logr != zeron))
- result.logr = std::max(logr+mul.logr, zeron);
- return result;
- }
- LogProb operator*(double x) const // logr3 = logr2 + logr1
- {
- return (*this)*(LogProb)x;
- }
- LogProb operator^(const int i) const // logr2 = logr1 * i
- {
- LogProb result; // start out with result == 0
- // if ((logr != zeron) && (mul.logr != zeron))
- result.logr = logr * i ;
- return result;
- }
- LogProb &operator*=(const LogProb &mul) // logr2 += logr1
- {
- if ((logr == zeron) || (mul.logr == zeron))
- logr = zeron;
- else
- logr = std::max(logr+mul.logr, zeron);
- return *this;
- }
- LogProb operator/(const LogProb &div) const // logr3 = logr2 -logr1
- {
- LogProb result;
- if (logr != zeron)
- result.logr = std::max(logr - div.logr, zeron);
- return result;
- }
- LogProb &operator/=(const LogProb &div) // logr2 -= logr1
- {
- if (logr != zeron)
- logr = std::max(logr - div.logr, zeron);
- return *this;
- }
- LogProb operator+(const LogProb &l) const // logr3 = logb ( b**logr2 + b**logr1 )
- { LogProb result(*this); result += l; return result; }
- LogProb operator-(const LogProb &l) const // logr3 = logb ( b**logr2 - b**logr1 )
- { LogProb result(*this); result -= l; return result; }
- LogProb power(const int n) const // logr2 = logr1 * int
- { LogProb result(*this); result.logr *= n; return result; }
-
- // Conditional operators
- int operator<(const LogProb &obj) const { return logr < obj.logr; }
- int operator<=(const LogProb &obj) const { return logr <= obj.logr; }
- int operator>(const LogProb &obj) const { return logr > obj.logr; }
- int operator>=(const LogProb &obj) const { return logr >= obj.logr; }
- int operator==(const LogProb &obj) const { return logr == obj.logr; }
- int operator!=(const LogProb &obj) const { return logr != obj.logr; }
- int operator<(double d) const { return ((double)*this) < d; }
- int operator<=(double d) const { return ((double)*this) <= d; }
- int operator>(double d) const { return ((double)*this) > d; }
- int operator>=(double d) const { return ((double)*this) >= d; }
- int operator==(double d) const { return ((double)*this) == d; }
- int operator!=(double d) const { return ((double)*this) != d; }
-
-
- LogProb &SetZero() { logr = zeron; return *this; } // representation of 0,
- LogProb &SetOne() { logr = onen; return *this; } // 1, and
- LogProb &SetInf() { logr = infn; return *this; } // inf in logarithm domain
-
-private:
- int logr; // a representation of logarithm
- // static constants
- static const int initialized; // initialization flag
- static const double b;
- static const double logb2;
- static const int nmin, nmax;
- static const int tblbnd;
- static const int zeron, onen, infn; // zero, one, and inf in log domain
- static const int max_2byte_integer, min_2byte_integer;
-
- // Arithmetic computation Tables
- static double *ntof;
- static int *addtbl;
- static int *subtbl;
-
- static int Initialize();
-
-public:
- static void FreeTables();
- // constants for initializing LogProbs to 0 or 1
- static const LogProb zero;
- static const LogProb one;
- static const LogProb minus2;
- static const LogProb minus4;
- static const LogProb minus6;
- static const LogProb minus8;
- static const LogProb minus10;
- static const LogProb minus12;
- static const LogProb minus14;
- static const LogProb minus16;
-};
-
-// iostream friend operators
-inline std::ostream &operator<<(std::ostream& os, const LogProb &obj)
-{
- return os << (double) obj; // output in linear domain, b**logr
-}
-
-inline std::istream &operator>>(std::istream& is, LogProb &obj)
-{
- double d;
- is >> d;
- obj = d;
- return is;
-}
-
-inline std::ostream &operator<<=(std::ostream& os, const LogProb &obj) // write binary
-{
- os.write((const char *)&obj.logr, sizeof(obj.logr));
- return os;
-}
-
-inline std::istream &operator>>=(std::istream& is, LogProb &obj)
-{
- is.read((char *)&obj.logr, sizeof(obj.logr));
- return is;
-}
-
-#endif
-