<commit_before>gradle-karaf-plugin
===================

image:https://circleci.com/gh/lburgazzoli/gradle-karaf-plugin.svg?style=shield["CircleCI", link="https://circleci.com/gh/lburgazzoli/gradle-karaf-plugin"] image:https://maven-badges.herokuapp.com/maven-central/com.github.lburgazzoli/gradle-karaf-plugin/badge.svg[title="Maven Central", link="https://maven-badges.herokuapp.com/maven-central/com.github.lburgazzoli/gradle-karaf-plugin"] image:http://img.shields.io/:license-apache-brightgreen.svg[title="License", link="http://www.apache.org/licenses/LICENSE-2.0.html"]image:https://badges.gitter.im/lburgazzoli/gradle-karaf-plugin.svg[link="https://gitter.im/lburgazzoli/gradle-karaf-plugin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"]

== Features

- [x] Karaf features
- [x] Karaf KAR
- [ ] Karaf custom distribution
- [ ] Nice documentation

== Tasks
Automatically generate Karaf feature file in /build/karaf/features
[source,groovy]
----
gradle generateFeatures
----

Automatically generate Karaf kar file in /build/karaf/kar
[source,groovy]
----
gradle generateKar
----


== Description

The *gradle-karaf-plugin* is designed to automate the process of creating Apache Karaf *feature* and *kar* files.

This plugin generates the desired karaf files by utilizing the native gradle configurations mechanism. As gradle automatically determines all direct and transitive dependencies, a complete list of dependencies is provided to the plugin for a given set of configurations.

As OSGi can only install bundles, standard jars must be wrapped to add necessary manifest information specifying the jar's import and export packages. To simply this process Karaf provides a native wrap tool that can be run during jar/bundle installation. This plugin determines if each dependency is already a bundle and adds the _wrap_ tag if it is not (see example below).

== Notes
 - Considering that gradle automatically "promotes" dependency version conflicts, only a single version of a dependency is avalible per each gradle configuration. As OSGi bundles can mandate certain versions of dependencies, it is likely that multiple versions of a jar/bundle are needed. In this case, it is recommended to add another gradle configuration, perhaps "karaf", and specify the other dependency version under this new configuration. Include both configurations to the karaf->features->feature->configurations statement (see example below). This will result in both versions of the dependency being added to the feature/kar file.

 - Karaf 4 support requires the xsd version be at least '1.3.0'

 - This plugin is an extension of the previous https://github.com/lburgazzoli/gradle-karaf-features-plugin[gradle-karaf-feature-plugin^]

== Requirements
 - Gradle 3.0+

== Usage
[source,groovy]
----
apply plugin: 'com.github.lburgazzoli.karaf'

buildscript {
    dependencies {
        classpath "gradle.plugin.com.github.lburgazzoli:gradle-karaf-plugin:0.0.46"
    }
}

repositories {
    mavenCentral()
}
----

== Example

=== build.gradle

[source,groovy]
----
plugins {
    id 'maven'
    id 'java'
    id 'com.github.lburgazzoli.karaf' version '0.0.46'
}

repositories {
    mavenCentral()
}

group   = 'com.github.lburgazzoli'
version = '0.0.1'

configurations {
    commons
    json
    rest
    square
    hazelcast

    // This will avoid adding transitive dependencies
    ariesBlueprint {
        transitive = false
    }
}

