I have just implemented my second solution. So now it's possible to enable
and disable rules in the server at the same time and keeping the enabled
rules by default. It seems logical and consistent with the documentation
[1].
If someone (improbably) needs to enable a few rules disabling all other
rules in the http server, that isn't possible now.
Regards,
Jaume Ortolà
[1] http://languagetool.org/http-server/
2013/4/3 Jaume Ortolà i Font <[email protected]>
> Hi,
>
> We are preparing an instance of the LT http server to be used at the
> Softcatalà webpage.
>
> For regional and stylistic variants in Catalan, it is indispensable for us
> to enable and disable rules (at the same time) from the web interface. The
> problem is that when you use the "enabled" parameter (in a http query as in
> the command-line), all rules are disabled except those enabled explicitly
> (see method selectRules in Tools.java).
>
> I have found two possible solutions.
>
> 1) We could enable all necessary rules in a config file, and use only the
> "disabled" parameter in the queries. To do this some changes are needed to
> allow configuration via query and via config file at the same time,
> because now they are mutually exclusive (see method
> getLanguageToolInstance in LanguageToolHttpHandler.java). I'm not sure if
> this would work.
>
> 2) We could write a method similar to selectRules (in Tools.java) but
> slightly different, to be used by the LT web server, so the use of the
> "enabled" parameter doesn't disable all rules by default. The current
> behavior makes sense in the command-line application for testing only one
> rule or a few rules, but it doesn't seem useful in the http server.
>
> I prefer the second solution. Let me know if you think there is any
> inconvenience with this.
>
> Regards,
> Jaume Ortolà
>
>
>
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Languagetool-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-devel