switch (mode)
{
case NLPMode.MODE_POS : return new POSDecoder();
case NLPMode.MODE_MORPH: return new MorphDecoder();
case NLPMode.MODE_DEP : return new DEPDecoder();
case NLPMode.MODE_SRL : return new SRLDecoder();
}
throw new IllegalArgumentException("The requested mode '"+mode+"' is not supported.");
}