sudachi.rs
sudachi.rs copied to clipboard
config system rework
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.Configshould be the main class for the configuration
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.
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.