Skip to content

Commit 1780592

Browse files
cxzhuxpqiu
authored andcommitted
训练文件
2 parents 72d4223 + 48a0948 commit 1780592

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

fnlp-core/src/main/java/org/fnlp/nlp/parser/dep/analysis/AnalysisTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,8 @@ private void print(){
9292
System.out.printf("rate(UEM):\t%.8f\ttotal(sent):\t%d\n", 1 - 1.0
9393
* errsent / sent_sum, sent_sum);
9494
}
95+
96+
97+
9598

9699
}

fnlp-core/src/test/java/org/fnlp/util/MyFilesTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,5 @@ public static void setUpBeforeClass() throws Exception {
2020
public static void tearDownAfterClass() throws Exception {
2121
}
2222

23-
24-
2523

2624
}

fnlp-train/src/main/java/org/fnlp/train/parsing/DepPrepare.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static void main(String[] args) throws Exception {
5959
//处理测试数据
6060
FNLPCorpus corpust = new FNLPCorpus();
6161
//读自有数据
62-
// corpust.read(datapath + "/FNLPDATA/WeiboFTB(v1.0)-test.dat", null);
62+
corpust.read(datapath + "/FNLPDATA/WeiboFTB(v1.0)-test.dat", null);
6363
corpust.writeOne(testfile);
6464

6565
TreeSet<String> set2 = corpus.getAllRelations();

fnlp-train/src/main/java/org/fnlp/train/parsing/DepRun.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ public static void main(String[] args) throws Exception {
3131

3232

3333
JointParerTrainer trainer = new JointParerTrainer(model);
34-
int maxite = 50;
34+
int maxite = 25;
3535
float c = 0.01f;
3636
trainer.train(trainfile, maxite, c);
3737

3838
eval();
3939

4040
bw.println("优化");
41-
float thres = 0.00001f;
41+
float thres = 1.0E-3f;
4242
bw.println(thres);
4343

4444
ModelOptimization op = new ModelOptimization(thres);
@@ -48,7 +48,7 @@ public static void main(String[] args) throws Exception {
4848
/////////////////////////////////////////
4949

5050
bw.println("优化");
51-
thres = 0.001f;
51+
thres = 1.0E-2f;
5252
bw.println(thres);
5353
op = new ModelOptimization(thres);
5454
op.optimizeDep(model);

fnlp-train/src/main/java/org/fnlp/train/parsing/DepRunFinal.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static void main(String[] args) throws Exception {
3636
float c = 0.01f;
3737
trainer.train(allfile, maxite, c);
3838

39-
float thres = 0.00001f;
39+
float thres = 1.0E-3f;
4040
ModelOptimization op = new ModelOptimization(thres);
4141
op.optimizeDep(model);
4242

0 commit comments

Comments
 (0)