<commit_before><?php

/*
 * This file is part of tabulapdf-php-wrapper
 *
 * (c) https://github.com/davincho/tabulapdf-php-wrapper
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Davincho\Tabula;

use Symfony\Component\Process\Exception\InvalidArgumentException;
use Symfony\Component\Process\Exception\RuntimeException;
use Symfony\Component\Process\ExecutableFinder;
use Symfony\Component\Process\ProcessBuilder;

class Tabula
{
    /**
     * File to be converted (should be a PDF)
     * @var
     */
    private $file = null;

    /**
     * Path to jar file
     */
    private $jarArchive = __DIR__ . './../../../lib/tabula-extractor-0.7.4-SNAPSHOT-jar-with-dependencies.jar';

    /**
     * Converter constructor.
     * @param null $file
     */
    public function __construct($file = null)
    {
        $this->file = $file;
    }

    /**
     * @return mixed
     */
    public function getFile()
    {
        return $this->file;
    }

    /**
     * @param mixed $file
     */
    public function setFile($file)
    {
        $this->file = $file;
    }

    public function parse($parameters = [], $file = null) {
        $inputFile = $file !== null ? $file : $this->file;
        $parameters = is_array($parameters) ? $parameters : [$parameters];
<commit_msg>Fix unncessary path to current dir<commit_after><?php

/*
 * This file is part of tabulapdf-php-wrapper
 *
 * (c) https://github.com/davincho/tabulapdf-php-wrapper
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Davincho\Tabula;

use Symfony\Component\Process\Exception\InvalidArgumentException;
use Symfony\Component\Process\Exception\RuntimeException;
use Symfony\Component\Process\ExecutableFinder;
use Symfony\Component\Process\ProcessBuilder;

class Tabula
{
    /**
     * File to be converted (should be a PDF)
     * @var
     */
    private $file = null;

    /**
     * Path to jar file
     */
    private $jarArchive = __DIR__ . '/../../../lib/tabula-extractor-0.7.4-SNAPSHOT-jar-with-dependencies.jar';

    /**
     * Converter constructor.
     * @param null $file
     */
    public function __construct($file = null)
    {
        $this->file = $file;
    }

    /**
     * @return mixed
     */
    public function getFile()
    {
        return $this->file;
    }

    /**
     * @param mixed $file
     */
    public function setFile($file)
    {
        $this->file = $file;
    }

    public function parse($parameters = [], $file = null) {
        $inputFile = $file !== null ? $file : $this->file;
        $parameters = is_array($parameters) ? $parameters : [$parameters];

{'fraction_non_alphanumeric': 0.1347543352601156, 'fraction_numerical': 0.002167630057803468, 'mean_word_length': 2.4655819774718397, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1053987', 'n_tokens_mistral': 851, 'n_tokens_neox': 836, 'n_words': 205}