Revision: 6118
          
http://languagetool.svn.sourceforge.net/languagetool/?rev=6118&view=rev
Author:   dnaber
Date:     2011-12-31 13:31:45 +0000 (Sat, 31 Dec 2011)
Log Message:
-----------
fix usage text; improve exception text; fix script to match its usage

Modified Paths:
--------------
    
branches/V_1_6/src/dev/org/languagetool/dev/wikipedia/CheckWikipediaDump.java
    branches/V_1_6/src/scripts/testwikipedia.sh

Modified: 
branches/V_1_6/src/dev/org/languagetool/dev/wikipedia/CheckWikipediaDump.java
===================================================================
--- 
branches/V_1_6/src/dev/org/languagetool/dev/wikipedia/CheckWikipediaDump.java   
    2011-12-31 13:10:12 UTC (rev 6117)
+++ 
branches/V_1_6/src/dev/org/languagetool/dev/wikipedia/CheckWikipediaDump.java   
    2011-12-31 13:31:45 UTC (rev 6118)
@@ -97,9 +97,9 @@
 
   private static void ensureCorrectUsageOrExit(String[] args) {
     if (args.length < 5 || args.length > 6) {
-      System.err.println("Usage: CheckWikipediaDump <propertyFile> <language> 
<filename> <ruleIds> [maxArticleCheck]");
+      System.err.println("Usage: CheckWikipediaDump <propertyFile> 
<rulePropertyFile> <language> <filename> <ruleIds> [maxArticleCheck]");
       System.err.println("\tpropertyFile a file to set database access 
properties. Use '-' to print results to stdout.");
-      System.err.println("\tpropertyFile a file to set rules which should be 
disabled per language (e.g. en=RULE1,RULE2 or all=RULE3,RULE4). Use an empty 
file if not valid.");
+      System.err.println("\trulePropertyFile a file to set rules which should 
be disabled per language (e.g. en=RULE1,RULE2 or all=RULE3,RULE4). Use '-' to 
ignore.");
       System.err.println("\tlanguage languagecode like 'en' or 'de'");
       System.err.println("\tfilename path to unpacked Wikipedia XML dump");
       System.err.println("\truleIds comma-separated list of rule-ids to 
activate. Use '-' to activate the default rules.");
@@ -161,13 +161,13 @@
     final String filename = file.getName();
     final String[] parts = filename.split("-");
     if (parts.length < 3) {
-      throw new IOException("Unexpected filename format: " + file.getName() + 
". Must be like ??wiki-????????-pages-articles.xml");
+      throw new IOException("Unexpected filename format: " + file.getName() + 
", must be like ??wiki-????????-pages-articles.xml");
     }
     final SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
     try {
       return sdf.parse(parts[1]);
     } catch (ParseException e) {
-      throw new IOException("Unexpected date format: " + parts[1], e);
+      throw new IOException("Unexpected date format '" + parts[1] + "', must 
be yyyymmdd", e);
     }
   }
 

Modified: branches/V_1_6/src/scripts/testwikipedia.sh
===================================================================
--- branches/V_1_6/src/scripts/testwikipedia.sh 2011-12-31 13:10:12 UTC (rev 
6117)
+++ branches/V_1_6/src/scripts/testwikipedia.sh 2011-12-31 13:31:45 UTC (rev 
6118)
@@ -2,4 +2,4 @@
 
 : ${3?"Usage: $0 <lang> <wikipediaXmlDump> <ruleIds> (where <lang> is a 
language code like 'en' or 'de', <ruleIds> is a comma-separated list of rules 
to be activated or '-' for the default rules)"}
 
-java -Xmx512M -cp commons-lang-2.4.jar:bliki-3.0.3.jar:LanguageTool.jar 
org.languagetool.dev.wikipedia.CheckWikipediaDump - $1 $2 $3
+java -Xmx512M -cp commons-lang-2.4.jar:bliki-3.0.3.jar:LanguageTool.jar 
org.languagetool.dev.wikipedia.CheckWikipediaDump - - $1 $2 $3

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Languagetool-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-cvs

Reply via email to