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] improve CompoundAcceptor #9549

Merged
merged 1 commit into from
Oct 27, 2023
Merged

Conversation

mark-baas
Copy link
Collaborator

No description provided.

@danielnaber danielnaber merged commit 683c3c5 into languagetool-org:master Oct 27, 2023
2 checks passed
@@ -96,7 +95,7 @@ private boolean abbrevOk(String nonCompound) {

private boolean spellingOk(String nonCompound) throws IOException {
AnalyzedSentence as = new AnalyzedSentence(new AnalyzedTokenReadings[] {
new AnalyzedTokenReadings(new AnalyzedToken(nonCompound, "FAKE_POS", "fakeLemma"))
new AnalyzedTokenReadings(new AnalyzedToken(nonCompound.toLowerCase(), "FAKE_POS", "fakeLemma"))
Copy link
Member

Choose a reason for hiding this comment

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

After having merged the PR, I wonder whether this change is ok: aren't there words like country names or names in general that are always uppercase and that won't be accepted when lowercased? These are probably less likely to appear as part of a compound, but maybe you can add a test case for them anyway?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, there are some exceptions that will still have uppercases. Like you said, less likely, but I'll think of a better solution for them as I add more words.

@mark-baas mark-baas deleted the mb-02 branch October 27, 2023 11:38
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