Revision: 9848
http://languagetool.svn.sourceforge.net/languagetool/?rev=9848&view=rev
Author: dnaber
Date: 2013-04-01 18:40:35 +0000 (Mon, 01 Apr 2013)
Log Message:
-----------
update for LT 2.1
Modified Paths:
--------------
trunk/website/www/http-server/index.php
trunk/website/www/java-api/index.php
Modified: trunk/website/www/http-server/index.php
===================================================================
--- trunk/website/www/http-server/index.php 2013-04-01 18:38:25 UTC (rev
9847)
+++ trunk/website/www/http-server/index.php 2013-04-01 18:40:35 UTC (rev
9848)
@@ -3,15 +3,15 @@
$sub_page = "http-server";
$title = "LanguageTool";
$title2 = "HTTP Server";
-$lastmod = "2013-02-08 23:20:00 CET";
+$lastmod = "2013-03-31 23:20:00 CET";
include("../../include/header.php");
include('../../include/geshi/geshi.php');
?>
<h2 class="firstpara">Accessing LanguageTool via HTTP</h2>
- <p>LanguageTool comes with its own embedded HTTP server so you can send a
text
- to LanguageTool via HTTP and get the detected errors back as XML. This
embedded server can be started in two ways:</p>
+ <p>LanguageTool comes with its own embedded HTTP/HTTPS server so you can
send a text
+ to LanguageTool via HTTP or HTTPS and get the detected errors back as
XML. This embedded server can be started in two ways:</p>
<ul>
<li>Start the stand-alone application and configure it (<em>File ->
Options...</em>) to listen on a port that
@@ -21,12 +21,12 @@
<li>
<p>Start LanguageTool on the command line using this command:</p>
- <tt class="command">java -cp LanguageTool.jar
org.languagetool.server.HTTPServer</tt>
+ <tt class="command">java -cp languagetool-server.jar
org.languagetool.server.HTTPServer</tt>
<p>You can use the <tt>--port</tt> or <tt>-p</tt> option to specify
the port number. If
no port number is specified, the default (8081) is used. For security
reasons, the server will
not be accessible from other hosts. If you want to run a server for
remote users you will
- need to use the <tt>--public</tt> option (not much tested yet) or
write a small Java program
+ need to use the <tt>--public</tt> option or write a small Java program
that creates an instance of
<tt><a
href="http://www.languagetool.org/development/api/index.html?org/languagetool/server/HTTPServer.html">org.languagetool.server.HTTPServer</a></tt>.
</li>
@@ -69,13 +69,13 @@
an XML response like this:</p>
<div class="xmlrule" style="margin-top:5px"><?php hl('<?xml version="1.0"
encoding="UTF-8"?>
-<matches software="LanguageTool" version="1.9" buildDate="2012-09-29">
+<matches software="LanguageTool" version="2.1" buildDate="2013-04-01 14:49">
+<language shortname="en-US" name="English (US)"/>
<error fromy="0" fromx="0" toy="0" tox="5"
ruleId="UPPERCASE_SENTENCE_START"
msg="This sentence does not start with an uppercase letter"
- replacements="This" context="this is a test."
- contextoffset="0" offset="0"
- errorlength="4" category="Capitalization"/>
+ replacements="This" context="this is a test." contextoffset="0" offset="0"
+ errorlength="4" category="Capitalization" locqualityissuetype="misspelling"/>
</matches>'); ?>
</div>
@@ -91,7 +91,7 @@
<p>Starting with version 2.0, LanguageTool offers an embedded HTTPS server. It
works just like the HTTP server
described above, but it only supports <tt>https</tt>. It can be started like
this:</p>
-<tt class="command">java -cp LanguageTool.jar
org.languagetool.server.HTTPSServer --config server.properties</tt>
+<tt class="command">java -jar languagetool-server.jar --config
server.properties</tt>
<p><tt>server.properties</tt> is a Java properties file like this:</p>
Modified: trunk/website/www/java-api/index.php
===================================================================
--- trunk/website/www/java-api/index.php 2013-04-01 18:38:25 UTC (rev
9847)
+++ trunk/website/www/java-api/index.php 2013-04-01 18:40:35 UTC (rev
9848)
@@ -3,35 +3,38 @@
$sub_page = "java-api";
$title = "LanguageTool";
$title2 = "Java API";
-$lastmod = "2013-02-05 23:20:00 CET";
+$lastmod = "2013-03-31 23:20:00 CET";
include("../../include/header.php");
include('../../include/geshi/geshi.php');
?>
<h2 class="firstpara">Embedding LanguageTool in Java applications</h2>
- <p>Get LanguageTool by downloading the *.zip package from the homepage or
by adding this dependency to your
- <?=show_link("Maven", "http://maven.apache.org/run-maven/", 0) ?>
pom.xml:</p>
+ <p>Get LanguageTool by downloading the *.zip package from the homepage or
by adding a
+ dependency like this to your <?=show_link("Maven",
"http://maven.apache.org/run-maven/", 0) ?> pom.xml:</p>
+<p class="warning">The new Maven artifacts fro LanguageTool 2.1 are not yet on
+ Maven Central, but they should appear soon (2013-04-01)</p>
+
<div class="xmlrule" style="margin-top:5px">
<?php hl('<dependency>
<groupId>org.languagetool</groupId>
- <artifactId>languagetool</artifactId>
- <version>2.0.1</version>
+ <artifactId>language-en</artifactId>
+ <version>2.1</version>
</dependency>'); ?>
</div>
- <p>The Maven artifact contains both code and resources for all languages
and is thus quite large (48MB).</p>
+ <p>This will get the dependencies needed to check English. Use
<tt>language-de</tt> as an artifactId for German etc.
+ If you want to use all languages that LanguageTool supports, use
<tt>language-all</tt>.</p>
- <p>If you download the ZIP instead, you will need most JARs,
<tt>org/languagetool/rules</tt> and <tt>org/languagetool/resources</tt>
- in your classpath. You can skip the following JARs as they are not needed
at runtime:
- lucene-*.jar, junit.jar, bliki-3.0.3.jar, RuleConverterGUI.jar,
RuleConverter.jar</p>
+ <p>If you download the ZIP instead, you will need the JAR files and
everything under <tt>org/languagetool</tt>
+ in your classpath.</p>
<p>To use LanguageTool, you just need to create a <tt>JLanguageTool</tt>
object and use that
to check your text. Also see <?=show_link("the API documentation",
"/development/api/", 0) ?>. For example:</p>
<div class="xmlrule" style="margin-top:5px">
- <?php hljava('JLanguageTool langTool = new
JLanguageTool(Language.BRITISH_ENGLISH);
+ <?php hljava('JLanguageTool langTool = new JLanguageTool(new
BritishEnglish());
langTool.activateDefaultPatternRules();
List<RuleMatch> matches = langTool.check("A sentence " +
"with a error in the Hitchhiker\'s Guide tot he Galaxy");
@@ -45,7 +48,7 @@
</div>
<p>If you want spell checking, you will need to specify a language variant
in the <tt>JLanguageTool</tt> constructor,
- e.g. <tt>Language.AMERICAN_ENGLISH</tt> instead of just
<tt>Language.ENGLISH</tt>.</p>
+ e.g. <tt>new AmericanEnglish()</tt> instead of just <tt>new
English()</tt>.</p>
<?php
include("../../include/footer.php");
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits