<commit_before>== Getting Started

:releaseVersion: {springfox-released-version}
:snapshotVersion: {springfox-current-version}
:springfoxRfc6570Version: {springfox-swagger-ui-rfc6570-version}

=== Dependencies
The Springfox libraries are hosted on https://bintray.com/springfox/maven-repo/springfox/view[bintray] and jcenter.
The artifacts can be viewed accessed at the following locations:

* Release:
   ** https://jcenter.bintray.com/io/springfox/
   ** http://jcenter.bintray.com/io/springfox/
* Snapshot
 ** http://oss.jfrog.org/simple/oss-snapshot-local/io/springfox/
 ** http://oss.jfrog.org/oss-snapshot-local/io/springfox/

Springfox has multiple modules and the dependencies will vary depending on the desired API specification standard.
Below outlines how to include the springfox-swagger2 module which produces Swagger 2.0 API documentation.


==== Gradle
===== Release
[source,groovy]
[subs="verbatim,attributes"]
----
repositories {
  jcenter()
}

dependencies {
    compile "io.springfox:springfox-swagger2:{releaseVersion}"
}
----

===== Snapshot

[source,groovy]
[subs="verbatim,attributes"]
----
repositories {
   maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local/' }
}

dependencies {
    compile "io.springfox:springfox-swagger2:{snapshotVersion}"
}
----


==== Maven
===== Release

[source,xml]
[subs="verbatim,attributes"]
----
<repositories>
    <repository>
      <id>jcenter-snapshots</id>
      <name>jcenter</name>
      <url>https://jcenter.bintray.com/</url>
    </repository>
</repositories>

<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-swagger2</artifactId>
    <version>{releaseVersion}</version>
</dependency>
----

===== Snapshot

[source,xml]
[subs="verbatim,attributes"]
----
<repositories>
    <repository>
      <id>jcenter-snapshots</id>
      <name>jcenter</name>
      <url>http://oss.jfrog.org/artifactory/oss-snapshot-local/</url>
    </repository>
</repositories>

<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-swagger2</artifactId>
    <version>{snapshotVersion}</version>
</dependency>
----

== Quick start guides
=== Springfox Spring MVC and Spring Boot
[[getting-started-spring-boot]]

[source,java,linenums]
----
include::../../springfox-spring-config/src/main/java/springfox/springconfig/Swagger2SpringBoot.java[indent=0]
----

=== Configuration explained
IMPORTANT: This library extensively uses https://github.com/google/guava[googles guava library]. For e.g. when you
see `newArrayList(...)` its actually the guava equivalent of creating an normal array list and adding item(s) to it.

[source,groovy]
[subs="verbatim,attributes"]
----
//This guava code snippet
List<Something> guavaList = newArrayList(new Something);

//... is equivalent to
List<Something> list = new ArrayList<Something>();
list.add(new Something());
----

<1> Enables Springfox swagger 2
<2> Instructs spring where to scan for API controllers
<3> `Docket`, Springfox's, primary api configuration mechanism is initialized for swagger specification 2.0
<4> `select()` returns an instance of `ApiSelectorBuilder` to give fine grained control over the endpoints exposed
via swagger.
<5> `apis()` allows selection of ``RequestHandler``'s using a predicate. The example here uses an `any` predicate
(default). Out of the box predicates provided are `any`, `none`, `withClassAnnotation`, `withMethodAnnotation` and
`basePackage`.
<6> `paths()` allows selection of ``Path``'s using a predicate. The example here uses an `any` predicate (default)
<7> The selector requires to be built after configuring the api and path selectors. Out of the box we provide
predicates for `regex`, `ant`, `any`, `none`
<8> Adds a servlet path mapping, when the servlet has a path mapping. this prefixes paths with the provided path
mapping
<9> Convenience rule builder substitutes `LocalDate` with `String` when rendering model properties
<10> Convenience rule builder that substitutes a generic type with one type parameter with the type
parameter. In this example `ResponseEntity<T>` with `T`. `alternateTypeRules` allows custom rules that are a bit more
 involved. The example substitutes  `DeferredResult<ResponseEntity<T>>`  with `T` generically