dependencies {
    runtime 'com.google.guava:guava:19.0'
    commons 'commons-io:commons-io:2.4'

    json 'com.fasterxml.jackson.core:jackson-core:2.7.0'
    json 'com.fasterxml.jackson.core:jackson-databind:2.7.0'
    json 'com.fasterxml.jackson.core:jackson-annotations:2.7.0'

    square 'com.squareup.retrofit2:retrofit:2.0.0'

    ariesBlueprint 'org.apache.aries.blueprint:org.apache.aries.blueprint.api:1.0.1'
    ariesBlueprint 'org.apache.aries.blueprint:org.apache.aries.blueprint.cm:1.0.8'
    ariesBlueprint 'org.apache.aries.blueprint:org.apache.aries.blueprint.core.compatibility:1.0.0'
    ariesBlueprint 'org.apache.aries.blueprint:org.apache.aries.blueprint.core:1.6.0'
    ariesBlueprint 'org.apache.karaf.bundle:org.apache.karaf.bundle.blueprintstate:4.0.4'

    hazelcast 'org.apache.geronimo.specs:geronimo-jta_1.1_spec:1.1.1'
    hazelcast 'com.eclipsesource.minimal-json:minimal-json:0.9.2'
    hazelcast 'com.hazelcast:hazelcast-all:3.6.1'
}

karaf {
    features {
        // See section below for karaf 4 support if using 1.3.0
        xsdVersion  = '1.2.0'
        version     = '4.0.0' // Your project version
        description = 'Karaf features'

        // Include the current project, false by default
        includeProject = false

        // Add in extra repositories to the features xml file
        repository "mvn:org.apache.karaf.cellar/apache-karaf-cellar/4.0.0/xml/features"
        repository "mvn:org.apache.karaf.features/standard/4.0.0/xml/features"

        // Define a feature named 'common' with dependencies from runtime
        // configuration (default) and commons
        feature {
            name        = 'common'
            description = 'Common dependencies'

            // Include one or more additional configuration
            configuration 'commons'
        }

        // Define a feature named 'rest' with dependencies from json and square
        // configurations
        feature {
            name        = 'rest'
            description = 'REST dependencies'

            // Override configurations
            configurations 'json', 'square'
        }

        feature {
            name        = 'aries-blueprint'
            description = 'Aries Blueprint'

            // Override configurations
            configurations 'ariesBlueprint'

            // Add feature dependency (newest)
            feature 'aries-proxy'

            // Customize artifacts with group 'org.apache.aries.blueprint'
            bundle ('org.apache.aries.blueprint') {
                attribute 'start-level', '20'
            }

            // Customize artifacts with group 'org.apache.karaf.bundle'
            bundle ('org.apache.karaf.bundle') {
                attribute 'start-level', '30'
            }

            conditional('bundle') {
                bundle 'org.apache.karaf.bundle:org.apache.karaf.bundle.blueprintstate'
            }

            capability('osgi.service') {
                effective = 'active'
                extra     = 'objectClass=org.apache.aries.blueprint.services.ParserService'
            }

            capability('osgi.extender') {
                extra     = 'osgi.extender="osgi.blueprint";uses:="org.osgi.service.blueprint.container,org.osgi.service.blueprint.reflect";version:Version="1.0"'
            }
        }

        // Define a feature named 'hazelcast'
        feature {
            name        = 'hazelcast'
            description = 'In memory data grid'

            configurations 'hazelcast'

            // Add configFile entry
            configFile {
                filename = "/etc/hazelcast.xml"
                uri      = "mvn:org.apache.karaf.cellar/apache-karaf-cellar/${project.version}/xml/hazelcast"
            }

            // Add configFile entry and copy a local file to the kar repository
            configFile {
                filename = "/etc/hazelcast-clustered.xml"
                file     = file("etc/hazelcast-clustered-defaults.xml")
                uri      = "mvn:org.apache.karaf.cellar/apache-karaf-cellar/${project.version}/xml/hazelcast-clustered"
                override = true // (optional) Override existing configuration files within karaf. False by default
            }
        }
    }

    // Enable generation of Karaf Archive KAR based on features defined above.
    // To generate kar either use generateKar, assemble or install
    kar {
        // Optionally set the kar name, default is:
        //
        //     ${features.name}-${features.version}.kar
        //
        // Extension is automatically set to .kar
        archiveName = 'foo'
    }
}
----

=== Generated Result from "gradle generateFeatures"

