stanfordnlp/CoreNLP · error · RuntimeIOException
Couldn't load word vectors
Error message
Couldn't load word vectors
What it means
Thrown in ColumnDataClassifier.loadWordVectors when the word-vector file given via -wordVector cannot be opened or parsed (unreadable path, wrong format, or missing file). It signals that pretrained embedding initialization cannot proceed.
Solutions
- Verify the word vector file path is correct and the file exists and is readable
- Use a supported vector format (e.g., GloVe text format with word followed by floats)
- Check the classpath/working directory if using a relative path
- Download the intended embedding file if it is missing
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/edu/stanford/nlp/classify/ColumnDataClassifier.java:1561 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/a1ae4193fc9d9721.
Report an issue: GitHub.
Appendix: source
Thrown at src/edu/stanford/nlp/classify/ColumnDataClassifier.java:1561
for (String line; (line = br.readLine()) != null; ) {
String[] fields = line.split("\\s+");
if (numDimensions < 0) {
numDimensions = fields.length - 1;
} else {
if (numDimensions != fields.length -1 && ! warned) {
logger.info("loadWordVectors: Inconsistent vector size: " + numDimensions +
" vs. " + (fields.length - 1));
warned = true;
}
}
float[] vector = new float[fields.length - 1];
for (int i = 1; i < fields.length; i++) {
vector[i-1] = Float.parseFloat(fields[i]);
}
map.put(fields[0], vector);
}
} catch (IOException ioe) {
throw new RuntimeIOException("Couldn't load word vectors", ioe);
}
timing.done("Loading word vectors from " + filename + " ... ");
return map;
}
/**
* Initialize using values in Properties file.
*
* @param props Properties, with the special format of column.flag used in ColumnDataClassifier
* @return An array of flags for each data column, with additional global flags in element [0]
*/
private static Pair<Flags[], Classifier<String,String>> setProperties(Properties props) {
Flags[] myFlags;
Classifier<String,String> classifier = null;
boolean myUsesRealValues = false;
Pattern prefix;View on GitHub (pinned to 1b7edd19c4)