<11> Flag to indicate if default http response codes need to be used or not
<12> Allows globally overriding response messages for different http methods. In this example we override the 500
error code for all `GET`s ...
<13> ...and indicate that it will use the response model `Error` (which will be defined elsewhere)
<14> Sets up the security schemes used to protect the apis. Supported schemes are ApiKey, BasicAuth and OAuth
<15> Provides a way to globally set up security contexts for operation. The idea here is that we provide a way to
select operations to be protected by one of the specified security schemes.
<16> Here we use ApiKey as the security schema that is identified by the name `mykey`
<17> Selector for the paths this security context applies to.
<18> Here we same key defined in the security scheme `mykey`
<19> Optional swagger-ui security configuration for oauth and apiKey settings
<20> Optional swagger-ui ui configuration currently only supports the validation url
<21> * _Incubating_ * setting this flag signals to the processor that the paths generated should try and use
https://tools.ietf.org/html/rfc6570#section-3.2.8[form style query expansion]. As a result we could distinguish paths
 that have the same path stem but different query string combinations. An example of this would be two apis:
* http://example.org/findCustomersBy?name=Test to find customers by name. Per https://tools.ietf.org/html/rfc6570[RFC
 6570] This would be represented as http://example.org/findCustomersBy{?name}
* http://example.org/findCustomersBy?zip=76051 to find customers by zip. Per https://tools.ietf.org/html/rfc6570[RFC
  6570] This would be represented as http://example.org/findCustomersBy{?zip}
