Skip to content

migrate langdetect to langid.py; avoid needless loading #1208

@leondz

Description

@leondz

langdetect offers slower and less accurate support for a smaller range of languages than langid.py

see e.g. pg 28 of https://aclanthology.org/P12-3005.pdf

proposal:

  • replace langdetect dep with langid
  • update garak/langproviders/base.py to match langid interface
  • don't load this unless required (inside garak.langproviders.base.is_meaning_string())

Metadata

Metadata

Assignees

No one assigned

    Labels

    language servicePrompt assembly, language mapping, and translation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions