Hey Guys,

I wanted to start looking into Java rules for Italian.

I have some questions. I have been studying th ecode to understand how English 
javae rules work.

First of all I see that some of the generic rules that are implemented into 
org.languagetool.rules are active for Italian because they have been imported 
into the Italian.java source file.

import org.languagetool.rules.CommaWhitespaceRule;
import org.languagetool.rules.DoublePunctuationRule;
import org.languagetool.rules.GenericUnpairedBracketsRule;
import org.languagetool.rules.Rule;
import org.languagetool.rules.UppercaseSentenceStartRule;
import org.languagetool.rules.WhitespaceRule;
import org.languagetool.rules.WordRepeatRule;

So the first question would be:

I see that you have a java rule for checking long sentences. I could the 
replace the XML one that I wrote with that one. Just importing the rule would 
not work since that code isn't NLS n
enabled:

@Override
  public String getDescription() {
    return "Readability: sentence over " + MAX_WORDS + " words";
  }


I would probably need to override that method. What's the correct way of doing 
that? I just do not want to copy and paste the whole rule to make an 
ItalianLongSentence…


Second question, I have a rules category for punctuation, under that category I 
could put some of the Java rules that are currently imported from the core 
package but that fall under a "miscellaneous" category.

I see a piece of code that sets the rule category 

public LongSentenceRule(final ResourceBundle messages) {
    super(messages);
    super.setCategory(new Category(messages.getString("category_misc")));
    setDefaultOff();
  }

How would this work for Italian? Would it be possible to get a rule category 
that has been defined into the grammar.xml file?

Lastly, I wanted to try to provide a fix to this bug no. 3607406
3607406 No space before colon

I see that there's already a rule that checks a whitespace before the period at 
the end of the sentence. Which rule is it? would it be feasible to modify that 
rule to fix this bug?

Thanks

Ciao

Paolo
------------------------------------------------------------------------------
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

Reply via email to