Re: [Languagetool] Initial hunspell support

2012-05-19 Thread Marcin Miłkowski
I don't think we should have spell-checking functions in the LO/AOO at 
all. This is only for the standalone versions of LT, as there's no need 
to duplicate the functionality.

m.

W dniu 2012-05-18 23:40, Martin Srebotnjak pisze:
 Sorry, if this sounds stupid, but LT extension for LO/AOO could link
 to the installed dictionaries in LO/AOO without reinstalling them?

 lp, m.

 2012/5/18 Marcin Miłkowskilist-addr...@wp.pl:
 W dniu 2012-05-18 22:57, Daniel Naber pisze:
 On Freitag, 18. Mai 2012, Marcin Miłkowski wrote:

 thanks for adding Hunspell support! What about moving the hunspell
 dict to another sub directory hunspell in our sources to make more
 obvious that this is just copied from a different project?
 Well, you mean adding hunspell under resources?
 I'd suggest using
 src/resource/pl/hunspell/pl_PL.dic
 instead of
 src/resource/pl/pl_PL.dic

 Yes, that should make it easier for us to split builds.

 I will change it in a minute,

 regards,
 Marcin


 Regards
Daniel



 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Languagetool-devel mailing list
 Languagetool-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/languagetool-devel

 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Languagetool-devel mailing list
 Languagetool-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/languagetool-devel




--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel


Re: [Languagetool] Initial hunspell support

2012-05-19 Thread Martin Srebotnjak
Yes, what I actually meant but didn't write:
If LT finds an installation of LO/AOO, it could use its dictionaries?

2012/5/19 Marcin Miłkowski milek...@o2.pl:
 I don't think we should have spell-checking functions in the LO/AOO at
 all. This is only for the standalone versions of LT, as there's no need
 to duplicate the functionality.

 m.

 W dniu 2012-05-18 23:40, Martin Srebotnjak pisze:
 Sorry, if this sounds stupid, but LT extension for LO/AOO could link
 to the installed dictionaries in LO/AOO without reinstalling them?

 lp, m.

 2012/5/18 Marcin Miłkowskilist-addr...@wp.pl:
 W dniu 2012-05-18 22:57, Daniel Naber pisze:
 On Freitag, 18. Mai 2012, Marcin Miłkowski wrote:

 thanks for adding Hunspell support! What about moving the hunspell
 dict to another sub directory hunspell in our sources to make more
 obvious that this is just copied from a different project?
 Well, you mean adding hunspell under resources?
 I'd suggest using
 src/resource/pl/hunspell/pl_PL.dic
 instead of
 src/resource/pl/pl_PL.dic

 Yes, that should make it easier for us to split builds.

 I will change it in a minute,

 regards,
 Marcin


 Regards
    Daniel



 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Languagetool-devel mailing list
 Languagetool-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/languagetool-devel

 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Languagetool-devel mailing list
 Languagetool-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/languagetool-devel




 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Languagetool-devel mailing list
 Languagetool-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/languagetool-devel

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel


Re: [Languagetool] Initial hunspell support

2012-05-19 Thread Marcin Miłkowski
No. We will need to pack dictionaries ourselves. But this is an 
advantage, really, because under LO/AOO, you could lack a dictionary for 
a language that you want to use, and we will have control under the 
quality of dictionaries included. And of course, some people won't have 
LO installed at all (think of server installs).

We could scan the disk for dictionaries, or try to see if there's LO 
install, but it's more hassle than packing more files into our distribution.

M.

