Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nl] prevent 2+ part compound words from being accepted #9971

Merged
merged 4 commits into from
Dec 21, 2023

Conversation

mark-baas
Copy link
Collaborator

No description provided.


CompoundAcceptor() {
tagger = Languages.getLanguageForShortCode("nl").getTagger();
this.DutchTagger = new DutchTagger();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We prefer to avoid creating new instances. Use the previous version. I will add a default tagger for NL.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done here. 1e445e1

Copy link
Member

@jaumeortola jaumeortola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the initialization of the tagger, it looks good.

@@ -558,14 +558,14 @@ public class CompoundAcceptor {
}
}

private final Tagger tagger;
private final DutchTagger DutchTagger;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The class is capitalized (DuchTagger), but the variable should be lowercase (dutchTagger).

}

public CompoundAcceptor(Tagger tagger) {
this.tagger = tagger;
public CompoundAcceptor(DutchTagger dutchTagger) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This constructor (lines 566-568) seems unnecessary. It is never used, and the tagger is initialized in line 561.

@mark-baas mark-baas merged commit 4149a5a into languagetool-org:master Dec 21, 2023
2 checks passed
@mark-baas mark-baas deleted the mb-01 branch December 21, 2023 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants