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 ('[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]');

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$
3
  • $\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
    Commented Aug 10, 2019 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
    Commented Aug 10, 2019 at 20:49
  • $\begingroup$ I'm not sure what you mean but I wrote an answer in case it helps :) $\endgroup$
    – Erwan
    Commented Aug 10, 2019 at 21:16

1 Answer 1

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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