diff options
author | desaicwtf <desaicwtf@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-04 19:04:31 +0000 |
---|---|---|
committer | desaicwtf <desaicwtf@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-04 19:04:31 +0000 |
commit | f2c8c693795f7d4c29baae8594bbf6dcbadd958c (patch) | |
tree | 2ecf9ef1b35a7c2a1d4b59e6b80b17e0f30ed28d /gi/posterior-regularisation/prjava/src/hmm/HMMObjective.java | |
parent | 4933c202b3877a607e7ff6f266f0cdf3cc16dc62 (diff) |
PR phrase labeling draft
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@124 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi/posterior-regularisation/prjava/src/hmm/HMMObjective.java')
-rw-r--r-- | gi/posterior-regularisation/prjava/src/hmm/HMMObjective.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gi/posterior-regularisation/prjava/src/hmm/HMMObjective.java b/gi/posterior-regularisation/prjava/src/hmm/HMMObjective.java index 551210c0..70b6c966 100644 --- a/gi/posterior-regularisation/prjava/src/hmm/HMMObjective.java +++ b/gi/posterior-regularisation/prjava/src/hmm/HMMObjective.java @@ -18,7 +18,7 @@ public class HMMObjective extends ProjectedObjective{ private static final double GRAD_DIFF = 3;
public static double INIT_STEP_SIZE=10;
- public static double VAL_DIFF=2000;
+ public static double VAL_DIFF=1000;
private HMM hmm;
double[] newPoint ;
@@ -33,7 +33,7 @@ public class HMMObjective extends ProjectedObjective{ private SimplexProjection projection;
private int wordFreq[];
- private static int MIN_FREQ=3;
+ private static int MIN_FREQ=10;
private int numWordsToProject=0;
private int n_param;
@@ -88,6 +88,9 @@ public class HMMObjective extends ProjectedObjective{ if(projectionMap[word]==null){
projectionMap[word]=new TIntArrayList[n_states];
}
+ // if(posteriorMap[sentNum][i]==null){
+ // posteriorMap[sentNum][i]=new int[n_states];
+ // }
posteriorMap[sentNum][i][state]=n_param;
if(projectionMap[word][state]==null){
@@ -96,8 +99,8 @@ public class HMMObjective extends ProjectedObjective{ }
projectionMap[word][state].add(n_param);
n_param++;
- }else{
-
+ }
+ else{
posteriorMap[sentNum][i][state]=-1;
}
}
|