<commit_before>= Any23 DataFormat
:doctitle: Any23
:shortname: any23
:artifactid: camel-any23
:description: Extract RDF data from HTML documents.
:since: 3.0
:supportlevel: Stable
//Manually maintained attributes
:camel-spring-boot-name: any23


*Since Camel {since}*

Camel Any23 is a DataFormat that uses the Apache Anything To Triples (Any23) library to extract structured data in RDF from a variety of documents on the web.
The main functionality of this DataFormat focuses on its Unmarshal method which extracts RDF triplets from compatible pages, in a wide variety of RDF syntaxes.
Any23 is a Data Format that is intended to convert HTML from a site (or file) into rdf.


== Any23 Options

// dataformat options: START
include::partial$dataformat-options.adoc[]
// dataformat options: END




== Java DSL Example

An example where the consumer provides some HTML

[source,java]
---------------------------------------------------------------------------
from("direct:start").unmarshal().any23("http://mock.foo/bar").to("mock:result");
---------------------------------------------------------------------------

== Spring XML Example

The following example shows how to use TidyMarkup
to unmarshal using Spring

[source,java]
-----------------------------------------------------------------------
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
    <dataFormats>
      <any23 id="any23" baseURI ="http://mock.foo/bar" outputFormat="TURTLE" >
        <configurations>
          <entry>
            <key>any23.extraction.metadata.nesting</key>
            <value>off</value>
          </entry>
        </configurations>
        <extractors>html-head-title</extractors>
      </any23>
    </dataFormats>
    <route>
      <from uri="direct:start"/>
      <to uri="http://microformats.org/2009/08"/>
      <unmarshal>
        <custom ref="any23"/>
      </unmarshal>
      <to uri="mock:result"/>
    </route>
  </camelContext>
-----------------------------------------------------------------------

== Dependencies

To use Any23 in your camel routes you need to add the a dependency
on *camel-any23* which implements this data format.

If you use maven you could just add the following to your pom.xml,
substituting the version number for the latest & greatest release (see
the download page for the latest versions).

[source,java]
----------------------------------------
<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-any23</artifactId>
  <version>x.x.x</version>
</dependency>
----------------------------------------


include::spring-boot:partial$starter.adoc[]<commit_msg>Fixed doc<commit_after>= Any23 DataFormat
:doctitle: Any23
:shortname: any23
:artifactid: camel-any23
:description: Extract RDF data from HTML documents.
:since: 3.0
:supportlevel: Stable
//Manually maintained attributes
:camel-spring-boot-name: any23


*Since Camel {since}*

Camel Any23 is a DataFormat that uses the Apache Anything To Triples (Any23) library to extract structured data in RDF from a variety of documents on the web.
The main functionality of this DataFormat focuses on its Unmarshal method which extracts RDF triplets from compatible pages, in a wide variety of RDF syntaxes.
Any23 is a Data Format that is intended to convert HTML from a site (or file) into rdf.


== Any23 Options

// dataformat options: START
include::partial$dataformat-options.adoc[]
// dataformat options: END




== Java DSL Example

An example where the consumer provides some HTML

[source,java]
---------------------------------------------------------------------------
from("direct:start").unmarshal().any23("http://mock.foo/bar").to("mock:result");
---------------------------------------------------------------------------

== Spring XML Example

The following example shows how to use Any23
to unmarshal using Spring

[source,xml]
-----------------------------------------------------------------------
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
    <dataFormats>
      <any23 id="any23" baseUri="http://mock.foo/bar" outputFormat="TURTLE" >
        <configuration key="any23.extraction.metadata.nesting" value="off"/>
        <extractors>html-head-title</extractors>
      </any23>
    </dataFormats>
    <route>
      <from uri="direct:start"/>
      <to uri="http://microformats.org/2009/08"/>
      <unmarshal>
        <custom ref="any23"/>
      </unmarshal>
      <to uri="mock:result"/>
    </route>
  </camelContext>
-----------------------------------------------------------------------

== Dependencies

To use Any23 in your camel routes you need to add the a dependency
on *camel-any23* which implements this data format.

If you use maven you could just add the following to your pom.xml,
substituting the version number for the latest & greatest release (see
the download page for the latest versions).

[source,xml]
----------------------------------------
<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-any23</artifactId>
  <version>x.x.x</version>
</dependency>
----------------------------------------


include::spring-boot:partial$starter.adoc[]
{'fraction_non_alphanumeric': 0.2392780904327576, 'fraction_numerical': 0.017465554046186688, 'mean_word_length': 2.144600366076876, 'pattern_counts': {'":': 0, '<': 60, '<?xml version=': 0, '>': 60, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3953243', 'n_tokens_mistral': 1446, 'n_tokens_neox': 1328, 'n_words': 450}