W dniu 2012-05-19 11:18, Martin Srebotnjak pisze:
 Yes, what I actually meant but didn't write:
 If LT finds an installation of LO/AOO, it could use its dictionaries?

 2012/5/19 Marcin Miłkowskimilek...@o2.pl:
 I don't think we should have spell-checking functions in the LO/AOO at
 all. This is only for the standalone versions of LT, as there's no need
 to duplicate the functionality.

 m.

 W dniu 2012-05-18 23:40, Martin Srebotnjak pisze:
 Sorry, if this sounds stupid, but LT extension for LO/AOO could link
 to the installed dictionaries in LO/AOO without reinstalling them?

 lp, m.

 2012/5/18 Marcin Miłkowskilist-addr...@wp.pl:
 W dniu 2012-05-18 22:57, Daniel Naber pisze:
 On Freitag, 18. Mai 2012, Marcin Miłkowski wrote:

 thanks for adding Hunspell support! What about moving the hunspell
 dict to another sub directory hunspell in our sources to make more
 obvious that this is just copied from a different project?
 Well, you mean adding hunspell under resources?
 I'd suggest using
 src/resource/pl/hunspell/pl_PL.dic
 instead of
 src/resource/pl/pl_PL.dic

 Yes, that should make it easier for us to split builds.

 I will change it in a minute,

 regards,
 Marcin


 Regards
 Daniel



 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Languagetool-devel mailing list
 Languagetool-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/languagetool-devel

 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Languagetool-devel mailing list
 Languagetool-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/languagetool-devel




 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Languagetool-devel mailing list
 Languagetool-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/languagetool-devel

 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Languagetool-devel mailing list
 Languagetool-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/languagetool-devel




--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel


Re: [Languagetool] Initial hunspell support

2012-05-19 Thread Marcin Miłkowski
W dniu 2012-05-19 11:13, Dominique Pellé pisze:
 Marcin Miłkowskilist-addr...@wp.pl  wrote:

 Hi all,

 I just added preliminary hunspell support to LanguageTool. This is not
 yet ready for production, as essential parts are missing. But the
 infrastructure and some files are already there.

 Hi Marcin

 I'm curious how this works.  What will command line LangageTool
 output for mispelled words? (with --api option for example).

Same as all rules, this is a new rule with HUNSPELL_RULE as its id.

 I wanted to try what happens with the Polish LanguageTool, but
 it crashes. Is this a known problem?

Yes, it works as expected ;) I didn't put the code to ant build.xml file 
yet! Daniel fixed it temporarily but it will still break for Java Web 
Start. I'm on it.

Regards
Marcin


 $ echo Foobar | java -jar LanguageTool.jar -l pl -v --api

 Exception in thread main java.lang.RuntimeException: Failed to load
 built-in Java rules for language Polish
   at 
 org.languagetool.JLanguageTool.getAllBuiltinRules(JLanguageTool.java:286)
   at org.languagetool.JLanguageTool.init(JLanguageTool.java:169)
   at org.languagetool.Main.init(Main.java:91)
   at org.languagetool.Main.main(Main.java:497)
 Caused by: java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at 
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
   at 
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
   at 
 org.languagetool.JLanguageTool.getAllBuiltinRules(JLanguageTool.java:278)
   ... 3 more
 Caused by: java.lang.NoClassDefFoundError: com/sun/jna/Library
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
   at 
 java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
   at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
   at 
 org.languagetool.rules.spelling.hunspell.Hunspell.init(Hunspell.java:88)
   at 
 org.languagetool.rules.spelling.hunspell.Hunspell.getInstance(Hunspell.java:64)
   at 
 org.languagetool.rules.spelling.hunspell.Hunspell.getInstance(Hunspell.java:50)
   at 
 org.languagetool.rules.spelling.hunspell.HunspellRule.init(HunspellRule.java:82)
   ... 8 more
 Caused by: java.lang.ClassNotFoundException: com.sun.jna.Library
   at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
   ... 23 more


 Regards
 -- Dominique

 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Languagetool-devel mailing list
 Languagetool-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/languagetool-devel


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel


Re: [Languagetool] [LanguageTool] SF.net SVN: languagetool:[6896] ...

2012-05-19 Thread Jan Schreiber
Not a bug, but a (major) annoyance for me: When grammar.xml is displayed
in a browser, the new external resources aren't embedded:
http://languagetool.svn.sourceforge.net/viewvc/languagetool/trunk/JLanguageTool/src/rules/de/grammar.xml
(Tippfehler is gone.)

I often use the browser view to make sure things are displayed as
intended, to get an overview etc.

Can this be solved via JavaScript/css ... somehow?

Daniel Naber schrieb:
 On Freitag, 18. Mai 2012, Jan Schreiber wrote:
 
 Am I right that this method won't work out of the box, but requires
 changes to the Java code?
 
 Yes. I have just committed this, moving only the typo rules to their own 
 file as a test. Does everything work for you? Java code will not need to be 
 touched when we add new external files.
 
 Regards
  Daniel
 

