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

Argument error with Stopwords::Snowball::WordSieve.new #21

Open
PatrickMcSweeny opened this issue Mar 9, 2022 · 1 comment
Open

Argument error with Stopwords::Snowball::WordSieve.new #21

PatrickMcSweeny opened this issue Mar 9, 2022 · 1 comment

Comments

@PatrickMcSweeny
Copy link

After updating from 0.4.1 to 0.7.0, initializing the Stopwords::Snowball::WordSieve class produces the following error:

ArgumentError: Unknown locale: "fn"

I was able to get rid of the error by manually deleting the 'fn' file in lib/stopwords/snowball/locales folder.

@hopsoft
Copy link

hopsoft commented Sep 8, 2023

Here's a helper method to do this at runtime for anyone using this gem in the future.

def fix_stopwords_locales!
  dir = Gem::Specification.find_by_name("stopwords-filter").gem_dir
  path = File.join(dir, "lib/stopwords/snowball/locales/fn.csv")
  FileUtils.rm path if File.exist?(path)
end

I'll likely submit a pull request with a real fix to the maintained fork of this repo: https://github.com/aaronstillwell/stopwords-filter2

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

No branches or pull requests

2 participants