How to access macOS dictionaries without Dictionary.app
Apple's Dictionaries are compiled data structures, and Apple publishes no documentation on the format.
This blog provides a detailed description of reverse-engineering Apple's dictionaries.
https://josephg.com/blog/reverse-engineering-apple-dictionaries/
(I know it's customary to provide an account of the link, but it's a very detailed and complex process.)
There are of course a wide range of existing open source dictionaries.