[source,xml]
----
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="gradle-karaf-features-plugin-examples">
  <repository>mvn:org.apache.karaf.cellar/apache-karaf-cellar/4.0.0/xml/features</repository>
  <repository>mvn:org.apache.karaf.features/standard/4.0.0/xml/features</repository>
  <feature name="common" version="0.0.1" description="Common dependencies">
    <bundle>mvn:com.google.guava/guava/19.0</bundle>
    <bundle>mvn:commons-io/commons-io/2.4</bundle>
    <capability></capability>
  </feature>
  <feature name="rest" version="0.0.1" description="REST dependencies">
    <bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.7.0</bundle>
    <bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/2.7.0</bundle>
    <bundle>mvn:com.fasterxml.jackson.core/jackson-databind/2.7.0</bundle>
    <!--
        as squareup's jars a re not OSGi ready, the plugin automatically adds wrap instruction
    -->
    <bundle>wrap:mvn:com.squareup.okio/okio/1.6.0</bundle>
    <bundle>wrap:mvn:com.squareup.okhttp3/okhttp/3.2.0</bundle>
    <bundle>wrap:mvn:com.squareup.retrofit2/retrofit/2.0.0</bundle>
    <capability></capability>
  </feature>
  <feature name="aries-blueprint" version="0.0.1" description="Aries Blueprint">
    <feature>aries-proxy</feature>
    <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.api/1.0.1</bundle>
    <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.cm/1.0.8</bundle>
    <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core.compatibility/1.0.0</bundle>
    <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core/1.6.0</bundle>
    <conditional>
      <condition>bundle</condition>
      <bundle start-level="30">mvn:org.apache.karaf.bundle/org.apache.karaf.bundle.blueprintstate/4.0.4</bundle>
    </conditional>
    <capability>osgi.service;effective:='active';resolution:='mandatory';objectClass=org.apache.aries.blueprint.services.ParserService,osgi.extender;effective:='resolve';resolution:='mandatory';osgi.extender="osgi.blueprint";uses:="org.osgi.service.blueprint.container,org.osgi.service.blueprint.reflect";version:Version="1.0"</capability>
  </feature>
  <feature name="hazelcast" version="1.2.3" description="In memory data grid">
    <configfile filename="/etc/hazelcast.xml">mvn:org.apache.karaf.cellar/apache-karaf-cellar/1.2.3/xml/hazelcast</configfile>
    <configfile filename="/etc/hazelcast.xml">mvn:org.apache.karaf.cellar/apache-karaf-cellar/1.2.3/xml/hazelcast-clustered</configfile>
    <bundle>mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
    <bundle>mvn:com.eclipsesource.minimal-json/minimal-json/0.9.2</bundle>
    <bundle>mvn:com.hazelcast/hazelcast-all/3.6.1</bundle>
  </feature>
</features>
----

=== Karaf 4 Support


Karaf 4 features xsd v1.3.0 partially supported
[source,groovy]
----
<feature version="1.2.3" dependency="true">dependent-feature</feature>
----

To generate this stuff

1. Set xsdVersion to 1.3.0
2. Use dependency with configuration closure

[source,groovy]
----
karafFeatures {
  name = 'featuresName'
  xsdVersion = '1.3.0'
  outputFile = file("${project.buildDir}/karaf/features/${project.name}-feature.xml")
  features {
    mainFeature {
      name = 'main-feature-name'
      feature('dependent-feature') {
        dependency = true              //false by default
        version = "1.2.3"              //empty by default
      }
    }
  }
}
----

generated file `build/karaf/features/project1-feature.xml` will look like below

[source,groovy]
----

<features xmlns='http://karaf.apache.org/xmlns/features/v1.3.0' name='featuresName'>
  <feature name='main-feature-name' version='1.0.0'>
    <feature version="1.2.3" dependency="true">dependent-feature</feature>
  </feature>
</features>

----
<commit_msg>upgrade to latest plugin release 0.0.47<commit_after>gradle-karaf-plugin
===================

