Skip to content

Commit 6f6eb93

Browse files
committedNov 27, 2024
Need to cache tokenize annotators based on the segment properties as well
1 parent 9732f82 commit 6f6eb93

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎src/edu/stanford/nlp/util/PropertiesUtils.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,9 @@ public static String getSignature(String name, Properties properties, Property[]
429429
public static String getSignature(String name, Properties properties) {
430430
String[] prefixes = new String[]{(name != null && !name.isEmpty())? name + '.' : ""};
431431
// TODO(gabor) This is a hack, as tokenize and ssplit depend on each other so heavily
432-
if ("tokenize".equals(name) || "ssplit".equals(name)) {
433-
prefixes = new String[]{"tokenize", "ssplit"};
432+
// the tokenize annotator also uses segment properties to determine which model to use, etc
433+
if ("tokenize".equals(name) || "ssplit".equals(name) || "segment".equals(name)) {
434+
prefixes = new String[]{"tokenize", "ssplit", "segment"};
434435
}
435436
// TODO [chris 2017]: Another hack. Traditionally, we have called the cleanxml properties clean!
436437
if ("clean".equals(name) || "cleanxml".equals(name)) {

0 commit comments

Comments
 (0)