<22> Allows globally configuration of default path-/request-/headerparameters which are common for every rest operation of the api, but aren`t needed in spring controller method signature (for example authenticaton information). Parameters added here will be part of every API Operation in the generated swagger specification.
<23> How do you want to transport the api key via a HEADER (header) or QUERY_PARAM (query)?
<24> What header key needs to be used to send the api key. By default this value is set to ___api_key___. Depending
on how the security is setup the name of the header used may need to be different. Overriding this value is a way to
override the default behavior.
<25> Adding tags is a way to define all the available tags that services/operations can opt into. Currently this only
 has name and description.
<26> Are there models in the application that are not "reachable"? Not reachable is when we have models that we would
 like to be described but aren't explicitly used in any operation. An example of this is an operation that returns a
 model serialized as a string. We do want to communicate the expectation of the schema for the string. This is a way
 to do exactly that.
There are plenty of more options to configure the `Docket`. This should provide a good start.

=== Springfox Spring Data Rest
In version greater than 2.6.0, support for spring data rest was added.

NOTE: This is still in ***incubation***.

In order to use it

1. add the `springfox-data-rest` dependency.

==== Gradle
[source,groovy]
[subs="verbatim,attributes"]
----
dependencies {
    compile "io.springfox:springfox-data-rest:{releaseVersion}"
}
----

==== Maven
[source,xml]
[subs="verbatim,attributes"]
----
<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-data-rest</artifactId>
    <version>{releaseVersion}</version>
</dependency>
----

1. Import the configuration from the `springfox-data-rest` module as shown below

==== java config
[source,java]
[subs="verbatim,attributes"]
----
//For java config
@Import({ ... springfox.documentation.spring.data.rest.configuration.SpringDataRestConfiguration.class, ...})
----

==== xml config
Import the bean in your xml configuration by defining a bean of the following type

[source,xml]
[subs="verbatim,attributes"]
----
<bean class="springfox.documentation.spring.data.rest.configuration.SpringDataRestConfiguration.class" />
----

=== Springfox Support for JSR-303
In version greater than 2.3.2, support for bean validation annotations was added, specifically for @NotNull, @Min,
@Max, and @Size.

In order to use it

- add the `springfox-bean-validators` dependency.

==== Gradle
[source,groovy]
[subs="verbatim,attributes"]
----
dependencies {
    compile "io.springfox:springfox-bean-validators:{releaseVersion}"
}
----

==== Maven
[source,xml]
[subs="verbatim,attributes"]
----
<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-bean-validators</artifactId>
    <version>{releaseVersion}</version>
</dependency>
----

- Import the configuration from the `springfox-bean-validators` module as shown below

==== java config
[source,java]
[subs="verbatim,attributes"]
----
//For java config
@Import({ ... springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration.class, ...})
----

==== xml config
Import the bean in your xml configuration by defining a bean of the following type

[source,xml]
[subs="verbatim,attributes"]
----
<bean class="springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration" />
----

=== Springfox Swagger UI
The `springfox-swagger-ui` http://www.webjars.org/[web jar] ships with https://github.com/swagger-api/swagger-ui[Swagger UI]. To include it in a standard
Spring Boot application you can add the dependency as follows:

[source,groovy]
[subs="verbatim,attributes"]
----
dependencies {
    compile 'io.springfox:springfox-swagger-ui:{releaseVersion}'
}
----

Pulling in the dependency creates a webjar containing the swagger-ui static content. It adds a JSON endpoint
`/swagger-resources` which lists all of the swagger resources and versions configured for a given
application. The Swagger UI page should then be available at http://localhost:8080/swagger-ui.html[]

image::springfox-swagger-ui.png[Swagger UI]

The swagger ui version is specified in ./build.gradle where `swaggerUiVersion` is a git tag on the
https:// github.com/swagger-api/swagger-ui[swagger-ui repo].

All content is served from a webjar convention, relative url taking the following form:
`webjars/springfox-swagger-ui/{releaseVersion}/swagger-ui.html`

By default Spring Boot has sensible defaults for serving content from webjars. To configure vanilla spring web mvc
apps to serve webjar content see the http://www.webjars.org/documentation#springmvc[webjar documentation]

Swagger-Ui that comes bundled with springfox uses _meta-urls_ to configure itself and discover documented endpoints.
The urls for the discovery are as shown below.

[options="header,footer"]
|=======================
|Url | New Url in 2.5.+| Purpose
|/configuration/security | /swagger-resources/configuration/security | Configuring swagger-ui security
|/configuration/ui | /swagger-resources/configuration/ui | Configuring swagger-ui options
|=======================

Since swagger ui is a static resource it needs to rely on *known* endpoints to configure itself at runtime. So these
☝️ are ***cool uris** that cannot change. There is <<q13,some customization>> that is possible, but swagger-ui needs
to be available at the root of the _webcontext_.

Regarding [where swagger-ui itself is served](http://springfox.github.io/springfox/docs/current/#q13) and [where the
api docs are served](http://springfox.github.io/springfox/docs/current/#customizing-the-swagger-endpoints) those are
 totally configurable.

=== Springfox RFC6570 support *incubating*
NOTE: _Keep in mind this is experimental_!
In order to use this feature

1. Add `springfox-swagger-ui-rfc6570` instead of `springfox-swagger-ui` as a dependency
http://mvnrepository.com/artifact/io.springfox.ui/springfox-swagger-ui-rfc6570/{springfoxRfc6570Version}[experimental swagger-ui].

For gradle:
[source,groovy]
[subs="verbatim,attributes"]
----
dependencies {
    compile 'io.springfox.ui:springfox-swagger-ui-rfc6570:{springfoxRfc6570Version}'
}
----

For maven:
[source,xml]
[subs="verbatim,attributes"]
----
<dependency>
    <groupId>io.springfox.ui</groupId>
    <artifactId>springfox-swagger-ui-rfc6570</artifactId>
    <version>{springfoxRfc6570Version}</version>
</dependency>
----
NOTE: The newer version has changed the group id from `_io.springfox_` to `_io.springfox.ui_`!

- Enable url templating; (http://springfox.github.io/springfox/docs/current/#springfox-swagger2-with-spring-mvc-and-spring-boot[see #21])

=== Springfox samples
The https://github.com/springfox/springfox-demos[springfox-demos] repository contains a number of samples.

<commit_msg>Explanation line of Docket moved to correct location<commit_after>== Getting Started

:releaseVersion: {springfox-released-version}
:snapshotVersion: {springfox-current-version}
:springfoxRfc6570Version: {springfox-swagger-ui-rfc6570-version}

=== Dependencies
The Springfox libraries are hosted on https://bintray.com/springfox/maven-repo/springfox/view[bintray] and jcenter.
The artifacts can be viewed accessed at the following locations:

* Release:
   ** https://jcenter.bintray.com/io/springfox/
   ** http://jcenter.bintray.com/io/springfox/
* Snapshot
 ** http://oss.jfrog.org/simple/oss-snapshot-local/io/springfox/
 ** http://oss.jfrog.org/oss-snapshot-local/io/springfox/

Springfox has multiple modules and the dependencies will vary depending on the desired API specification standard.
Below outlines how to include the springfox-swagger2 module which produces Swagger 2.0 API documentation.


==== Gradle
===== Release
[source,groovy]
[subs="verbatim,attributes"]
----
repositories {
  jcenter()
}

dependencies {
    compile "io.springfox:springfox-swagger2:{releaseVersion}"
}
----

===== Snapshot

[source,groovy]
[subs="verbatim,attributes"]
----
repositories {
   maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local/' }
}

dependencies {
    compile "io.springfox:springfox-swagger2:{snapshotVersion}"
}
----


==== Maven
===== Release

[source,xml]
[subs="verbatim,attributes"]
----
<repositories>
    <repository>
      <id>jcenter-snapshots</id>
      <name>jcenter</name>
      <url>https://jcenter.bintray.com/</url>
    </repository>
</repositories>

<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-swagger2</artifactId>
    <version>{releaseVersion}</version>
</dependency>
----

===== Snapshot

[source,xml]
[subs="verbatim,attributes"]
----
<repositories>
    <repository>
      <id>jcenter-snapshots</id>
      <name>jcenter</name>
      <url>http://oss.jfrog.org/artifactory/oss-snapshot-local/</url>
    </repository>
</repositories>

<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-swagger2</artifactId>
    <version>{snapshotVersion}</version>
</dependency>
----

== Quick start guides
=== Springfox Spring MVC and Spring Boot
[[getting-started-spring-boot]]

[source,java,linenums]
----
include::../../springfox-spring-config/src/main/java/springfox/springconfig/Swagger2SpringBoot.java[indent=0]
----

=== Configuration explained
IMPORTANT: This library extensively uses https://github.com/google/guava[googles guava library]. For e.g. when you
see `newArrayList(...)` its actually the guava equivalent of creating an normal array list and adding item(s) to it.

[source,groovy]
[subs="verbatim,attributes"]
----
//This guava code snippet
List<Something> guavaList = newArrayList(new Something);

//... is equivalent to
List<Something> list = new ArrayList<Something>();
list.add(new Something());
----

<1> Enables Springfox swagger 2
<2> Instructs spring where to scan for API controllers
<3> `Docket`, Springfox's, primary api configuration mechanism is initialized for swagger specification 2.0
<4> `select()` returns an instance of `ApiSelectorBuilder` to give fine grained control over the endpoints exposed
via swagger.
<5> `apis()` allows selection of ``RequestHandler``'s using a predicate. The example here uses an `any` predicate
(default). Out of the box predicates provided are `any`, `none`, `withClassAnnotation`, `withMethodAnnotation` and
`basePackage`.
<6> `paths()` allows selection of ``Path``'s using a predicate. The example here uses an `any` predicate (default). Out of the box we provide predicates for `regex`, `ant`, `any`, `none`.
<7> The selector requires to be built after configuring the api and path selectors.
<8> Adds a servlet path mapping, when the servlet has a path mapping. this prefixes paths with the provided path
mapping
<9> Convenience rule builder substitutes `LocalDate` with `String` when rendering model properties
<10> Convenience rule builder that substitutes a generic type with one type parameter with the type
parameter. In this example `ResponseEntity<T>` with `T`. `alternateTypeRules` allows custom rules that are a bit more
 involved. The example substitutes  `DeferredResult<ResponseEntity<T>>`  with `T` generically
<11> Flag to indicate if default http response codes need to be used or not
<12> Allows globally overriding response messages for different http methods. In this example we override the 500
error code for all `GET`s ...
<13> ...and indicate that it will use the response model `Error` (which will be defined elsewhere)
<14> Sets up the security schemes used to protect the apis. Supported schemes are ApiKey, BasicAuth and OAuth
<15> Provides a way to globally set up security contexts for operation. The idea here is that we provide a way to
select operations to be protected by one of the specified security schemes.
<16> Here we use ApiKey as the security schema that is identified by the name `mykey`
<17> Selector for the paths this security context applies to.
<18> Here we same key defined in the security scheme `mykey`
<19> Optional swagger-ui security configuration for oauth and apiKey settings
<20> Optional swagger-ui ui configuration currently only supports the validation url
<21> * _Incubating_ * setting this flag signals to the processor that the paths generated should try and use
https://tools.ietf.org/html/rfc6570#section-3.2.8[form style query expansion]. As a result we could distinguish paths
 that have the same path stem but different query string combinations. An example of this would be two apis:
* http://example.org/findCustomersBy?name=Test to find customers by name. Per https://tools.ietf.org/html/rfc6570[RFC
 6570] This would be represented as http://example.org/findCustomersBy{?name}
* http://example.org/findCustomersBy?zip=76051 to find customers by zip. Per https://tools.ietf.org/html/rfc6570[RFC
  6570] This would be represented as http://example.org/findCustomersBy{?zip}
<22> Allows globally configuration of default path-/request-/headerparameters which are common for every rest operation of the api, but aren`t needed in spring controller method signature (for example authenticaton information). Parameters added here will be part of every API Operation in the generated swagger specification.
<23> How do you want to transport the api key via a HEADER (header) or QUERY_PARAM (query)?
<24> What header key needs to be used to send the api key. By default this value is set to ___api_key___. Depending
on how the security is setup the name of the header used may need to be different. Overriding this value is a way to
override the default behavior.
<25> Adding tags is a way to define all the available tags that services/operations can opt into. Currently this only
 has name and description.
