{"record":{"id":"238793f7bfce1c5e","repo":"stanfordnlp/CoreNLP","slug":"no-architecture-specified-set-the-arch-flag-with","errorCode":null,"errorMessage":"No architecture specified; set the -arch flag with the features to be used","messagePattern":"No architecture specified; set the -arch flag with the features to be used","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/tagger/maxent/TaggerConfig.java","lineNumber":234,"sourceCode":"    this.setProperty(\"minFeatureThresh\", props.getProperty(\"minFeatureThresh\", this.getProperty(\"minFeatureThresh\")));\n    this.setProperty(\"curWordMinFeatureThresh\", props.getProperty(\"curWordMinFeatureThresh\", this.getProperty(\"curWordMinFeatureThresh\")));\n    this.setProperty(\"rareWordMinFeatureThresh\", props.getProperty(\"rareWordMinFeatureThresh\", this.getProperty(\"rareWordMinFeatureThresh\")));\n    this.setProperty(\"veryCommonWordThresh\", props.getProperty(\"veryCommonWordThresh\", this.getProperty(\"veryCommonWordThresh\")));\n    this.setProperty(\"occurringTagsOnly\", props.getProperty(\"occurringTagsOnly\", this.getProperty(\"occurringTagsOnly\", OCCURRING_TAGS_ONLY)));\n    this.setProperty(\"possibleTagsOnly\", props.getProperty(\"possibleTagsOnly\", this.getProperty(\"possibleTagsOnly\")));\n\n    this.setProperty(\"lang\", props.getProperty(\"lang\", this.getProperty(\"lang\")));\n\n    this.setProperty(\"openClassTags\", props.getProperty(\"openClassTags\", this.getProperty(\"openClassTags\")).trim());\n    this.setProperty(\"closedClassTags\", props.getProperty(\"closedClassTags\", this.getProperty(\"closedClassTags\")).trim());\n\n    this.setProperty(\"learnClosedClassTags\", props.getProperty(\"learnClosedClassTags\", this.getProperty(\"learnClosedClassTags\")));\n\n    this.setProperty(\"closedClassTagThreshold\", props.getProperty(\"closedClassTagThreshold\", this.getProperty(\"closedClassTagThreshold\")));\n\n    this.setProperty(\"arch\", props.getProperty(\"arch\", this.getProperty(\"arch\")));\n    if (this.getMode() == Mode.TRAIN && this.getProperty(\"arch\").isEmpty()) {\n      throw new IllegalArgumentException(\"No architecture specified; \" +\n                                         \"set the -arch flag with \" +\n                                         \"the features to be used\");\n    }\n\n    this.setProperty(\"wordFunction\", props.getProperty(\"wordFunction\", this.getProperty(\"wordFunction\", WORD_FUNCTION)));\n\n    this.setProperty(\"tokenize\", props.getProperty(\"tokenize\", this.getProperty(\"tokenize\")));\n    this.setProperty(\"tokenizerFactory\", props.getProperty(\"tokenizerFactory\", this.getProperty(\"tokenizerFactory\")));\n\n    this.setProperty(\"debugPrefix\", props.getProperty(\"debugPrefix\", this.getProperty(\"debugPrefix\", \"\")));\n    this.setProperty(\"debug\", props.getProperty(\"debug\", DEBUG));\n\n    this.setProperty(ENCODING_PROPERTY, props.getProperty(ENCODING_PROPERTY, this.getProperty(ENCODING_PROPERTY)));\n    this.setProperty(\"sgml\", props.getProperty(\"sgml\", this.getProperty(\"sgml\")));\n    this.setProperty(\"verbose\", props.getProperty(\"verbose\", this.getProperty(\"verbose\")));\n    this.setProperty(\"verboseResults\", props.getProperty(\"verboseResults\", this.getProperty(\"verboseResults\")));\n\n    this.setProperty(\"regL1\", props.getProperty(\"regL1\", this.getProperty(\"regL1\")));","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/tagger/maxent/TaggerConfig.java#L216-L252","documentation":"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.","triggerScenarios":"Thrown at src/edu/stanford/nlp/tagger/maxent/TaggerConfig.java:234 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a","analyzedAt":"2026-09-10T02:24:07.274Z","contentChangedAt":"2026-09-10T02:24:07.274Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}