-- 
Jan Schreiber, M.A.
Universität Duisburg-Essen
Fachbereich Geisteswissenschaften
Fach Philosophie
D-45117 Essen

mailto:jan.schrei...@uni-due.de
http://www.uni-due.de/~gph120/
OpenPGP-Schlüssel:
http://www.uni-due.de/~gph120/diverses/0x06C970E5%20pub.asc
Fingerprint: 57DD DD97 99C6 09E7 8B41 7DAD 63A3 1F42 06C9 70E5

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel


Re: [Languagetool] [LanguageTool] SF.net SVN: languagetool:[6896] ...

2012-05-19 Thread Jan Schreiber
I just found this:
http://www.xml.com/pub/a/2001/03/14/trxml10.html

It looks as if it uses an XML-internal method. I'll try it and report
back how it works.

I wrote:
 Not a bug, but a (major) annoyance for me: When grammar.xml is displayed
 in a browser, the new external resources aren't embedded:
 http://languagetool.svn.sourceforge.net/viewvc/languagetool/trunk/JLanguageTool/src/rules/de/grammar.xml
 (Tippfehler is gone.)
 
 I often use the browser view to make sure things are displayed as
 intended, to get an overview etc.
 
 Can this be solved via JavaScript/css ... somehow?
 [...]


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel


Re: [Languagetool] [LanguageTool] SF.net SVN: languagetool:[6896] ...

2012-05-19 Thread Daniel Naber
On Samstag, 19. Mai 2012, Jan Schreiber wrote:

 Not a bug, but a (major) annoyance for me: When grammar.xml is displayed
 in a browser, the new external resources aren't embedded:
 http://languagetool.svn.sourceforge.net/viewvc/languagetool/trunk/JLangu
 ageTool/src/rules/de/grammar.xml (Tippfehler is gone.)

Indeed, it's described here:
http://stackoverflow.com/questions/1512747/will-firefox-do-xslt-on-external-entities

Plus, we need a special classpath: path to make it work under both developer 
and 
deployed environment. One workaround is to use an XSLT processor like this:

xsltproc src/rules/print.xsl src/rules/de/grammar.xml

It will expand the external entities and print out HTML (classpath: url needs 
to be 
changed before). I'll see if I can find a better solution.

Regards
 Daniel

-- 
http://www.danielnaber.de

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel


Re: [Languagetool] [LanguageTool] SF.net SVN: languagetool:[6896] ...

2012-05-19 Thread Jan Schreiber
I got fairly close using
!ENTITY sonstiges SYSTEM ./sonstiges.xml
It displays as expected in IE, but not in Firefox, and it doesn't pass
testrules.bat.

Daniel Naber schrieb:
 On Samstag, 19. Mai 2012, Jan Schreiber wrote:
 
 Not a bug, but a (major) annoyance for me: When grammar.xml is displayed
 in a browser, the new external resources aren't embedded:
 http://languagetool.svn.sourceforge.net/viewvc/languagetool/trunk/JLangu
 ageTool/src/rules/de/grammar.xml (Tippfehler is gone.)
 
 Indeed, it's described here:
 http://stackoverflow.com/questions/1512747/will-firefox-do-xslt-on-external-entities
 
 Plus, we need a special classpath: path to make it work under both 
 developer and 
 deployed environment. One workaround is to use an XSLT processor like this:
 
 xsltproc src/rules/print.xsl src/rules/de/grammar.xml
 
 It will expand the external entities and print out HTML (classpath: url 
 needs to be 
 changed before). I'll see if I can find a better solution.
 


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel


Re: [Languagetool] [LanguageTool] SF.net SVN: languagetool:[6896] ...

2012-05-19 Thread Daniel Naber
On Samstag, 19. Mai 2012, Jan Schreiber wrote:

 I got fairly close using
 !ENTITY sonstiges SYSTEM ./sonstiges.xml
 It displays as expected in IE, but not in Firefox, and it doesn't pass
 testrules.bat.

I have reverted the change for now so the old workflow is in place again. 

BTW, what do you think about using CamelCase for the entities, e.g. 
malenNomen instead of malennomen. I think this would improve 
readability.

Regards
 Daniel

-- 
http://www.danielnaber.de

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel