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

Problem with loading Morfeusz at MacOS #2

Open
wojtek11530 opened this issue Nov 7, 2023 · 0 comments
Open

Problem with loading Morfeusz at MacOS #2

wojtek11530 opened this issue Nov 7, 2023 · 0 comments

Comments

@wojtek11530
Copy link

wojtek11530 commented Nov 7, 2023

I wanted to test your model, but I have not managed to do that on MacOS.

I installed it using the wheel from HuggingFace:

pip install https://huggingface.co/ipipan/pl_nask/resolve/main/pl_nask-any-py3-none-any.whl

Firstly, it lacks morfeusz2 and pexpect and maybe other libs listed in repo requirements.txt so I needed to install it manually.

It goes fine when running using Ubuntu OS.

Unfortunately, I cannot load the model on MacOS (Darwin platform) because there is a wrong signature in loading Morfeusz object:

Traceback (most recent call last):
  File "/Users/wojciech/projects/clusters-topic/src/lemmatizer_run pl.py", line 27, in <module>
    nlp = spacy.load("pl_nask")
  File "/Users/wojciech/projects/clusters-topic/.venv/lib/python3.10/site-packages/spacy/__init__.py", line 54, in load
    return util.load_model(
  File "/Users/wojciech/projects/clusters-topic/.venv/lib/python3.10/site-packages/spacy/util.py", line 442, in load_model
    return load_model_from_package(name, **kwargs)  # type: ignore[arg-type]
  File "/Users/wojciech/projects/clusters-topic/.venv/lib/python3.10/site-packages/spacy/util.py", line 478, in load_model_from_package
    return cls.load(vocab=vocab, disable=disable, enable=enable, exclude=exclude, config=config)  # type: ignore[attr-defined]
  File "/Users/wojciech/projects/clusters-topic/.venv/lib/python3.10/site-packages/pl_nask/__init__.py", line 12, in load
    return load_model_from_init_py(__file__, **overrides)
  File "/Users/wojciech/projects/clusters-topic/.venv/lib/python3.10/site-packages/spacy/util.py", line 659, in load_model_from_init_py
    return load_model_from_path(
  File "/Users/wojciech/projects/clusters-topic/.venv/lib/python3.10/site-packages/spacy/util.py", line 516, in load_model_from_path
    nlp = load_model_from_config(
  File "/Users/wojciech/projects/clusters-topic/.venv/lib/python3.10/site-packages/spacy/util.py", line 564, in load_model_from_config
    nlp = lang_cls.from_config(
  File "/Users/wojciech/projects/clusters-topic/.venv/lib/python3.10/site-packages/spacy/language.py", line 1819, in from_config
    nlp.add_pipe(
  File "/Users/wojciech/projects/clusters-topic/.venv/lib/python3.10/site-packages/spacy/language.py", line 791, in add_pipe
    pipe_component = self.create_pipe(
  File "/Users/wojciech/projects/clusters-topic/.venv/lib/python3.10/site-packages/spacy/language.py", line 679, in create_pipe
    resolved = registry.resolve(cfg, validate=validate)
  File "/Users/wojciech/projects/clusters-topic/.venv/lib/python3.10/site-packages/confection/__init__.py", line 756, in resolve
    resolved, _ = cls._make(
  File "/Users/wojciech/projects/clusters-topic/.venv/lib/python3.10/site-packages/confection/__init__.py", line 805, in _make
    filled, _, resolved = cls._fill(
  File "/Users/wojciech/projects/clusters-topic/.venv/lib/python3.10/site-packages/confection/__init__.py", line 877, in _fill
    getter_result = getter(*args, **kwargs)
  File "/Users/wojciech/projects/clusters-topic/.venv/lib/python3.10/site-packages/pl_nask/morf.py", line 40, in make_morfeusz
    return Morfeusz(nlp, name, mode=mode, overwrite=overwrite, scorer=scorer)
  File "/Users/wojciech/projects/clusters-topic/.venv/lib/python3.10/site-packages/pl_nask/morf.py", line 51, in __init__
    self.morf = morfeusz2.Morfeusz(expand_tags=True, praet="composite")
TypeError: MorfInterface.__init__() got an unexpected keyword argument 'praet'
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

1 participant