image:https://circleci.com/gh/lburgazzoli/gradle-karaf-plugin.svg?style=shield["CircleCI", link="https://circleci.com/gh/lburgazzoli/gradle-karaf-plugin"] image:https://maven-badges.herokuapp.com/maven-central/com.github.lburgazzoli/gradle-karaf-plugin/badge.svg[title="Maven Central", link="https://maven-badges.herokuapp.com/maven-central/com.github.lburgazzoli/gradle-karaf-plugin"] image:http://img.shields.io/:license-apache-brightgreen.svg[title="License", link="http://www.apache.org/licenses/LICENSE-2.0.html"]image:https://badges.gitter.im/lburgazzoli/gradle-karaf-plugin.svg[link="https://gitter.im/lburgazzoli/gradle-karaf-plugin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"]

== Features

- [x] Karaf features
- [x] Karaf KAR
- [ ] Karaf custom distribution
- [ ] Nice documentation

== Tasks
Automatically generate Karaf feature file in /build/karaf/features
[source,groovy]
----
gradle generateFeatures
----

Automatically generate Karaf kar file in /build/karaf/kar
[source,groovy]
----
gradle generateKar
----


== Description

The *gradle-karaf-plugin* is designed to automate the process of creating Apache Karaf *feature* and *kar* files.

This plugin generates the desired karaf files by utilizing the native gradle configurations mechanism. As gradle automatically determines all direct and transitive dependencies, a complete list of dependencies is provided to the plugin for a given set of configurations.

As OSGi can only install bundles, standard jars must be wrapped to add necessary manifest information specifying the jar's import and export packages. To simply this process Karaf provides a native wrap tool that can be run during jar/bundle installation. This plugin determines if each dependency is already a bundle and adds the _wrap_ tag if it is not (see example below).

== Notes
 - Considering that gradle automatically "promotes" dependency version conflicts, only a single version of a dependency is avalible per each gradle configuration. As OSGi bundles can mandate certain versions of dependencies, it is likely that multiple versions of a jar/bundle are needed. In this case, it is recommended to add another gradle configuration, perhaps "karaf", and specify the other dependency version under this new configuration. Include both configurations to the karaf->features->feature->configurations statement (see example below). This will result in both versions of the dependency being added to the feature/kar file.

 - Karaf 4 support requires the xsd version be at least '1.3.0'.

 - This plugin is an extension of the previous https://github.com/lburgazzoli/gradle-karaf-features-plugin[gradle-karaf-feature-plugin^]

== Requirements
 - Gradle 3.0+

== Usage
[source,groovy]
----
apply plugin: 'com.github.lburgazzoli.karaf'

buildscript {
    dependencies {
        classpath "gradle.plugin.com.github.lburgazzoli:gradle-karaf-plugin:0.0.47"
    }
}

repositories {
    mavenCentral()
}
----

== Example

=== build.gradle

[source,groovy]
----
plugins {
    id 'maven'
    id 'java'
    id 'com.github.lburgazzoli.karaf' version '0.0.47'
}

repositories {
    mavenCentral()
}

group   = 'com.github.lburgazzoli'
version = '0.0.1'

configurations {
    commons
    json
    rest
    square
    hazelcast

    // This will avoid adding transitive dependencies
    ariesBlueprint {
        transitive = false
    }
}

dependencies {
    runtime 'com.google.guava:guava:19.0'
    commons 'commons-io:commons-io:2.4'

    json 'com.fasterxml.jackson.core:jackson-core:2.7.0'
    json 'com.fasterxml.jackson.core:jackson-databind:2.7.0'
    json 'com.fasterxml.jackson.core:jackson-annotations:2.7.0'

    square 'com.squareup.retrofit2:retrofit:2.0.0'

    ariesBlueprint 'org.apache.aries.blueprint:org.apache.aries.blueprint.api:1.0.1'
    ariesBlueprint 'org.apache.aries.blueprint:org.apache.aries.blueprint.cm:1.0.8'
    ariesBlueprint 'org.apache.aries.blueprint:org.apache.aries.blueprint.core.compatibility:1.0.0'
    ariesBlueprint 'org.apache.aries.blueprint:org.apache.aries.blueprint.core:1.6.0'
    ariesBlueprint 'org.apache.karaf.bundle:org.apache.karaf.bundle.blueprintstate:4.0.4'

    hazelcast 'org.apache.geronimo.specs:geronimo-jta_1.1_spec:1.1.1'
    hazelcast 'com.eclipsesource.minimal-json:minimal-json:0.9.2'
    hazelcast 'com.hazelcast:hazelcast-all:3.6.1'
}

