comet-commonsense  by atcbosselut

Code for a commonsense knowledge graph construction research paper

created 6 years ago
686 stars

Top 50.5% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides code for the ACL 2019 paper "COMET: Commonsense Transformers for Automatic Knowledge Graph Construction." It enables researchers and NLP practitioners to build knowledge graphs using commonsense reasoning, offering pre-trained models and scripts for training, evaluation, and generation on ATOMIC and ConceptNet datasets.

How It Works

The project leverages transformer models to generate commonsense knowledge graph tuples. It processes structured knowledge bases like ATOMIC and ConceptNet, mapping relations to natural language or learning relation embeddings. This approach allows for the automatic construction of knowledge graphs by inferring implicit commonsense relationships between concepts.

Quick Start & Requirements

  • Install: Clone the repo, run bash scripts/setup/*.sh to download models and data, then install dependencies via conda and pip.
  • Prerequisites: Python 3.6, PyTorch >= 1.0, spaCy, TensorFlow, ftfy, tensorboardX, tqdm, pandas, ipython. Requires Python 2.7 for the classification script.
  • Setup: Requires downloading large datasets and pre-trained models.
  • Docs: arXiv Paper

Highlighted Details

  • Supports ATOMIC and ConceptNet datasets.
  • Offers multiple generation strategies: greedy, top-k, and beam search.
  • Includes a classifier for evaluating generated tuples.
  • Provides interactive modes for generating ATOMIC event effects and ConceptNet tuples.

Maintenance & Community

The project is associated with Antoine Bosselut and Yejin Choi, authors of the COMET paper. No specific community channels or active development signals are present in the README.

Licensing & Compatibility

The repository's license is not explicitly stated in the README. The inclusion of OpenAI models and the nature of academic research code suggest potential usage restrictions.

Limitations & Caveats

The README mentions a bug in beam search scoring that impacts reproducibility of exact paper results if not explicitly enabled. The classification script requires a separate Python 2.7 installation.

Health Check
Last commit

2 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
10 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.