<26> Are there models in the application that are not "reachable"? Not reachable is when we have models that we would
 like to be described but aren't explicitly used in any operation. An example of this is an operation that returns a
 model serialized as a string. We do want to communicate the expectation of the schema for the string. This is a way
 to do exactly that.
There are plenty of more options to configure the `Docket`. This should provide a good start.

=== Springfox Spring Data Rest
In version greater than 2.6.0, support for spring data rest was added.

NOTE: This is still in ***incubation***.

In order to use it

1. add the `springfox-data-rest` dependency.

==== Gradle
[source,groovy]
[subs="verbatim,attributes"]
----
dependencies {
    compile "io.springfox:springfox-data-rest:{releaseVersion}"
}
----

==== Maven
[source,xml]
[subs="verbatim,attributes"]
----
<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-data-rest</artifactId>
    <version>{releaseVersion}</version>
</dependency>
----

1. Import the configuration from the `springfox-data-rest` module as shown below

==== java config
[source,java]
[subs="verbatim,attributes"]
----
//For java config
@Import({ ... springfox.documentation.spring.data.rest.configuration.SpringDataRestConfiguration.class, ...})
----

==== xml config
Import the bean in your xml configuration by defining a bean of the following type

[source,xml]
[subs="verbatim,attributes"]
----
<bean class="springfox.documentation.spring.data.rest.configuration.SpringDataRestConfiguration.class" />
----

