Skip to content

Commit

Permalink
Rehome the conll-2012 scorer. Not sure if the 2011 scorer can be reco…
Browse files Browse the repository at this point in the history
…vered easily yet

Update some paths in some properties as well to point to the new /u/nlp/data/coref home
  • Loading branch information
AngledLuffa committed May 17, 2024
1 parent 54aaf2c commit 53a8f1b
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 37 deletions.
7 changes: 4 additions & 3 deletions data/edu/stanford/nlp/dcoref/coref.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ dcoref.postprocessing = true
dcoref.maxdist = -1
dcoref.use.big.gender.number = false
dcoref.replicate.conll = true
dcoref.conll.scorer = /u/scr/nlp/data/conll-2011/scorer/v4/scorer.pl
# TODO maybe this can be 2012?
dcoref.conll.scorer = /u/nlp/data/coref/conll-2012/scorer/v4/scorer.pl

dcoref.logFile = /u/scr/nlp/coref/error_log/temp/result_conlldev.txt
dcoref.conll2011 = /u/scr/nlp/data/conll-2011/v2/data/dev/data/english/annotations
dcoref.logFile = /u/nlp/data/coref/error_log/temp/result_conlldev.txt
dcoref.conll2011 = /u/nlp/data/coref/conll-2011/v2/data/dev/data/english/annotations

6 changes: 3 additions & 3 deletions itest/src/edu/stanford/nlp/dcoref/DcorefSlowITest.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ protected void makePropsFile(String path, String workDir, String scorer) throws
}

public void testDcorefCoNLLResultV4() throws Exception {
double finalScore = runDcoref(String.format("%s/conll-2011/scorer/v4/scorer.pl", TestPaths.testHome()));
System.out.printf("Final Score (CoNLL 2011, scorer v4): (MUC+B^3+ceafe)/3 = %.2f%n", finalScore);
double finalScore = runDcoref(String.format("%s/conll-2012/scorer/v4/scorer.pl", TestPaths.testHome()));
System.out.printf("Final Score (CoNLL 2012, scorer v4): (MUC+B^3+ceafe)/3 = %.2f%n", finalScore);
assertEquals(59.3, finalScore, 0.3); // 2016-07: 59.45
}

public void testDcorefCoNLLResultV801() throws Exception {
double finalScore = runDcoref(String.format("%s/conll-2012/scorer/v8.01/scorer.pl", TestPaths.testHome()));
System.out.printf("Final Score (CoNLL 2011, scorer v8): (MUC+B^3+ceafe)/3 = %.2f%n", finalScore);
System.out.printf("Final Score (CoNLL 2012, scorer v8): (MUC+B^3+ceafe)/3 = %.2f%n", finalScore);
assertEquals(54.0, finalScore, 0.3); // 2016-07: 54.13
}

