<commit_before><?php

namespace aymanrb\UnstructuredTextParser;

use DirectoryIterator;
use Monolog\Handler\StreamHandler;
use Monolog\Logger;
use Psr\Log\LoggerAwareTrait;

class TextParser
{
    use LoggerAwareTrait;
    /** @var DirectoryIterator; Templates Directory Iterator */
    protected $directoryIterator;




    /**
     * @param string $templatesDir ; The path to the template files directory
     */
    public function __construct($templatesDir, LoggerInterface $logger = null)
    {
        if(empty($logger)) {
            $this->logger = new Logger('text-parser');
            $this->logger->pushHandler(new StreamHandler('logs/text-parser.log', Logger::DEBUG));<commit_msg>adding missed import for LoggerInterface<commit_after><?php

namespace aymanrb\UnstructuredTextParser;

use DirectoryIterator;
use Monolog\Handler\StreamHandler;
use Monolog\Logger;
use Psr\Log\LoggerAwareTrait;
use Psr\Log\LoggerInterface;

class TextParser
{
    use LoggerAwareTrait;
    /** @var DirectoryIterator; Templates Directory Iterator */
    protected $directoryIterator;




    /**
     * @param string $templatesDir ; The path to the template files directory
     */
    public function __construct($templatesDir, LoggerInterface $logger = null)
    {
        if(empty($logger)) {
            $this->logger = new Logger('text-parser');
            $this->logger->pushHandler(new StreamHandler('logs/text-parser.log', Logger::DEBUG));
{'fraction_non_alphanumeric': 0.108876560332871, 'fraction_numerical': 0.0, 'mean_word_length': 3.8260869565217392, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, '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': '2312907', 'n_tokens_mistral': 404, 'n_tokens_neox': 389, 'n_words': 95}