=== Springfox Support for JSR-303
In version greater than 2.3.2, support for bean validation annotations was added, specifically for @NotNull, @Min,
@Max, and @Size.

In order to use it

- add the `springfox-bean-validators` dependency.

==== Gradle
[source,groovy]
[subs="verbatim,attributes"]
----
dependencies {
    compile "io.springfox:springfox-bean-validators:{releaseVersion}"
}
----

==== Maven
[source,xml]
[subs="verbatim,attributes"]
----
<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-bean-validators</artifactId>
    <version>{releaseVersion}</version>
</dependency>
----

- Import the configuration from the `springfox-bean-validators` module as shown below

==== java config
[source,java]
[subs="verbatim,attributes"]
----
//For java config
@Import({ ... springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration.class, ...})
----

==== xml config
Import the bean in your xml configuration by defining a bean of the following type

[source,xml]
[subs="verbatim,attributes"]
----
<bean class="springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration" />
----

=== Springfox Swagger UI
The `springfox-swagger-ui` http://www.webjars.org/[web jar] ships with https://github.com/swagger-api/swagger-ui[Swagger UI]. To include it in a standard
Spring Boot application you can add the dependency as follows:

[source,groovy]
[subs="verbatim,attributes"]
----
dependencies {
    compile 'io.springfox:springfox-swagger-ui:{releaseVersion}'
}
----

