Skip to content

Conversation

@anitabraida
Copy link

These are the changes proposed in this pull request:

Wordlists added:

  1. Finnish hatespeech wordlist (no offensiveness scores available)
  2. Finnish wordlist with common vocabulary

Processors changed:

  1. lexical_filter. Added Finnish hatespeech, introduced choice for the user to select the language. If the language selected is a highly inflected one (in this case, Finnish), it gives the user the option to choose between exact word match (present previously) and subword match (added in this pull request).
  2. wikipedia_network. Added the option to find Wikipedia links in a Finnish language dataset.
  3. neologisms. Added the Finnish wordlist with common vocabulary. The user has now the option to choose either English (default) or Finnish as the language. Pipeline changed accordingly.
  4. tokenise. Added Finnish wordlist with common vocabulary for the filter. Added a lemmatization option for Finnish (uses SpaCy).
  5. similar_words (presets). Included additional information.

In the setup, SpaCy is included again to allow for lemmatization on Finnish text.

anitabraida and others added 30 commits September 13, 2024 12:13
@matnel
Copy link

matnel commented Mar 1, 2025

@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.

@dale-wahl
Copy link
Member

@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?

@sal-uva
Copy link
Collaborator

sal-uva commented Mar 3, 2025

@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!

@matnel
Copy link

matnel commented Mar 4, 2025

I think we did not encounter issues, but happy to test more if that helps - any hints on what to test out?

Copy link
Member

@dale-wahl dale-wahl left a 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": {
Copy link
Member

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
Copy link
Member

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.

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.

4 participants