Bugs item #3588142, was opened at 2012-11-17 02:20
Message generated for change (Settings changed) made by dominikoeo
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=655717&aid=3588142&group_id=110216

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Problem with German
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Dominique Pelle (dominikoeo)
Assigned to: Daniel Naber (dnaber)
>Summary: useless exception in German grammar.xml

Initial Comment:
Consider this German grammar rule:
 
       <rulegroup id="ABKUERZUNG_LEERZEICHEN" name="Typographie: geschütztes 
Leerzeichen bei Abkürzungen wie 'z. B.'">
            <!-- Generalize? How can we make sure we're not only replacing part 
of an abbreviation? -->
            <rule>
                <pattern case_sensitive="yes">
                    <token>Prof</token>
                    <token spacebefore="no">.</token>
                    <token spacebefore="no">Dr<exception 
scope="previous">&nbsp;|&nnbsp;|&thinsp;</exception></token>
                    <token spacebefore="no">.</token>
                </pattern>

The exception <exception scope="previous">&nbsp;|&nnbsp;|&thinsp;</exception>
looks useless to me here since it's a regexp and the regexp="yes" is missing in 
the
exception, so it will never match.

Strange that "ant test" does not see that, it seems
confused by the <!ENTITY ...> in xml perhaps (not sure).

But even with regexp="yes" in the exception it will still never
match because non-breaking space is creating a token of its
own, so it's impossible to have a non breaking space
as previous token here, since the previous token is always
a dot.  So the rule can be written as:

        <rulegroup id="ABKUERZUNG_LEERZEICHEN" name="Typographie: geschütztes 
Leerzeichen bei Abkürzungen wie 'z. B.'">
            <!-- Generalize? How can we make sure we're not only replacing part 
of an abbreviation? -->
            <rule>
                <pattern case_sensitive="yes">
                    <token>Prof</token>
                    <token spacebefore="no">.</token>
                    <token spacebefore="no">Dr</token>
                    <token spacebefore="no">.</token>
                </pattern>


Same error in several other places in de/grammar.xml

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=655717&aid=3588142&group_id=110216

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Languagetool-commits mailing list
Languagetool-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-commits

Reply via email to