stanfordnlp/CoreNLP · error
Error: No dest file provided in properties or via command…
Error message
Error: No dest file provided in properties or via command line --multiWordRulesFile
What it means
BuildMultiWordRules.main requires an output destination for the inferred multi-word rules, taken from the 'multiWordRulesFile' property. If it is null after parsing args, the tool logs this error and exits without computing anything. It guards against inferring rules that could never be persisted.
Solutions
- Add -multiWordRulesFile path/to/output.txt to the command line.
- Ensure exact spelling/casing of the multiWordRulesFile flag.
- Verify the destination directory exists and is writable to avoid a later write failure.
- If a properties file is used instead, add multiWordRulesFile=<path> to it.
Example fix
// before java -cp ... BuildMultiWordRules -trainFile train.conllu // after java -cp ... BuildMultiWordRules -trainFile train.conllu -multiWordRulesFile mw-rules.txt
Defensive patterns
Strategy: validation
Validate before calling
Properties p = StringUtils.argsToProperties(args);
if (p.getProperty("multiWordRulesFile") == null) {
throw new IllegalArgumentException("-multiWordRulesFile <output> is required");
} Prevention
- Use a canonical script with all required flags in one place.
- Copy example commands verbatim rather than trimming flags.
- Pre-create the output directory before invoking.
When it happens
Trigger: Running BuildMultiWordRules with -trainFile supplied but no -multiWordRulesFile <path>, so properties.getProperty("multiWordRulesFile") returns null.
Common situations: Assuming rules print to stdout by default; misspelling the flag (e.g. -multiwordRulesFile); copying only the trainFile flag from an example command.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Error: No training file provided in properties or via…
- Error: No training file provided in properties or via…
- Error: -train option must have treebankPath as first…
- -labels is required
- Must specify input with -input
AI-assisted analysis of stanfordnlp/CoreNLP@1b7edd19c4 (2026-09-10).
Data as JSON: /api/errors/2a5dcb8e513e7468.
Report an issue: GitHub.
Appendix: source
Thrown at src/edu/stanford/nlp/process/stattok/BuildMultiWordRules.java:31
public class BuildMultiWordRules {
private static final Redwood.RedwoodChannels logger = Redwood.channels(StatTokSentTrainer.class);
// disallow making this class
private BuildMultiWordRules() {}
public static void main(String[] args) throws IOException {
Properties properties = StringUtils.argsToProperties(args);
String trainFile = properties.getProperty("trainFile", null);
String multiWordRulesFile = properties.getProperty("multiWordRulesFile", null);
if (trainFile == null){
logger.err("Error: No training file provided in properties or via command line --trainFile");
return;
}
if (multiWordRulesFile == null){
logger.err("Error: No dest file provided in properties or via command line --multiWordRulesFile");
return;
}
Map<String, String[]> rules = StatTokSentTrainer.inferMultiWordRules(trainFile);
StatTokSentTrainer.writeMultiWordRules(multiWordRulesFile, rules);
}
}View on GitHub (pinned to 1b7edd19c4)