Revision: 5925
http://languagetool.svn.sourceforge.net/languagetool/?rev=5925&view=rev
Author: dnaber
Date: 2011-11-18 21:32:33 +0000 (Fri, 18 Nov 2011)
Log Message:
-----------
improve error message if called from non-Wikipedia page
Modified Paths:
--------------
trunk/ltcommunity/grails-app/controllers/org/languagetool/WikiCheckController.groovy
Modified:
trunk/ltcommunity/grails-app/controllers/org/languagetool/WikiCheckController.groovy
===================================================================
---
trunk/ltcommunity/grails-app/controllers/org/languagetool/WikiCheckController.groovy
2011-11-18 21:28:59 UTC (rev 5924)
+++
trunk/ltcommunity/grails-app/controllers/org/languagetool/WikiCheckController.groovy
2011-11-18 21:32:33 UTC (rev 5925)
@@ -42,12 +42,13 @@
def index = {
if (params.url) {
long startTime = System.currentTimeMillis()
+ WikipediaQuickCheck checker = new WikipediaQuickCheck()
+ checker.validateWikipediaUrl(new URL(params.url))
URL plainTextUrl = new URL(CONVERT_URL_PREFIX + params.url)
String plainText = download(plainTextUrl)
if (plainText == '') {
throw new Exception("No Wikipedia page content found at the given URL")
}
- WikipediaQuickCheck checker = new WikipediaQuickCheck()
Language language = checker.getLanguage(new URL(params.url))
if (params.disabled) {
checker.setDisabledRuleIds(Arrays.asList(params.disabled.split(",")))
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Languagetool-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-cvs