0
$\begingroup$

I would like to run this project and receive result from this project

However I have problem to execute the step

mailcorpus.json created by executing the sql script data/get_mail_corpus.sql on the Apache database

because this is the sql query

https://github.com/collab-uniba/Personality-Recognition-in-SD/blob/master/data/get_mail_corpus.sql

SET group_concat_max_len=18446744073709547520;

SELECT 

CONCAT(

'[',

GROUP_CONCAT(

JSON_OBJECT(

'id',messages.message_id,

'mailing_list_url',messages.mailing_list_url,

'type_of_recipient',messages_people.type_of_recipient,

'email_address',messages_people.email_address,

'message_body',messages.message_body,

'is_response_of',messages.is_response_of

) SEPARATOR ',\r'),

']') AS list

FROM messages

LEFT JOIN messages_people

ON messages.message_id = messages_people.message_id

AND messages.mailing_list_url = messages_people.mailing_list_url

WHERE email_address IN ('dr@gorsvet.kz', 'mathews@uk2.net', 'd.jentsch@fu-berlin.de', 'atul.soman@microfocus.com', 'kkrugler_lists@transpac.com', 'hcorg@minions.org.pl', 'bruno.ronchetti@mac.com', 'christophe.thiebaud@sap.com', 'kc.baltz@copart.com', 'havanki4j@gmail.com', 'joseph.obernberger@ngc.com', 'goran@roseen.se', 'hboutemy@apache.org', 'johann@gyger.name', 'fredrik@jonson.org', 'jose-marcio.martins@mines-paristech.fr', 'dmytro.kostiuchenko@gmail.com', 'jochen.wiedmann@softwareag.com', 'guyskk@qq.com', 'alejandroscandroli@gmail.com', '1983-01-06@gmx.net', 'jstrayer@proofpoint.com', 'daniel@degu.cl', 'hontvari@flyordie.com', 'david@andl.org', 'gholmes@pinsightmedia.com', 'dennis.geurts@luminis.eu', 'carlspring@gmail.com', 'jozef.koval@protonmail.ch', 'gabriele.ctn@gmail.com', 'ashish.disawal@evivehealth.com', 'aarslan2@anadolu.edu.tr', 'kshukla@yahoo-inc.com', 'alex.huang@gmail.com', 'markus@openindex.io', 'marohn@sipgate.de', 'ea@apache.org', 'krzysztof.szalast@gmail.com', 'kfoskey@tpg.com.au', 'krauss@in.tum.de', 'kenhans@hotmail.co.uk', 'jokin.c@odeian.com', 'eitch@eitchnet.ch', 'm.kristian@web.de', 'bob.sandiford@sirsidynix.com', 'asandstrom2@eastlink.ca', 'kelly@apache.org', 'antony.blakey@linkuistics.com.au', 'ashawki@hotmail.com', 'h.klocker-mark@tsn.at');

but the database is not available to make the query. How is it possible to use my own input and take the rinal results?

$\endgroup$
  • $\begingroup$ Apparently the most direct way would be to convert your data to JSON format and give this as input instead of mailcorpus.json $\endgroup$ – Erwan Aug 10 '19 at 18:58
  • $\begingroup$ @Erwan but how can I convert it as the don't make available the json format that is needed i.e. id, text etc $\endgroup$ – Nathalie Aug 10 '19 at 20:49
  • $\begingroup$ I'm not sure what you mean but I wrote an answer in case it helps :) $\endgroup$ – Erwan Aug 10 '19 at 21:16
1
$\begingroup$

Apparently the program expects a JSON file (probably) like this:

[
    {
    "id": ".......",
    "mailing_list_url": "......",
    "type_of_recipient": "......",
    "email_address": ".......",
    "message_body": "......",
    "is_response_of": "......"
    },
    {
    "id": ".......",
    "mailing_list_url": "......",
    "type_of_recipient": "......",
    "email_address": ".......",
    "message_body": "......",
    "is_response_of": "......"
    },

    ...

    {
    "id": ".......",
    "mailing_list_url": "......",
    "type_of_recipient": "......",
    "email_address": ".......",
    "message_body": "......",
    "is_response_of": "......"
    }
]

So if your data can be somehow converted to this that would be ideal, I guess. Otherwise you might have to play with the code.

Alternatively you could contact the authors by opening an issue.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.