Our great sponsors
-
For anyone else needing to tackle something like this, its definitely worth checking out [Binwalk](https://github.com/ReFirmLabs/binwalk). It is meant for extracting firmware but it works decently well on most files-in-files type data formats.
-
Thank you for posting this code on Github! There has been some reverse-engineering done on the language dictionaries bundled with Mac OS, and it's nice to know that the same model is being used on the Apple Watch!
https://josephg.com/blog/reverse-engineering-apple-dictionar...
There's also a command-line tool that can query the dictionary:
-
Sonar
Write Clean Python Code. Always.. Sonar helps you commit clean code every time. With over 225 unique rules to find Python bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work.
-
Another approach for this is to explore the format through Apple's tools for building dictionaries – as they still provide a "Dictionary Development Kit" in Xcode's downloadable "Additional Tools" package (which has documentation for the XML format).
It turns out that dictionary bundles are entirely supported by system APIs in CoreServices! The APIs are private, but Apple accidentally shipped a header file with documentation for them in the 10.7 SDK [1].
[1] https://github.com/phracker/MacOSX-SDKs/blob/master/MacOSX10...
-
No, the ICU dictionaries are seen at: https://github.com/unicode-org/icu/tree/main/icu4c/source/da...
No idea where the corresponding files are in osx.
-
> Otherwise I think it lacks structure and can't be harvested automatically easily
Indeed, it depends on the language and your goals - I had a very high success rate plucking out Russian grammatical tables from English Wiktionary with a few hours of scripting the data cleaning (https://github.com/thombles/declensions). I have a theory that you could get better results using an offline archive of the page sources but haven't tried this yet.
-
I also found this Dictionary API which imports the dictionaries into NodeJs by utilizing a utility called „dedict“.
https://github.com/nikvdp/dictionary-api/blob/master/convert...
-
Thank you I didn't know about this Binwalk.
I used it and was able to figure out the remaining bits of the file format thanks to you and other tips in this thread.
-
InfluxDB
Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.