Pulling in the dependency creates a webjar containing the swagger-ui static content. It adds a JSON endpoint
`/swagger-resources` which lists all of the swagger resources and versions configured for a given
application. The Swagger UI page should then be available at http://localhost:8080/swagger-ui.html[]

image::springfox-swagger-ui.png[Swagger UI]

The swagger ui version is specified in ./build.gradle where `swaggerUiVersion` is a git tag on the
https:// github.com/swagger-api/swagger-ui[swagger-ui repo].

All content is served from a webjar convention, relative url taking the following form:
`webjars/springfox-swagger-ui/{releaseVersion}/swagger-ui.html`

By default Spring Boot has sensible defaults for serving content from webjars. To configure vanilla spring web mvc
apps to serve webjar content see the http://www.webjars.org/documentation#springmvc[webjar documentation]

Swagger-Ui that comes bundled with springfox uses _meta-urls_ to configure itself and discover documented endpoints.
The urls for the discovery are as shown below.

[options="header,footer"]
|=======================
|Url | New Url in 2.5.+| Purpose
|/configuration/security | /swagger-resources/configuration/security | Configuring swagger-ui security
|/configuration/ui | /swagger-resources/configuration/ui | Configuring swagger-ui options
|=======================

Since swagger ui is a static resource it needs to rely on *known* endpoints to configure itself at runtime. So these
☝️ are ***cool uris** that cannot change. There is <<q13,some customization>> that is possible, but swagger-ui needs
to be available at the root of the _webcontext_.

Regarding [where swagger-ui itself is served](http://springfox.github.io/springfox/docs/current/#q13) and [where the
api docs are served](http://springfox.github.io/springfox/docs/current/#customizing-the-swagger-endpoints) those are
 totally configurable.

=== Springfox RFC6570 support *incubating*
NOTE: _Keep in mind this is experimental_!
In order to use this feature

1. Add `springfox-swagger-ui-rfc6570` instead of `springfox-swagger-ui` as a dependency
http://mvnrepository.com/artifact/io.springfox.ui/springfox-swagger-ui-rfc6570/{springfoxRfc6570Version}[experimental swagger-ui].

For gradle:
[source,groovy]
[subs="verbatim,attributes"]
----
dependencies {
    compile 'io.springfox.ui:springfox-swagger-ui-rfc6570:{springfoxRfc6570Version}'
}
----

For maven:
[source,xml]
[subs="verbatim,attributes"]
----
<dependency>
    <groupId>io.springfox.ui</groupId>
    <artifactId>springfox-swagger-ui-rfc6570</artifactId>
    <version>{springfoxRfc6570Version}</version>
</dependency>
----
NOTE: The newer version has changed the group id from `_io.springfox_` to `_io.springfox.ui_`!

- Enable url templating; (http://springfox.github.io/springfox/docs/current/#springfox-swagger2-with-spring-mvc-and-spring-boot[see #21])

=== Springfox samples
The https://github.com/springfox/springfox-demos[springfox-demos] repository contains a number of samples.


{'fraction_non_alphanumeric': 0.1164168699895434, 'fraction_numerical': 0.011695906432748537, 'mean_word_length': 4.722960992907802, 'pattern_counts': {'":': 0, '<': 195, '<?xml version=': 0, '>': 195, 'https://': 20, 'lorem ipsum': 0, 'www.': 4, 'xml': 22}, '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': '4635141', 'n_tokens_mistral': 7730, 'n_tokens_neox': 7318, 'n_words': 2639}