karaf {
    features {
        // See section below for karaf 4 support if using 1.3.0
        xsdVersion  = '1.2.0'
        version     = '4.0.0' // Your project version
        description = 'Karaf features'

        // Include the current project, false by default
        includeProject = false

        // Add in extra repositories to the features xml file
        repository "mvn:org.apache.karaf.cellar/apache-karaf-cellar/4.0.0/xml/features"
        repository "mvn:org.apache.karaf.features/standard/4.0.0/xml/features"

        // Define a feature named 'common' with dependencies from runtime
        // configuration (default) and commons
        feature {
            name        = 'common'
            description = 'Common dependencies'

            // Include one or more additional configuration
            configuration 'commons'
        }

        // Define a feature named 'rest' with dependencies from json and square
        // configurations
        feature {
            name        = 'rest'
            description = 'REST dependencies'

            // Override configurations
            configurations 'json', 'square'
        }

        feature {
            name        = 'aries-blueprint'
            description = 'Aries Blueprint'

            // Override configurations
            configurations 'ariesBlueprint'

            // Add feature dependency (newest)
            feature 'aries-proxy'

            // Customize artifacts with group 'org.apache.aries.blueprint'
            bundle ('org.apache.aries.blueprint') {
                attribute 'start-level', '20'
            }

            // Customize artifacts with group 'org.apache.karaf.bundle'
            bundle ('org.apache.karaf.bundle') {
                attribute 'start-level', '30'
            }

            conditional('bundle') {
                bundle 'org.apache.karaf.bundle:org.apache.karaf.bundle.blueprintstate'
            }

            capability('osgi.service') {
                effective = 'active'
                extra     = 'objectClass=org.apache.aries.blueprint.services.ParserService'
            }

            capability('osgi.extender') {
                extra     = 'osgi.extender="osgi.blueprint";uses:="org.osgi.service.blueprint.container,org.osgi.service.blueprint.reflect";version:Version="1.0"'
            }
        }

        // Define a feature named 'hazelcast'
        feature {
            name        = 'hazelcast'
            description = 'In memory data grid'

            configurations 'hazelcast'

            // Add configFile entry
            configFile {
                filename = "/etc/hazelcast.xml"
                uri      = "mvn:org.apache.karaf.cellar/apache-karaf-cellar/${project.version}/xml/hazelcast"
            }

            // Add configFile entry and copy a local file to the kar repository
            configFile {
                filename = "/etc/hazelcast-clustered.xml"
                file     = file("etc/hazelcast-clustered-defaults.xml")
                uri      = "mvn:org.apache.karaf.cellar/apache-karaf-cellar/${project.version}/xml/hazelcast-clustered"
                override = true // (optional) Override existing configuration files within karaf. False by default
            }
        }
    }

    // Enable generation of Karaf Archive KAR based on features defined above.
    // To generate kar either use generateKar, assemble or install
    kar {
        // Optionally set the kar name, default is:
        //
        //     ${features.name}-${features.version}.kar
        //
        // Extension is automatically set to .kar
        archiveName = 'foo'
    }
}
----

=== Generated Result from "gradle generateFeatures"

