Closed DonaldTsang closed 3 years ago
Certainly! makedb.py creates the database with basic SQL commands. That program can be modified using a Postgres package (e.g. psycopg2) and the appropriate Postgres-specific SQL commands.
Looking at the schema from Derpibooru, it looks like it would be fairly straightforward to use it:
Gwern's metadata doesn't readily permit any of the other tables in the Derpibooru schema to be populated. I'm unsure if you need any of those tables for your goals.
First, what is the process for converting SQLite to PostgreSQL?
Also I have discovered something about my needs for Tag Implications (and Tag Alias Cleaning):
Tag aliases differ from implications, where both tags remain on the image. In other words, aliases are for tags referring to the same thing, while implications are for situations where one tag describes a subset of the images belonging to another tag.
Am already using DerpiDB for doing Co-occurrence tasks.
History suggests the Danbooru server itself was using PostgreSQL. If that is still the case, asking the Danbooru maintainers for a copy of the database would be the most expeditious method for PostgreSQL support.
I don't have PostgreSQL and don't have the background to support it.
A possible solution: https://github.com/bitdotioinc/pgsqlite
Is it possible to save the data into PostgreSQL instead, so that tag embedding can be done and compared between Danbooru and Derpibooru?
Cross-referencing: https://github.com/fire-eggs/Danbooru2019/tree/master/database and https://derpibooru.org/pages/data_dumps Goal: https://www.aclweb.org/anthology/L18-1156.pdf