Expand Down
6 changes: 3 additions & 3 deletions src/edu/stanford/nlp/coref/CorefProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public static boolean useGoldMentions(Properties props) {

public static final String OUTPUT_PATH_PROP = "coref.conllOutputPath";
public static String conllOutputPath(Properties props) {
String returnPath = props.getProperty("coref.conllOutputPath", "/u/scr/nlp/coref/logs/");
String returnPath = props.getProperty("coref.conllOutputPath", "/u/nlp/data/coref/logs/");
if ( ! returnPath.endsWith("/")) {
returnPath += "/";
}
Expand All @@ -144,7 +144,7 @@ public static void setInput(Properties props, Dataset d) {
}

private static String getDataPath(Properties props) {
String returnPath = props.getProperty("coref.data", "/u/scr/nlp/data/conll-2012/");
String returnPath = props.getProperty("coref.data", "/u/nlp/data/coref/conll-2012/");
if ( ! returnPath.endsWith("/")) {
returnPath += "/";
}
Expand Down Expand Up @@ -172,7 +172,7 @@ public static String getInputPath(Properties props) {
}

public static String getScorerPath(Properties props) {
return props.getProperty("coref.scorer", "/u/scr/nlp/data/conll-2012/scorer/v8.01/scorer.pl");
return props.getProperty("coref.scorer", "/u/nlp/data/coref/conll-2012/scorer/v8.01/scorer.pl");
}

public static Locale getLanguage(Properties props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ coref.conll = true

## conll 2012
## train
coref.path.trainData = /u/scr/nlp/data/conll-2012/v4/data/train/data/english/annotations/
coref.path.trainData = /u/nlp/data/coref/conll-2012/v4/data/train/data/english/annotations/
#coref.path.traindata = /scr/nlp/data/conll-2012/v4/data/train+dev/

## eval
#coref.path.evaldata = /scr/nlp/data/conll-2012/v4/data/development/data/english/annotations/
coref.path.testData = /u/scr/nlp/data/conll-2012/v9/data/test/data/english/annotations
coref.path.testData = /u/nlp/data/coref/conll-2012/v9/data/test/data/english/annotations


## models
coref.path.serialized = /u/scr/nlp/data/coref/models/hybrid-conll-dep
coref.path.serialized = /u/nlp/data/coref/models/hybrid-conll-dep

## other data
coref.big.gender.number = edu/stanford/nlp/models/dcoref/gender.data.gz
coref.path.word2vec = /u/scr/nlp/data/coref/wordvectors/en/vectors.txt.gz
coref.path.word2vec = /u/nlp/data/coref/wordvectors/en/vectors.txt.gz

#############################################################################
# mention detection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ coref.conll = true

## conll 2012
## train
coref.path.trainData = /u/scr/nlp/data/conll-2012/v4/data/train/data/english/annotations/
coref.path.trainData = /u/nlp/data/coref/conll-2012/v4/data/train/data/english/annotations/
#coref.path.traindata = /scr/nlp/data/conll-2012/v4/data/train+dev/

## eval
#coref.path.evaldata = /scr/nlp/data/conll-2012/v4/data/development/data/english/annotations/
coref.path.testData = /u/scr/nlp/data/conll-2012/v9/data/test/data/english/annotations
coref.path.testData = /u/nlp/data/coref/conll-2012/v9/data/test/data/english/annotations


## models
coref.path.serialized = /u/scr/nlp/data/coref/models/hybrid-conll/
coref.path.serialized = /u/nlp/data/coref/models/hybrid-conll/

## other data
coref.big.gender.number = edu/stanford/nlp/models/dcoref/gender.data.gz
coref.path.word2vec = /u/scr/nlp/data/coref/wordvectors/en/vectors.txt.gz
coref.path.word2vec = /u/nlp/data/coref/wordvectors/en/vectors.txt.gz

#############################################################################
# mention detection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ coref.sieves = SpeakerMatch, PreciseConstructs, pp-rf, cc-rf, pc-rf, ll-rf, pr-r

coref.useConstituencyParse = false
coref.conll = false
coref.path.trainData = /u/scr/nlp/data/conll-2012/v4/data/train/data/english/annotations/
coref.path.trainData = /u/nlp/data/coref/conll-2012/v4/data/train/data/english/annotations/

#############################################################################
# data & model path
Expand All @@ -18,7 +18,7 @@ coref.path.serialized = edu/stanford/nlp/models/hcoref/

## other data
coref.big.gender.number = edu/stanford/nlp/models/dcoref/gender.data.gz
coref.path.word2vec = /u/scr/nlp/data/coref/wordvectors/en/vectors.txt.gz
coref.path.word2vec = /u/nlp/data/coref/wordvectors/en/vectors.txt.gz
coref.path.word2vecSerialized = edu/stanford/nlp/models/word2vec/vectors.ser

#############################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ coref.path.trainData = /220/log-hcoref/forthesis/cleanup/small/train

## eval
#coref.path.evaldata = /scr/nlp/data/conll-2012/v4/data/development/data/english/annotations/
coref.path.evalData = /u/scr/nlp/data/conll-2012/v9/data/test/data/english/annotations
coref.path.evalData = /u/nlp/data/coref/conll-2012/v9/data/test/data/english/annotations
#coref.path.evaldata = /220/log-hcoref/forthesis/cleanup/small/eval


## scorer
coref.path.scorer.conll = /u/scr/nlp/data/conll-2012/scorer/v8.01/scorer.pl
coref.path.scorer.conll = /u/nlp/data/coref/conll-2012/scorer/v8.01/scorer.pl

## other data
coref.big.gender.number = edu/stanford/nlp/models/dcoref/gender.data.gz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ coref.path.trainData = /220/log-hcoref/forthesis/cleanup/small/train

## eval
#coref.path.evaldata = /scr/nlp/data/conll-2012/v4/data/development/data/english/annotations/
coref.path.testData = /u/scr/nlp/data/conll-2012/v9/data/test/data/english/annotations
coref.path.testData = /u/nlp/data/coref/conll-2012/v9/data/test/data/english/annotations
#coref.path.evaldata = /220/log-hcoref/forthesis/cleanup/small/eval


Expand All @@ -32,7 +32,7 @@ coref.path.serialized = /home/heeyoung/log-hcoref/ser/DIR/
coref.path.DIR=../forthesis/cleanup/ser/

## scorer
coref.path.scorer.conll = /u/scr/nlp/data/conll-2012/scorer/v8.01/scorer.pl
coref.path.scorer.conll = /u/nlp/data/coref/conll-2012/scorer/v8.01/scorer.pl

## other data
coref.big.gender.number = edu/stanford/nlp/models/dcoref/gender.data.gz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ annotators = segment, ssplit, pos, lemma, ner, parse, mention, coref
coref.algorithm = hybrid

# data paths
coref.data = /u/scr/nlp/data/conll-2012/
coref.conllOutputPath = /u/scr/nlp/coref/logs/
coref.scorer = /u/scr/nlp/data/conll-2012/scorer/v8.01/scorer.pl
coref.data = /u/nlp/data/coref/conll-2012/
coref.conllOutputPath = /u/nlp/data/coref/logs/
coref.scorer = /u/nlp/data/coref/conll-2012/scorer/v8.01/scorer.pl

# coref options
coref.sieves = ChineseHeadMatch, ExactStringMatch, PreciseConstructs, StrictHeadMatch1, StrictHeadMatch2, StrictHeadMatch3, StrictHeadMatch4, PronounMatch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ coref.addMissingAnnotations = true
coref.specialCaseNewswire = true

# Evaluation
coref.path.scorer.conll = /u/scr/nlp/data/conll-2012/scorer/v8.01/scorer.pl
coref.path.scorer.conll = /u/nlp/data/coref/conll-2012/scorer/v8.01/scorer.pl
#coref.path.output = /scr/nlp/coref/output/
coref.path.testData = /u/scr/nlp/data/conll-2012/v4/data/development/data/chinese/annotations/
coref.path.testData = /u/nlp/data/coref/conll-2012/v4/data/development/data/chinese/annotations/

# NER
ner.model = edu/stanford/nlp/models/ner/chinese.misc.distsim.crf.ser.gz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ coref.specialCaseNewswire = true
coref.input.type = conll

# Evaluation
coref.path.output = /u/scr/nlp/coref/output/
coref.data = /u/scr/nlp/data/conll-2012/
coref.inputPath = /u/scr/nlp/data/conll-2012/v4/data/development/data/chinese/annotations
coref.scorer = /u/scr/nlp/data/conll-2012/scorer/v8.01/scorer.pl
coref.path.output = /u/nlp/data/coref/output/
coref.data = /u/nlp/data/coref/conll-2012/
coref.inputPath = /u/nlp/data/coref/conll-2012/v4/data/development/data/chinese/annotations
coref.scorer = /u/nlp/data/coref/conll-2012/scorer/v8.01/scorer.pl

# NER
ner.model = edu/stanford/nlp/models/ner/chinese.misc.distsim.crf.ser.gz
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
coref.conll = true
coref.data = /u/scr/nlp/data/conll-2012/
coref.statistical.trainingPath = /u/scr/nlp/coref/training/
coref.data = /u/nlp/data/coref/conll-2012/
coref.statistical.trainingPath = /u/nlp/data/coref/training/
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
coref.conll = false
coref.data = /u/scr/nlp/data/conll-2012/
coref.statistical.trainingPath = /u/scr/nlp/coref/training/
coref.data = /u/nlp/data/coref/conll-2012/
coref.statistical.trainingPath = /u/nlp/data/coref/training/
2 changes: 1 addition & 1 deletion src/edu/stanford/nlp/dcoref/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected Constants() {} // static class but extended by jcoref
public static final boolean PRINT_CONLL_OUTPUT = false;

/** Default path for conll scorer script */
public static final String conllMentionEvalScript = "/u/scr/nlp/data/conll-2011/scorer/v4/scorer.pl";
public static final String conllMentionEvalScript = "/u/nlp/data/coref/conll-2012/scorer/v4/scorer.pl";

/** if true, skip coreference resolution. do mention detection only */
public static final boolean SKIP_COREF = false;
Expand Down

0 comments on commit 53a8f1b

Please sign in to comment.