public function __construct($modelFilename, Cache $cache)
{
$this->modelFilename = $modelFilename;
$this->cache = $cache;
$data = $this->cache->get($modelFilename);
if ($data !== null && file_exists($this->modelFilename)) {
$this->model = new \SVMModel();
$this->model->load($this->modelFilename);
$this->categoryMap = $data['categoryMap'];
$this->tokenMap = $data['tokenMap'];
$this->prepared = true;
}
}