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


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

2012-05-18 Thread Jan Schreiber
Am I right that this method won't work out of the box, but requires
changes to the Java code? I tried it but the external files failed to load.
The only worry I have is that changes to the categories (like splitting
a category etc.) will be more complicated.

Daniel Naber wrote:
 grammar.xml contains only the existing entity declarations and this:
 
 !ENTITY typos SYSTEM classpath:/rules/de/typos.xml
 !ENTITY typos SYSTEM classpath:/rules/de/grammar.xml
 
 rules
 
  typos;
  grammar;
  (etc)
 
 /rules
 
 That means that the actual rules are included from types.xml etc. The rules 
 can still use the entities, without duplicating them. Does that sound okay 
 to you?

--
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-17 Thread Jan Schreiber
If I understand this properly, it is exactly what I have been looking
for. It would enable us to farm out those huge and cumbersome regExes to
another file until we have a method in place that allows us to get along
without them entirely.

Daniel Naber schrieb:
 Here's how the file could be split up:
 
 grammar.xml contains only the existing entity declarations and this:
 
 !ENTITY typos SYSTEM classpath:/rules/de/typos.xml
 !ENTITY typos SYSTEM classpath:/rules/de/grammar.xml
 
 rules


--
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-16 Thread Dominique Pellé
Jan Schreiber

 I know that ridiculously huge file is a bit of a problem

Are they?  grammar.xml files are not that big.

A text editor opens the biggest grammar.xml in a blink on
my 5 years old laptop.

To make it easier to navigate when editing, I define folds in Vim
with a modeline (see comment at bottom of rules/fr/grammar.xml
or rules/eo/grammar.xml). I'm pretty sure Emacs could do that too.
I find that automatic folding helps to have a global overview of the
large grammar file.

I removed all indentation as an experiment for de/grammar.xml
and the saving in size is negligible (2.7%).

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


Re: [Languagetool] [LanguageTool] SF.net SVN: languagetool:[6896] trunk/JLanguageTool/src/rules/de/grammar. xml

2012-05-16 Thread Daniel Naber
On Montag, 14. Mai 2012, Ruud Baars wrote:

 Don't bother converting the Dutch xml.
 I have already manually done that.
 
 Have to find the time to download the snapshot and get it tested.

Just send it when you're ready - I have applied the automatic conversion to 
Dutch for now so I can remove support for the old mark_from/mark_to.

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-16 Thread Jan Schreiber
Marcin:
 Classifying some of the words semantically might be really useful for 
 some rules.

Indeed, I could not agree more. The most difficult part would be coming
up with the semantic categories in a way that is not completely ad hoc.
Everyone who has ever used a public library is probably aware of the
fact that categorizing things in a comprehensible way is anything but
trivial. Our own categories in the grammar files are cases in point.

We could use the categories from Daniel's OpenThesaurus as a starting
point for German, but they are quite unsatisfactory. Maybe the tag
clouds used in some public bookmarking systems such as the former
delicio.us can be used as a source, at least as a source of inspiration. --J


--
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] trunk/JLanguageTool/src/rules/de/grammar. xml

2012-05-14 Thread Daniel Naber
On Montag, 14. Mai 2012, Jan Schreiber wrote:

 Daniel, the German grammar file is about one third larger now, probably
 because in the course of the automatic replacement the entities defined
 in the XML file itself (some of which are really huge, like sub...;)
 were replaced by their literal counterparts.

Sorry for not noticing that... I have rolled back the change and will try 
to introduce the marker change later again.

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