Legal knowledge acquisition using case reasoning and model inference