-
Notifications
You must be signed in to change notification settings - Fork 64
Expand 4cat to other languages (Finnish) #470
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
base: master
Are you sure you want to change the base?
Conversation
…ors. Missing: filter
|
@ErikBorra @stijn-uva Would be lovely if you could check and merge this soonish! :) Please let me know if there are any issues with the code, happy to patch this PR. |
|
@sal-uva you removed spacy last year. I cannot recall or find what the specific issue was and only vaguely remember some dependency problems. Do you recall? |
There were some dependency problems (iirc it didn't like our version of NumPy) and because of its resource-heavy nature was only suited for small-scale datasets for (among others) entity recognition, which can now be done much better with LLMs. But if it's handy for Finnish and it doesn't cause any dependency errors for you, all good to add back in! |
|
I think we did not encounter issues, but happy to test more if that helps - any hints on what to test out? |
dale-wahl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the lexical_filter needs a change to be clearer to users, but otherwise this looks good.
| "help": "Custom word list (separate with commas)" | ||
| }, | ||
| #the language determines whether the user can choose the "Match inflections and compounds" option under "match-type" | ||
| "language": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not like the language option as it does not do anything at the moment yet implies it does to the user.
I see that the Finnish list is regex already compared to the English lists. I understand that is why you have added the match-subword option as the regex is designed to handle those particular inflections. The problem is that we allow users to select multiple lexicons as well as add an optional custom list. And right now, the options are all combining to run on all lexicons. This need a rework. I see now that the as_regex would run on the English lists as well though it should not.
Perhaps language could to allow two separate option lists to be shown (finn/eng). And it be made clearer what options are relevant to the custom word list vs the pre-made ones. Loading the lexicons could then be made clearer.
| "'bicycles' becomes 'bicycle', 'better' becomes 'good'.", | ||
| "requires": "language==english" | ||
| }, | ||
| #it seems as if requires only allows one option, so I added another option exclusive to finnish |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not exactly true. You could use "^=lemm_" and start the eng/finn keys with lemm_ for example. But this is a poorly documented feature.
These are the changes proposed in this pull request:
Wordlists added:
Processors changed:
In the setup, SpaCy is included again to allow for lemmatization on Finnish text.