{"id":18439504,"url":"https://github.com/idiap/emorec","last_synced_at":"2025-07-30T03:13:49.819Z","repository":{"id":24504878,"uuid":"27910432","full_name":"idiap/emorec","owner":"idiap","description":"Emotion-based Recommendation Generator","archived":false,"fork":false,"pushed_at":"2015-01-21T10:23:42.000Z","size":18132,"stargazers_count":9,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-14T16:19:53.722Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"OpenEdge ABL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idiap.png","metadata":{"files":{"readme":"README.txt","changelog":null,"contributing":null,"funding":null,"license":"COPYING.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-12T07:38:23.000Z","updated_at":"2025-02-11T16:18:19.000Z","dependencies_parsed_at":"2022-08-22T09:30:41.475Z","dependency_job_id":null,"html_url":"https://github.com/idiap/emorec","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/idiap/emorec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Femorec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Femorec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Femorec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Femorec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idiap","download_url":"https://codeload.github.com/idiap/emorec/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idiap%2Femorec/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267803162,"owners_count":24146516,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T06:25:11.695Z","updated_at":"2025-07-30T03:13:49.783Z","avatar_url":"https://github.com/idiap.png","language":"OpenEdge ABL","funding_links":[],"categories":[],"sub_categories":[],"readme":"############################################################################\n\n             Emotion-Based Recommendation Generator (EMORec v1.0)      \n\n############################################################################\n\n\nREADME:\n=======\nA Python library which performs emotion-based analysis and recommendation using a \nmultiple-instance regression algorithm for a set of multimedia items described by \ntranscripts. The algorithm is trained over 1200 TED talks using the original human-\nmade transcripts and the corresponding community emotion labels. The library can be \nused in command line or directly in a Python program. It takes as input a JSON file \nwhich contains an array of dictionaries that describe the metadata of multimedia items \nand generates an output JSON file which contains the same items augmented with the \nfollowing attributes:\n\n    emotion_classes         The class names of 12 TED community emotion labels\n    emotion_scores          Estimated values for 12 TED community emotion labels\t\t\n    emotion_rec             Recommended items based on these emotions\t\n    emotion_rec_scores      Confidence of the recommended item\n    emotion_segments        Textual segments that were used\n        text                The actual textual content of the segment\n        start_time          Starting time of the segment\n        end_time            Ending time of the segment\n        relevance_scores    Relevance which reveals the contribution of the segment \n                            to the prediction of the 14 emotion dimensions.\n\nFILES:\n======\nThe library contains the following files:\n   \n    ap_weights.py     Data class for items (text extraction, preprocessing)\n    crls.py           Vector space class supporting TF-IDF, LSI, RP and LDA\n    generate.py       Main class responsible for generating recommendations\n    data/             Data to be used for training\n    models/           Pre-trained regression models on TED for emotion prediction\n    parameters/       Optimal values obtained from cross-validation to be used\n                      for training and prediction\n           \n\nUSAGE:\n======\nUSAGE: python generate.py -input=\u003cpath\u003e -output=\u003cpath\u003e\n\t-input\t Path location of the input file in JSON format\n\t-output\t Path location of the output file in JSON format\n\nEXAMPLE:\n========\n$  python generate.py --input=input.json --output=output.json --debug\n{'--debug': True,\n '--display': False,\n '--help': False,\n '--input': 'input.json',\n '--output': 'output.json',\n '--version': False}\n[+] Loading items:....................................[OK]\n[+] Modeling emotions:\n        -\u003e Unconvincing...............................[OK]\n        -\u003e Fascinating................................[OK]\n        -\u003e Persuasive.................................[OK]\n        -\u003e Ingenious..................................[OK]\n        -\u003e Longwinded.................................[OK]\n        -\u003e Funny......................................[OK]\n        -\u003e Inspiring..................................[OK]\n        -\u003e Jaw-dropping...............................[OK]\n        -\u003e Courageous.................................[OK]\n        -\u003e Beautiful..................................[OK]\n        -\u003e Confusing..................................[OK]\n        -\u003e Obnoxious..................................[OK]\n[+] Generating recommendations........................[OK]\n[+] Saving to output file.............................[OK]\n[x] Finished.\n\nDEPENDENCIES:\n============\n1) Install python: http://www.python.org/getit/\n2) Install pip: http://www.pip-installer.org/en/latest/installing.html\n3) Then:\n$ pip install docopt\n$ pip install json\n$ pip install pyyaml\n$ pip install numpy\n$ pip install scipy\n$ pip install gensim\n$ pip install nltk\n$ python\n\u003e\u003e\u003e import nltk\n\u003e\u003e\u003e nltk.download()\n\nTROUBLESHOOTING:\n================ \nQ: How can I use the library with items stored in other formats than JSON?\nA: You have to convert your file to JSON.\nQ: How can I use the library directly inside a Python program?\nA: Simply import the library in Python and initialize a generator object with \n   the item dictionary of your preference.\nQ: Is there any attribute that is required to be present in the item metadata?\nA: Yes the 'id' attribute is mandatory.\n\nCONTACT:\n========\nNikolaos Pappas \nIdiap Research Institute\nCentre du Parc, \nCH 1920 Martigny, \nSwitzerland\nE-mail:  nikolaos.pappas@idiap.ch \nWebsite: http://people.idiap.ch/npappas/ \n\n---\nLast update:\n8 Jul, 2014","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidiap%2Femorec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidiap%2Femorec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidiap%2Femorec/lists"}