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

Split LangCheck into language-specific packages such as langcheck[ja], langcheck[de], etc #88

Open
kennysong opened this issue Feb 19, 2024 · 4 comments

Comments

@kennysong
Copy link
Contributor

Since some language-specific packages (e.g. fugashi for Japanese) may require extra work to install, we can simplify the installation instructions for users by allowing them to choose only the languages they want to install.

@Vela-zz
Copy link
Contributor

Vela-zz commented Mar 5, 2024

hello, kenny, I may have time add a small update for this

but I have few questions

  1. what should default install command pip install langcheck do, would it only install support for default language, like [en] e.g. or let it install supoprt for all language? install former way seem easier to realized.
  2. if split like this
dev = [
    "yapf==0.40.1",
    "flake8",
    "isort",
    "pyright",
    "pandas-stubs",
    "pytest",
    "sphinx",
    "sphinx-book-theme",
    "myst-parser",
    "ipykernel"
]
zh = [
    'hanlp >= 2.1.0b33',
]
ja = [
    'fugashi',  # For tokenizer of metrics.ja.toxicity()
    'janome >= 0.3.1',
]

the github action file may also need a small update like, pip install -e .[dev,zh,ja], e.g.

what's your opinion ?

@kennysong
Copy link
Contributor Author

kennysong commented Mar 6, 2024

Hi @Vela-zz, that would be fantastic!

  • what should default install command pip install langcheck do, would it only install support for default language, like [en] e.g. or let it install supoprt for all language? install former way seem easier to realized.

I think we can make pip install langcheck install a default language (English) to improve the default installation process.

the github action file may also need a small update like, pip install -e .[dev,zh,ja], e.g.

Agreed, we'll need to update all GH Actions, including the new Pip Install Matrix (we might want to add a third matrix dimension for "language").

dev = [
    "yapf==0.40.1",
    "flake8",
    "isort",
    "pyright",
    "pandas-stubs",
    "pytest",
    "sphinx",
    "sphinx-book-theme",
    "myst-parser",
    "ipykernel"
]
zh = [
    'hanlp >= 2.1.0b33',
]
ja = [
    'fugashi',  # For tokenizer of metrics.ja.toxicity()
    'janome >= 0.3.1',
]

@liwii do you know which dependencies in pyproject.toml are Japanese-only?

@ischender do you know which dependencies in pyproject.toml are German-only? (if any?)


I'm happy to help you with parts of this PR, e.g. I can update GitHub Actions, if you want.

@kennysong
Copy link
Contributor Author

Also, not sure if this is possible, but it might be nice to have pip install langcheck[all] which installs all languages without dev dependencies.

@ischender
Copy link
Contributor

That would be neat!
@kennysong , I am pretty sure the only German only part is that we download the translation model from Huggingface, but that happens when it's run the first time.

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

3 participants