public function getVersion()
    {
        $code = $this->runShell('tika --version', $stdout);

        // Parse output
        if (!$code && preg_match('/Apache Tika (?<version>[\.\d]+)/', $stdout, $matches)) {
            return $matches['version'];
        }

        return 0;
    }