stanfordnlp/CoreNLP · error · IllegalArgumentException
No architecture specified; set the -arch flag with the…
Error message
No architecture specified; set the -arch flag with the features to be used
What it means
Validation error from TaggerConfig when training a tagger with no 'arch' property set; the feature architecture string (which feature generators to use) must be specified or no features can be extracted.
Solutions
- Provide -arch with a feature architecture string (e.g., words,-,tags) or use a known template like left3words
- Copy the arch setting from a documented training config
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/edu/stanford/nlp/tagger/maxent/TaggerConfig.java:234 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of stanfordnlp/CoreNLP@1b7edd19c4 (2026-09-10).
Data as JSON: /api/errors/238793f7bfce1c5e.
Report an issue: GitHub.
Appendix: source
Thrown at src/edu/stanford/nlp/tagger/maxent/TaggerConfig.java:234
this.setProperty("minFeatureThresh", props.getProperty("minFeatureThresh", this.getProperty("minFeatureThresh")));
this.setProperty("curWordMinFeatureThresh", props.getProperty("curWordMinFeatureThresh", this.getProperty("curWordMinFeatureThresh")));
this.setProperty("rareWordMinFeatureThresh", props.getProperty("rareWordMinFeatureThresh", this.getProperty("rareWordMinFeatureThresh")));
this.setProperty("veryCommonWordThresh", props.getProperty("veryCommonWordThresh", this.getProperty("veryCommonWordThresh")));
this.setProperty("occurringTagsOnly", props.getProperty("occurringTagsOnly", this.getProperty("occurringTagsOnly", OCCURRING_TAGS_ONLY)));
this.setProperty("possibleTagsOnly", props.getProperty("possibleTagsOnly", this.getProperty("possibleTagsOnly")));
this.setProperty("lang", props.getProperty("lang", this.getProperty("lang")));
this.setProperty("openClassTags", props.getProperty("openClassTags", this.getProperty("openClassTags")).trim());
this.setProperty("closedClassTags", props.getProperty("closedClassTags", this.getProperty("closedClassTags")).trim());
this.setProperty("learnClosedClassTags", props.getProperty("learnClosedClassTags", this.getProperty("learnClosedClassTags")));
this.setProperty("closedClassTagThreshold", props.getProperty("closedClassTagThreshold", this.getProperty("closedClassTagThreshold")));
this.setProperty("arch", props.getProperty("arch", this.getProperty("arch")));
if (this.getMode() == Mode.TRAIN && this.getProperty("arch").isEmpty()) {
throw new IllegalArgumentException("No architecture specified; " +
"set the -arch flag with " +
"the features to be used");
}
this.setProperty("wordFunction", props.getProperty("wordFunction", this.getProperty("wordFunction", WORD_FUNCTION)));
this.setProperty("tokenize", props.getProperty("tokenize", this.getProperty("tokenize")));
this.setProperty("tokenizerFactory", props.getProperty("tokenizerFactory", this.getProperty("tokenizerFactory")));
this.setProperty("debugPrefix", props.getProperty("debugPrefix", this.getProperty("debugPrefix", "")));
this.setProperty("debug", props.getProperty("debug", DEBUG));
this.setProperty(ENCODING_PROPERTY, props.getProperty(ENCODING_PROPERTY, this.getProperty(ENCODING_PROPERTY)));
this.setProperty("sgml", props.getProperty("sgml", this.getProperty("sgml")));
this.setProperty("verbose", props.getProperty("verbose", this.getProperty("verbose")));
this.setProperty("verboseResults", props.getProperty("verboseResults", this.getProperty("verboseResults")));
this.setProperty("regL1", props.getProperty("regL1", this.getProperty("regL1")));View on GitHub (pinned to 1b7edd19c4)