<commit_before>FunstaffTikaBundle: Wrapper for tika
====================================

This bundle work with [Apache Tika](http://tika.apache.org/).


Bundle Under development


Configuration
-------------
File config.yml

    funstaff_tika:
        tika_path:      /path/to/tika-app-1.0.jar
        output_format:  ~
        logging:        ~  # Use the Symfony2 default. Force the logging with this param.


Examples
--------
Extract document with text output:

    $tika = $this->get('funstaff.tika')
            ->setOutputFormat('text')
            ->addDocument('foo', '/path/to/foo')
            ->extractContent();

    foreach ($tika->getDocuments() as $document) {
        $content = $document->getContent();
        $metadata = $document->getMetadata();
        $author = $metadata->get('Author');
    }

<commit_msg>Add default info on output_format<commit_after>FunstaffTikaBundle: Wrapper for tika
====================================

This bundle work with [Apache Tika](http://tika.apache.org/).


Bundle Under development


Configuration
-------------
File config.yml

    funstaff_tika:
        tika_path:      /path/to/tika-app-1.0.jar
        output_format:  ~  # default: xml
        logging:        ~  # Use the Symfony2 default. Force the logging with this param.


Examples
--------
Extract document with text output:

    $tika = $this->get('funstaff.tika')
            ->setOutputFormat('text')
            ->addDocument('foo', '/path/to/foo')
            ->extractContent();

    foreach ($tika->getDocuments() as $document) {
        $content = $document->getContent();
        $metadata = $document->getMetadata();
        $author = $metadata->get('Author');
    }


{'fraction_non_alphanumeric': 0.18845700824499412, 'fraction_numerical': 0.0035335689045936395, 'mean_word_length': 2.48870636550308, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '695846', 'n_tokens_mistral': 498, 'n_tokens_neox': 478, 'n_words': 112}