Comments (9)
The min/max stuff is still buggy, see the ignored tests in PatternRuleMatcherTest. So instead of porting the buggy change to disambiguation, I'm still trying to find a clean solution based on a finite state machine. That work happens in my personal fork at https://github.com/danielnaber/languagetool/commits/new_engine
from languagetool.
OK, changing the flag on this...
from languagetool.
Daniel, as you can see in the repo, I thought I had a cleaner implementation. But I don't, and I didn't solve the "min="2" problem.
However, after thinking a bit, we may use a similar strategy as we use with < or > and phrases: simply create n rules in memory for min=n, by repeating token n times in the rule, and appropriately renumbering any match elements and references? This is basically the strategy used by DFA/NFA algorithms when compiling {n,m} to automata, and it seems to be the easiest. I fixed the reason for failing tests in the PatternRuleMatcherTest (it was a very easy bug), so that's the only remaining problem, right?
from languagetool.
Yes, that seems to be the easiest way. It would be good if you can give it a try.
from languagetool.
OK, will do.
from languagetool.
Seems to work fine right now, and I don't see any remaining bugs (more tests are now in demo rules, as we deal with "min" via XML loader). One thing that I do not understand is why we have multiple rule matches for max > 1. Is that on purpose?
from languagetool.
I don't remember... maybe the fact that I couldn't get that working was one of the reasons I limited it to 1 in the first place. But it seems wrong.
from languagetool.
Well, you did not limit "max"... I will look into that then.
from languagetool.
OK, it works, but as we could have some GSoC students, I'll simply add issues for these fixes (they are quite trivial).
from languagetool.
Related Issues (20)
- Languagetool extension 6.4 makes multiFormatSave extension 1.5.6 crash. HOT 3
- [DE] Fehlalarm mit "lieb"(Adejektiv)
- Support multi-word and punctuation on Dictionary
- Abgelehnte Wort "Schwulenhass"
- LO extension: Error Message (Crash?) on saving new documents HOT 1
- [DE] False posiive for mir/mit
- Дніпровщина
- [LO-Add-on] Pop-up menu using “info” icon instead of “question” icon — 2024-05-13 HOT 1
- [de] Bullet points that aren't a sentence must/should not be written in caps
- Libreoffice + LanguageTool 6.4 java.lang.NullPointerException: Cannot invoke org.languagetool.openoffice.CacheIO.setDocumentPath HOT 1
- Additional suggestion for IVE_I_HAVE_AMERICAN_STYLE rule
- error within vaadin text fields (text input fields vanish on click) HOT 3
- Request for Self-Hosted AI LLM Download Option
- case_sensitive='yes' doesn't work properly in antipattern — 2024-05-29
- ru: false positive with беспроводной
- [LO-Add-on] LanguageTool crashes on Impress — 2024-05-30 HOT 3
- New German suggestion(s) HOT 4
- [MacOS] Add an option to remove the app icon from the menu bar HOT 2
- [de] `Pepsinwein` erroneously marked as error
- Libre office Extension on Ubuntu 22.04
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from languagetool.