[source,xml]
----
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="gradle-karaf-features-plugin-examples">
  <repository>mvn:org.apache.karaf.cellar/apache-karaf-cellar/4.0.0/xml/features</repository>
  <repository>mvn:org.apache.karaf.features/standard/4.0.0/xml/features</repository>
  <feature name="common" version="0.0.1" description="Common dependencies">
    <bundle>mvn:com.google.guava/guava/19.0</bundle>
    <bundle>mvn:commons-io/commons-io/2.4</bundle>
    <capability></capability>
  </feature>
  <feature name="rest" version="0.0.1" description="REST dependencies">
    <bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.7.0</bundle>
    <bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/2.7.0</bundle>
    <bundle>mvn:com.fasterxml.jackson.core/jackson-databind/2.7.0</bundle>
    <!--
        as squareup's jars a re not OSGi ready, the plugin automatically adds wrap instruction
    -->
    <bundle>wrap:mvn:com.squareup.okio/okio/1.6.0</bundle>
    <bundle>wrap:mvn:com.squareup.okhttp3/okhttp/3.2.0</bundle>
    <bundle>wrap:mvn:com.squareup.retrofit2/retrofit/2.0.0</bundle>
    <capability></capability>
  </feature>
  <feature name="aries-blueprint" version="0.0.1" description="Aries Blueprint">
    <feature>aries-proxy</feature>
    <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.api/1.0.1</bundle>
    <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.cm/1.0.8</bundle>
    <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core.compatibility/1.0.0</bundle>
    <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core/1.6.0</bundle>
    <conditional>
      <condition>bundle</condition>
      <bundle start-level="30">mvn:org.apache.karaf.bundle/org.apache.karaf.bundle.blueprintstate/4.0.4</bundle>
    </conditional>
    <capability>osgi.service;effective:='active';resolution:='mandatory';objectClass=org.apache.aries.blueprint.services.ParserService,osgi.extender;effective:='resolve';resolution:='mandatory';osgi.extender="osgi.blueprint";uses:="org.osgi.service.blueprint.container,org.osgi.service.blueprint.reflect";version:Version="1.0"</capability>
  </feature>
  <feature name="hazelcast" version="1.2.3" description="In memory data grid">
    <configfile filename="/etc/hazelcast.xml">mvn:org.apache.karaf.cellar/apache-karaf-cellar/1.2.3/xml/hazelcast</configfile>
    <configfile filename="/etc/hazelcast.xml">mvn:org.apache.karaf.cellar/apache-karaf-cellar/1.2.3/xml/hazelcast-clustered</configfile>
    <bundle>mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
    <bundle>mvn:com.eclipsesource.minimal-json/minimal-json/0.9.2</bundle>
    <bundle>mvn:com.hazelcast/hazelcast-all/3.6.1</bundle>
  </feature>
</features>
----

=== Karaf 4 Support


Karaf 4 features xsd v1.3.0 partially supported
[source,groovy]
----
<feature version="1.2.3" dependency="true">dependent-feature</feature>
----

To generate this stuff

1. Set xsdVersion to 1.3.0
2. Use dependency with configuration closure

[source,groovy]
----
karafFeatures {
  name = 'featuresName'
  xsdVersion = '1.3.0'
  outputFile = file("${project.buildDir}/karaf/features/${project.name}-feature.xml")
  features {
    mainFeature {
      name = 'main-feature-name'
      feature('dependent-feature') {
        dependency = true              //false by default
        version = "1.2.3"              //empty by default
      }
    }
  }
}
----

generated file `build/karaf/features/project1-feature.xml` will look like below

[source,groovy]
----

<features xmlns='http://karaf.apache.org/xmlns/features/v1.3.0' name='featuresName'>
  <feature name='main-feature-name' version='1.0.0'>
    <feature version="1.2.3" dependency="true">dependent-feature</feature>
  </feature>
</features>

----

{'fraction_non_alphanumeric': 0.13075491209927612, 'fraction_numerical': 0.017290589451913134, 'mean_word_length': 3.0139465382699653, 'pattern_counts': {'":': 0, '<': 147, '<?xml version=': 2, '>': 153, 'https://': 14, 'lorem ipsum': 0, 'www.': 2, 'xml': 56}, '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': '3333889', 'n_tokens_mistral': 7795, 'n_tokens_neox': 7441, 'n_words': 1477}