OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Swem

SWEM is a Python and TensorFlow research implementation of simple word-embedding-based text models and pooling methods, with code and prepared data for reproducing classification experiments described in an ACL 2018 paper.

Independent OpenViST project profile, based on linked sources.

Swem — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use SWEM when you need the repository’s specific word-embedding classification experiments and can work with its documented Python 2.7, CUDA, cuDNN and TensorFlow prerequisites.

Who it is for

  • Researchers reproducing the paper’s text classification experiments.
  • Developers studying word-embedding representations and pooling methods.

Documented uses

  • Run ontology classification experiments with DBpedia data.
  • Run natural language inference experiments with SNLI data.
  • Run topic categorization experiments with Yahoo Answers data.
  • Compare SWEM and CNNs through subspace training for intrinsic-dimension experiments.
Before you choose

Requirements & limits

  • The README specifies Python 2.7 and TensorFlow above 1.0, with TensorFlow 1.5 used by the authors.
  • The prepared datasets are available as pickle files and vary considerably in size.
  • Evaluation settings can be adjusted in the option class, including embedding size, dropout keep rate, learning rate, batch size and hidden-layer dimension.
  • The README reports approximate training time on a K80 GPU; those estimates are hardware-specific.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Run an included evaluation script

Reproduce one of the repository’s documented DBpedia, SNLI or Yahoo evaluation runs.

Before you start

  • Python 2.7
  • CUDA and cuDNN
  • TensorFlow version above 1.0; the authors used TensorFlow 1.5
  • Install dependencies with pip install -r requirements.txt
  • Download the prepared dataset for the chosen task and place it in a data folder

Steps

  1. Choose DBpedia ontology classification, SNLI natural language inference, or Yahoo topic categorization.

  2. Download the corresponding prepared pickle data; SNLI also lists a separate word-embeddings file.

  3. Place the downloaded data in a data folder.

  4. Run the command below, the command below, or the command below for the selected task.

    Documented command
    python eval_dbpedia_emb.py
    Documented command
    python eval_snli_emb.py
    Documented command
    python eval_yahoo_emb.py

Expected outcome

The corresponding task evaluation script runs against the selected prepared dataset.

Guide limitations

  • The README documents legacy prerequisites, including Python 2.7 and TensorFlow 1.x-era usage.
  • Dataset downloads are substantial: DBpedia is listed at 591 MB, SNLI at 101 MB plus a 129 MB word-embeddings file, and Yahoo at 1.7 GB.
  • The repository’s approximate training times are reported for a K80 GPU and should not be treated as a guarantee for other hardware.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
18 October 2026
Original website title
dinghanshen/SWEM · Official homepage title · retained in its source language