Skip to content

Analyze Reddit posts to understand the semantic moral reason of Social Chemistry Haidt values.

Notifications You must be signed in to change notification settings

Frankgamer97/ValuesFromText

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Values From Text

This project extract the text corpora from Social Chemistry dataset and aims to explain the moral concern’s polarity, based on the Haidt value, by analysing patterns in texts' RDFs, extended by ValueNet.

First you need to install all the required libraries with the following command:

pip install -r requirements.txt

To run the proxy server you need to execute the following command:

cd src
python app.py <-fred-api-file=[FRED FILE]> <-api-owner=[OWNER OF THE KEY]> <--no-preprocessing> <--no-rdf-downloading> <--no-valuenet> <--no-analysis>
  • -fred-api-file: specify the API key file to access FRED. If not specified the script will try to open the default file "FRED_API.txt". The file must be built as a sequence of " ". It also must be contained in the root directory.
  • -api-owner: specify the API key owner to access FRED. If the FRED Api key file contains more than one key, the amount of RDFs required to FRED is distributed to the different keys. If the FRED Api file contains only one key, this params is not mandatory but the full amount of RDFs will be downloaded by that single key. If the api owner isn't specified, the first api key is selected.
  • --no-preprocessing: avoid preprocessing of Social Chemistry dataset by upload dataframes that are claculated in a previous running instance
  • --no-rdf-downloading: avoid the download of RDFs (RDFs already exists)
  • --no-valuenet: avoid the communication with ValueNet and load all the previous dataframe obtained in a previous running instance
  • --no-analysis: avoid the analysis phase and produce directly the results

Note: ValueNet need to be installed locally on a Web Server. For this project it has been placed on a Fuseki web-server.

About

Analyze Reddit posts to understand the semantic moral reason of Social Chemistry Haidt values.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published