sudachi.rs icon indicating copy to clipboard operation
sudachi.rs copied to clipboard

config system rework

Open mh-northlander opened this issue 1 year ago • 2 comments

current configuration system is a bit difficult to use: e.g. how the arguments of config::new(config_path, resource_dir, system_dict) interacts?

  • let it align with Java version
    • add PathAnchor to resolve resource file paths
  • embed default non-dictionary data to the binary
  • for Python, sudachipy.Config should be the main class for the configuration

mh-northlander avatar Dec 09 '24 00:12 mh-northlander

IMHO, Sudachi.rs does not need the PathAnchor functionality from Java because there is no classpath (albeit Python modules can serve as one). But I agree that in the current incarnation it is not clear how parameters interact.

eiennohito avatar Dec 21 '24 08:12 eiennohito

I'm considering to add the anchor for embedded resources. In most cases it would be enough to use embedded ones as default fallback, but we may want to turn off or use other on-memory resources.

mh-northlander avatar Dec 26 '24 01:12 mh-northlander