{"id":13535166,"url":"https://github.com/howardhsu/BERT-for-RRC-ABSA","last_synced_at":"2025-04-02T00:32:47.671Z","repository":{"id":215053173,"uuid":"172388988","full_name":"howardhsu/BERT-for-RRC-ABSA","owner":"howardhsu","description":"code for our NAACL 2019 paper: \"BERT Post-Training for Review Reading Comprehension and Aspect-based Sentiment Analysis\"","archived":false,"fork":false,"pushed_at":"2021-02-05T05:58:43.000Z","size":6435,"stargazers_count":455,"open_issues_count":12,"forks_count":110,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-08-02T08:09:56.566Z","etag":null,"topics":["bert","reading-comprehension","sentiment-analysis"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/howardhsu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-02-24T20:52:37.000Z","updated_at":"2024-08-02T04:19:11.000Z","dependencies_parsed_at":"2024-01-02T08:50:38.734Z","dependency_job_id":null,"html_url":"https://github.com/howardhsu/BERT-for-RRC-ABSA","commit_stats":null,"previous_names":["howardhsu/bert-for-rrc-absa"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howardhsu%2FBERT-for-RRC-ABSA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howardhsu%2FBERT-for-RRC-ABSA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howardhsu%2FBERT-for-RRC-ABSA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howardhsu%2FBERT-for-RRC-ABSA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/howardhsu","download_url":"https://codeload.github.com/howardhsu/BERT-for-RRC-ABSA/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222788514,"owners_count":17037777,"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":["bert","reading-comprehension","sentiment-analysis"],"created_at":"2024-08-01T08:00:50.655Z","updated_at":"2024-11-02T23:30:51.120Z","avatar_url":"https://github.com/howardhsu.png","language":"Python","funding_links":[],"categories":["BERT Sentiment Analysis","Python"],"sub_categories":[],"readme":"# BERT Post-Training for Review Reading Comprehension and Aspect-based Sentiment Analysis\ncode for our NAACL 2019 paper \"[BERT Post-Training for Review Reading Comprehension and Aspect-based Sentiment Analysis](https://www.aclweb.org/anthology/N19-1242.pdf)\", COLING 2020 paper \"[Understanding Pre-trained BERT for Aspect-based Sentiment Analysis](https://arxiv.org/abs/2011.00169)\" and (draft code of) Findings of EMNLP 2020 \"[DomBERT: Domain-oriented Language Model for Aspect-based Sentiment Analysis](https://arxiv.org/abs/2004.13816)\".\n\nWe found that BERT domain post-training (e.g, 1 day of training) is an economic way to boost the performance of BERT, because it is much harder (e.g., 10 days of training) to learn a general knowledge shared across domains and, meanwhile, loosing the long-tailed domain-specific knowledge.\n\n## News\n[Code base](analab.md) for \"Understanding Pre-trained BERT for Aspect-based Sentiment Analysis\" is released.  \n[Code base](transformers.md) on huggingface `transformers` is under `transformers`, with more cross-domain models.  \nPreprocessing ABSA xmls organized into a separate [rep](https://github.com/howardhsu/ABSA_preprocessing).  \nWant to have post-trained models for other domains in reviews ? checkout a [cross-domain review BERT](transformers/amazon_yelp.md) or download from [HERE](https://drive.google.com/file/d/1YbiI9W3acj4d9JbCbu_SmRjz_tNyShYV/view?usp=sharing).   \nA conversational dataset of RRC can be found [here](https://github.com/howardhsu/RCRC).  \nIf you only care about ASC, a more formal code base can be found in a [similar rep](https://github.com/howardhsu/ASC_failure) focusing on ASC.\n**feedbacks are welcomed for missing instructions **\n\n## Problem to Solve\nWe focus on 3 review-based tasks: review reading comprehension (RRC), aspect extraction (AE) and aspect sentiment classification (ASC).\n\nRRC: given a question (\"how is the retina display ?\") and a review (\"The retina display is great.\") find an answer span (\"great\") from that review;\n\nAE: given a review sentence (\"The retina display is great.\"), find aspects(\"retina display\");\n\nASC: given an aspect (\"retina display\") and a review sentence (\"The retina display is great.\"), detect the polarity of that aspect (positive).\n\n[E2E-ABSA](https://github.com/lixin4ever/E2E-TBSA): the combination of the above two tasks as a sequence labeling task.\n\nAnd how a pre-trained BERT model on reviews be prepared for those tasks.   \n\n## Code Base\nFor post-training of NAACL 2019 paper, the code base is splited into two versions: `transformers/` ([instructions](transformers.md)) and `pytorch-pretrained-bert/` ([instructions](pytorch-pretrained-bert.md)). \n\nFor analysis of pre-trained BERT model for ABSA (COLING 2020), see this [instructions](analab.md).\n\nPlease check corresponding instructions for details.\n\n## Citation\nIf you find this work useful, please cite as following.\n```\n@inproceedings{xu_bert2019,\n    title = \"BERT Post-Training for Review Reading Comprehension and Aspect-based Sentiment Analysis\",\n    author = \"Xu, Hu and Liu, Bing and Shu, Lei and Yu, Philip S.\",\n    booktitle = \"Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics\",\n    month = \"jun\",\n    year = \"2019\",\n}\n```\n\n```\n@inproceedings{xu_understanding2020,\n    title = \"Understanding Pre-trained BERT for Aspect-based Sentiment Analysis\",\n    author = \"Xu, Hu and Shu, Lei and Yu, Philip S. and Liu, Bing\",\n    booktitle = \"The 28th International Conference on Computational Linguistics\",\n    month = \"Dec\",\n    year = \"2020\",\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhowardhsu%2FBERT-for-RRC-ABSA","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhowardhsu%2FBERT-for-RRC-ABSA","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhowardhsu%2FBERT-for-RRC-ABSA/lists"}