{"id":23810718,"url":"https://github.com/draperunner/fjlc","last_synced_at":"2026-04-28T01:30:17.705Z","repository":{"id":57429893,"uuid":"87452707","full_name":"draperunner/fjlc","owner":"draperunner","description":"A Python port of the Fredriksen–Jahren Lexicon Classifier","archived":false,"fork":false,"pushed_at":"2017-04-17T14:31:15.000Z","size":40830,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-03T13:05:55.503Z","etag":null,"topics":["idi","ntnu","sentiment","sentiment-analysis","sentiment-classification","twitter","twitter-sentiment-analysis"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/draperunner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-06T16:43:39.000Z","updated_at":"2018-02-28T14:44:36.000Z","dependencies_parsed_at":"2022-08-27T16:41:04.644Z","dependency_job_id":null,"html_url":"https://github.com/draperunner/fjlc","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/draperunner%2Ffjlc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/draperunner%2Ffjlc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/draperunner%2Ffjlc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/draperunner%2Ffjlc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/draperunner","download_url":"https://codeload.github.com/draperunner/fjlc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240063928,"owners_count":19742227,"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","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":["idi","ntnu","sentiment","sentiment-analysis","sentiment-classification","twitter","twitter-sentiment-analysis"],"created_at":"2025-01-02T00:18:13.066Z","updated_at":"2026-04-28T01:30:17.645Z","avatar_url":"https://github.com/draperunner.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lexicon Classifier\n\nSource code: https://github.com/draperunner/fjlc\n\nThis package is a Python port of the Lexicon Creator and Classifier of Valerij Fredriksen and Brage Ekroll Jahren (2016).\nIt is compatible with Python version \u003e= 3.\n\nThe original Java code is available here: https://github.com/freva/Masteroppgave\n\nIf using this package in your publications, please cite\n\u003e Valerij Fredriksen and Brage Ekroll Jahren. Twitter Sentiment Analysis: Exploring Automatic Creation of Sentiment Lexica. Master's thesis, 2016.\n\n## Installation\n```bash\npip install fjlc\n```\n\n## Lexicon Classifier\nThe `LexiconClassifier` uses the best performing lexicon of Fredriksen and Jahren. You can specify your own lexicon, see Options below.\n\n### Usage\n```python\nfrom fjlc import LexiconClassifier\nlc = LexiconClassifier()\n```\n\nYou can classify a single tweet or a list of tweets:\n```\nlc.classify(\"I am happy!\")  # 'POSITIVE'\nlc.classify([\"I am happy!\", \"I hate rain\"])  # ['POSITIVE', 'NEGATIVE']\n```\n\nYou can get the sentiment value of a single tweet or multiple tweets\n```\nlc.calculate_sentiment(\"I am happy!\")  # 5.599244615570646\nlc.calculate_sentiment([\"I am happy!\", \"I hate rain\"])  # [5.599244615570646, -2.767224666516315]\n```\n\n### Options\nThe `LexiconClassifier` takes three options:\n* `lexicon`: Path to sentiment lexicon file\n* `options`: Path to options file\n* `dictionary`: Path to canonical dictionary\n\n## Lexicon Creator\n### Usage\n```python\nfrom fjlc import LexiconCreator\nlc = LexiconCreator()\n```\nIncomplete, untested.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdraperunner%2Ffjlc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdraperunner%2Ffjlc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdraperunner%2Ffjlc/lists"}