Back to LanguageTool Homepage - Privacy - Imprint

Capitalization questions (My name is susan)


(SafeTex) #1

Hello

I'm completely confused about how LT detects the wrong use of small letters at the beginning of some words.

I've noticed that it detects the error 'My name is susan' but not the error in 'my name is gregory'

So I guessed that the rule had a long list of Proper Nouns and that Susan was in it but not Gregory.

But what I found was the following rule

<rulegroup default="off" id="EN_CAPITALIZE" name="Capitalize lowercase words ('i am')">    
            <rule>
                <pattern case_sensitive="yes">
                    <and>
                        <token inflected="yes" regexp="yes">[A-Z][a-z]+</token>
                        <token regexp="yes">[a-z]+</token>
                    </and>
                </pattern>
                <message>The word \1 probably should be uppercase: <suggestion><match case_conversion="startupper" no="1"></match></suggestion>.</message>
                <example correction="Susan" type="incorrect">My name is <marker>susan</marker>.</example>
                <example type="correct">My name is Susan.</example>
            </rule>

So here are my questions

Is this the 'right' rule (the one that is used to detect 'susan')?

Why does it not detect 'gregory' then?

How can letters be inflected ? ([A-Z][a-z]+)

Why does it have [A-Z] in the rule? (if the word starts with a capital, why would the rule to capitalise a word apply to a word that starts with a capital?

I'm completely lost

Thanks


(Daniel Naber) #2

On Fr 09.11.2012, 00:14:38 you wrote:

I've noticed that it detects the error 'My name is susan' but not the
error in 'my name is gregory'

I cannot reproduce that: if en-US is given as a language, both errors are
detected as spelling errors here. If only en is given, no error is
detected. You can use the command line version to see the ID of the rule
that causes a match.

Regards
Daniel

--
http://www.danielnaber.de