You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that the in memory and builder representations of an Affix or Dictionary (WordList) can be modified in memory (#41), people want to be able to save those changes back to disk.
Between encodings, comments, and ordering I think any hopes of fully saving files while preserving the original loaded content is totally infeasible. Instead, here are some strategies that might be more feasible to implement:
Save the WordList and AffixConfig to their respective files in whatever way the developer chooses so long as the data can round-trip 100%
Provide dedicated types separate from AffixConfig and WordList that can surgically mutate those files.
As of v6, the AffixConfig is still effectively immutable, so writing to files is only critical for the WordList.
Workaround
To persist WordList mutations, persist "intents" instead of the actual WordList. When making modifications to a WordList, persist those modifications to an implementation specific format. This way, after loading a file pair you can re-play those modifications against the in memory representation.
Now that the in memory and builder representations of an Affix or Dictionary (WordList) can be modified in memory (#41), people want to be able to save those changes back to disk.
Between encodings, comments, and ordering I think any hopes of fully saving files while preserving the original loaded content is totally infeasible. Instead, here are some strategies that might be more feasible to implement:
As of v6, the AffixConfig is still effectively immutable, so writing to files is only critical for the WordList.
Workaround
To persist WordList mutations, persist "intents" instead of the actual WordList. When making modifications to a WordList, persist those modifications to an implementation specific format. This way, after loading a file pair you can re-play those modifications against the in memory representation.
Example: changes.txt
The text was updated successfully, but these errors were encountered: