{"record":{"id":"92fbbd0932bf4c94","repo":"stanfordnlp/CoreNLP","slug":"no-sieve-type-specified","errorCode":null,"errorMessage":"no sieve type specified","messagePattern":"no sieve type specified","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/coref/hybrid/sieve/Sieve.java","lineNumber":130,"sourceCode":"        DeterministicCorefSieve sieve = (DeterministicCorefSieve) Class.forName(\"edu.stanford.nlp.coref.hybrid.sieve.\"+sievename).getConstructor().newInstance();\n        sieve.props = props;\n        sieve.lang = HybridCorefProperties.getLanguage(props);\n        return sieve;\n\n      case RF:\n        log.info(\"Loading sieve: \" + sievename + \" from \" + HybridCorefProperties.getPathModel(props, sievename) + \" ... \");\n        RFSieve rfsieve = IOUtils.readObjectFromURLOrClasspathOrFileSystem(HybridCorefProperties.getPathModel(props, sievename));\n        rfsieve.thresMerge = HybridCorefProperties.getMergeThreshold(props, sievename);\n        log.info(\"done. Merging threshold: \" + rfsieve.thresMerge);\n        return rfsieve;\n\n      case ORACLE:\n        OracleSieve oracleSieve = new OracleSieve(props, sievename);\n        oracleSieve.props = props;\n        return oracleSieve;\n\n      default:\n        throw new RuntimeException(\"no sieve type specified\");\n    }\n  }\n\n\n  public static List<Sieve> loadSieves(Properties props) throws Exception {\n    List<Sieve> sieves = new ArrayList<>();\n    String sieveProp = HybridCorefProperties.getSieves(props);\n    String currentSieveForTrain = HybridCorefProperties.getCurrentSieveForTrain(props);\n    String[] sievenames = (currentSieveForTrain==null)?\n        sieveProp.trim().split(\",\\\\s*\") : sieveProp.split(currentSieveForTrain)[0].trim().split(\",\\\\s*\");\n    for(String sievename : sievenames) {\n      Sieve sieve = loadSieve(props, sievename);\n      sieves.add(sieve);\n    }\n    return sieves;\n  }\n\n  public static boolean hasThat(List<CoreLabel> words) {","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/coref/hybrid/sieve/Sieve.java#L112-L148","documentation":"Sieve.loadSieve switches on the sieve type parsed from the sieves property string. The switch's default branch throws RuntimeException(\"no sieve type specified\") when the name does not match any known sieve type enum, meaning the configured sieve name is unrecognized or empty.","triggerScenarios":"Setting the hybrid coref sieves property (e.g. coref.md.sieves or sieves list) to a sieve name that maps to no known SieveType — misspelled names like \"exat\" instead of \"exact\", an empty string, or a sieve name removed in a newer/older CoreNLP version.","commonSituations":"Copying sieve strings from old tutorials/blogs into a new CoreNLP version where sieve names changed; typos or wrong case in the sieves list; leaving the property empty so the parsed type is blank.","solutions":["Check the sieves property against the valid SieveType enum values in the current CoreNLP version","Fix typos/case in the sieve names, e.g. use \"exact\"/\"strict\"/\"head\" style names as documented","Remove unknown sieve names from the comma-separated list and rerun","If the name existed in an older version, consult the changelog for renamed sieves"],"exampleFix":"// before\nprops.setProperty(\"coref.sieves\", \"exact, exat, pronoun\"); // typo\n// after\nprops.setProperty(\"coref.sieves\", \"exact, strict, pronoun\");","handlingStrategy":"validation","validationCode":"Set<String> valid = Set.of(\"exact\",\"strict\",\"head\",\"pronoun\",\"discordant\",\"speaker\",\"documentproxy\"); // match current SieveType enum\nfor (String s : props.getProperty(\"coref.sieves\",\"\").split(\",\")) { String n = s.trim(); if (!n.isEmpty() && !valid.contains(n.toLowerCase())) throw new IllegalStateException(\"Unknown sieve: \" + n); }","typeGuard":null,"tryCatchPattern":"try { sieves = Sieve.loadSieves(props); } catch (RuntimeException e) { if (e.getMessage().contains(\"no sieve type specified\")) { throw new IllegalArgumentException(\"Bad coref.sieves value: \" + props.getProperty(\"coref.sieves\"), e); } throw e; }","preventionTips":["Copy sieve lists from the official demo configs, not old blog posts","Trim and lowercase sieve names before use","Keep sieve names in a shared constant file","Validate the sieves property at config load time"],"tags":["java","configuration","sieve","invalid-name"],"backgroundTag":"invalid-enum-value","analyzedSha":"1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a","analyzedAt":"2026-09-10T02:24:07.274Z","contentChangedAt":"2026-09-10T02:24:07.274Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}