Convert to Alchemy and MLN boost format

From SQL to Alchemy

In order to convert the existing tables in the MySQL database into Alchemy format, run Read.java . This may work for database systems other than MySQL, but we haven't tested it on anything else.
You must change the db address and user name and password inside the source code and it will ready to use.
The output of this scripts contains two files:

Click here to download source files and examples.

From Alchemy to MLNboost

In order to convert the Alchemy files to the input format for MLNBoost, run BGPosNegGenerator.perl. This Perl script requires 2 files as input:

The .db file contains all the positive examples available in the database and can be generated using Alchemy source code written in Java.
The attribute file contains all the possible values for each attribute.
They should all have the same size so if one attribute has 5 possible values and the other 2 possible values, just put 3 commas at the end of it.

Warning: we do not generate negative examples for relationships. Generating all such negative examples takes a large amount of space. Different researchers provide different subsampling schemes for functional gradient boosting with links as target predicates.

Click here to download source files and examples.