Author: rwesten
Date: Mon Feb 20 17:56:02 2012
New Revision: 1291391
URL: http://svn.apache.org/viewvc?rev=1291391&view=rev
Log:
Changed the default text used in the REST examples to be longer. This ensures
that the LangID engine correctly detects the language of the used sample
Modified:
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/enhancerrest.mdtext
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/index.mdtext
Modified:
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/enhancerrest.mdtext
URL:
http://svn.apache.org/viewvc/incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/enhancerrest.mdtext?rev=1291391&r1=1291390&r2=1291391&view=diff
==============================================================================
---
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/enhancerrest.mdtext
(original)
+++
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/enhancerrest.mdtext
Mon Feb 20 17:56:02 2012
@@ -18,7 +18,8 @@ the <code>Content-type</code> header. Th
:::bash
curl -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" \
- --data "John Smith was born in London." http://localhost:8080/enhancer
+ --data "The Stanbol enhancer can detect famous cities such as Paris
and people such as Bob Marley." \
+ http://localhost:8080/enhancer
The list of mimetypes accepted as inputs depends on the deployed engines. By
default most Enhancement Engines can only process plain text content. However
EnhancementEngines like [Metaxa](engines/metaxaengine.html) can be used to
create 'text/plain' versions of parsed content. This allows also to enhance
contents with mime types such as html, pdf and MS office documents (see the
Metaxa documentation for details)
@@ -41,7 +42,7 @@ In addition this request is directed to
:::bash
curl -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" \
- --data "John Smith was born in London." \
+ --data "The Stanbol enhancer can detect famous cities such as Paris
and people such as Bob Marley." \
"http://localhost:8080/enhancer/chain/dbpedia-keyword?uri=urn:fise-example-content-item&executionmetadata=true"
@@ -63,7 +64,7 @@ The following QueryParameters are define
Responses to requests with this parameter will be encoded as
<code>multipart/from-data</code>. If the "Accept" header of the request is not
compatible to <code>multipart/from-data</code> it is assumed as a <code>400
BAD_REQUEST</code>. For details see the documentation of the [Multipart MIME
format for ContentItems](contentitem.html#multipart_mime_serialization).
-* __omitParsed=[true/false]:__ Makes only sense in combination with the
<code>outputContent</code> parameter. This allows to exclude all content
included in the request from the response. A typical combination is
<code>outputContent=*/*&omitParsed=true</code>. The default value of this
parameter is <code>false</code>
+* __omitParsed=[true/false]:__ Makes only sense in combination with the
<code>outputContent</code> parameter. This allows to exclude all content
included in the request from the response. A typical combination is
<code>outputContentPart=*/*&omitParsed=true</code>. The default value of this
parameter is <code>false</code>
* __outputContentPart=[uri/'*']:__ This parameter allows to explicitly include
content parts with a specific URI in the response. Currently this only supports
[ContentParts](contentitem.html#content_parts) that are stored as RDF graphs.
@@ -95,7 +96,7 @@ This can be achieved relatively easy by
:::bash
curl -v -X POST -H "Accept: multipart/from-data" \
-H "Content-type: text/html; charset=UTF-8" \
- --data "<html><body><p>John Smith was born in
London.</p></body></html>" \
+ --data "<html><body><p>The Stanbol enhancer can detect famous cities
such as Paris and people such as Bob Marley.</p></body></html>" \
"${it.serviceUrl}?outputContent=*/*&omitParsed=true&rdfFormat=application/rdf+xml"
@@ -122,7 +123,7 @@ This will result in an Response with the
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- John Smith was born in London.
+ The Stanbol enhancer can detect famous cities such as Paris and people
such as Bob Marley.
--contentParts--
--contentItem--
@@ -135,13 +136,13 @@ The using the '<code> omitMetadata=true<
curl -v -X POST -H "Accept: text/plain" \
-H "Content-type: text/html; charset=UTF-8" \
- --data "<html><body><p>John Smith was born in
London.</p></body></html>" \
+ --data "<html><body><p>The Stanbol enhancer can detect famous cities
such as Paris and people such as Bob Marley.</p></body></html>" \
"${it.serviceUrl}?omitMetadata=true"
The response will use <code>Content-Type: text/plain</code> and contain the
string
:::text
- John Smith was born in London.
+ The Stanbol enhancer can detect famous cities such as Paris and people
such as Bob Marley.
To make this work the requested [Enhancement Chain](chains) will need to
include an engine (e.g. [Metaxa](engines/metaxaengine.html)) that supports
transcoding the parsed content. If not content with the request type is
available the request will answer with a "<code>404 NOT FOUND</code>".
Modified:
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/index.mdtext
URL:
http://svn.apache.org/viewvc/incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/index.mdtext?rev=1291391&r1=1291390&r2=1291391&view=diff
==============================================================================
---
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/index.mdtext
(original)
+++
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/enhancer/index.mdtext
Mon Feb 20 17:56:02 2012
@@ -14,14 +14,15 @@ The content to analyze should be sent in
:::bash
curl -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" \
- --data "John Smith was born in London." http://localhost:8080/enhancer
+ --data "The Stanbol enhancer can detect famous cities such as Paris
and people such as Bob Marley." \
+ http://localhost:8080/enhancer
The RESTful interface also provides parameters that can be used to
parse/request additional informations. The following Example shows a request
that would answer with the plain/text version of the parsed HTML content
:::bash
curl -v -X POST -H "Accept: text/plain" \
-H "Content-type: text/html; charset=UTF-8" \
- --data "<html><body><p>John Smith was born in
London.</p></body></html>" \
+ --data "<html><body><p>The Stanbol enhancer can detect famous cities
such as Paris and people such as Bob Marley.</p></body></html>" \
"http://localhost:8080/enhancer/chain/language?omitMetadata=true"
For detailed information please see the documentation of the [Stanbol Enhancer
RESTful Services](enhancerrest.html). A short version is also provided by the
Stanbol Web UI (e.g.
[http://localhost:8080/enhancer](http://localhost:8080/enhancer) assuming that
Apache Stanbol runs on localhost:8080).