SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1508.01745 · 2015

Semantically Conditioned LSTM-based Natural Language Generation for Spoken Dialogue Systems

arXiv · PDF · Open in the Atlas

Code that ran

7 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 4 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1508.01745.json · badge: /api/ran/1508.01745.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
andy194673/nlg-sclstm-multiwoz reimplementation (classifier label)
classifier basis: classifier_2025
4 ran · 0 no recorded run
mrcmoresi/sc-lstm reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
evaluate Ran
ran, honoured the contract we drafted
mrcmoresi/sc-lstm/run_woz3.py
pointer only (licence: NONE) · get_code("c12514be986c9428")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mrcmoresi/sc-lstm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

evaluate Ran
ran, honoured the contract we drafted
andy194673/nlg-sclstm-multiwoz/run_woz3.py
code served (permissive licence) · get_code("225f381678eb983a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import tempfile
import os

torch.manual_seed(0)

# Create a minimal model that satisfies the function's usage
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, input_var, dataset, feats_var, gen=False, beam_search=False, beam_size=1):
        # Return decoded_words in shape (batch_size, beam_size)
        # Each element is a string
        batch_size = input_var.shape[0]
        decoded_words = [
            ['slot-booking-book-name slot-booking-book-time'] * beam_size
            for _ in range(batch_size)
        ]
        return decoded_words
    
    def get_loss(self, label_var, lengths):
        # Return a scalar loss tensor
        return torch.tensor(0.5)
    
    def eval(self):
        super().eval()
        return self

# Create a minimal dataset class
class MinimalDataset:
    def __init__(self):
        self.n_batch = {'valid': 1, 'test': 1}
        self.dfs = [0, 1, 2]
        self.cardinality = {
            2: 'd-a-s-v:Booking-Book-Day-1',
            3: 'd-a-s-v:Booking-Book-Name-1',
            4: 'd-a-s-v:Booking-Book-Name-2'
        }
        # Create a temporary template file
        self.template_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
        self.template_file.write('d-a-s-v:Booking-Book-Day-1\n')
        self.template_file.write('d-a-s-v:Booking-Book-Name-1\n')
        self.template_file.write('d-a-s-v:Booking-Book-Name-2\n')
        self.template_file.close()
        self.template = self.template_file.name
        self.batch_idx = 0
    
    def next_batch(self, data_type='valid'):
        # Return: input_var, label_var, feats_var, lengths, refs, featStrs, sv_indexes
        batch_size = 2
        beam_size = 1
        
        input_var = torch.randn(batch_size, 4)
        label_var = torch.randint(0, 10, (batch_size, 5))
        feats_var = torch.randn(batch_size, 4)
        lengths = [5, 5]
        refs = ['slot-booking-book-name slot-booking-book-time'] * batch_size
        featStrs = ['feat_str_0', 'feat_str_1']
        sv_indexes = [[0, 1], [1, 2]]
        
        self.batch_idx += 1
        return input_var, label_var, feats_var, lengths, refs, featStrs, sv_indexes
    
    def __del__(self):
        if hasattr(self, 'template_file'):
            try:
                os.unlink(self.template)
            except:
                pass

# Create a minimal config
config = {
    'model_type': 'test',
    'hidden_size': 4
}

# Instantiate objects
dataset = MinimalDataset()
model = MinimalModel()

ARGS = {
    'config': config,
    'dataset': dataset,
    'model': model,
    'data_type': 'valid',
    'beam_search': False,
    'beam_size': 1,
    'batch_size': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_slot_error Ran
ran; our contract draft was wrong, not the code
mrcmoresi/sc-lstm/run_woz3.py
pointer only (licence: NONE) · get_code("771b8d83423da0b0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mrcmoresi/sc-lstm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_slot_error Ran
ran; our contract draft was wrong, not the code
andy194673/nlg-sclstm-multiwoz/run_woz3.py
code served (permissive licence) · get_code("ed3de5a69932a38f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import tempfile
import os

# Create a minimal dataset class with required attributes
class MinimalDataset:
    def __init__(self):
        # cardinality maps slot indices to slot token strings
        self.cardinality = {
            0: 'd-a-s-v:Booking-Book-Day',
            1: 'd-a-s-v:Booking-Book-Name',
            2: 'd-a-s-v:Booking-Book-Time',
            3: 'd-a-s-v:Booking-Book-People',
        }
        # dfs is used as an offset: cardinality[x + dfs[2]]
        self.dfs = [0, 0, 0]  # dfs[2] = 0, so x + dfs[2] = x
        
        # Create a temporary template file with valid d-a-s-v entries
        self.template_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
        template_content = """some line without dasv
d-a-s-v:Booking-Book-Day-1 some context
d-a-s-v:Booking-Book-Name-1 some context
d-a-s-v:Booking-Book-Name-2 some context
d-a-s-v:Booking-Book-Time-1 some context
d-a-s-v:Booking-Book-People-1 some context
d-a-s-v:Booking-Book-Day-none should be skipped
d-a-s-v:Booking-Book-Name-? should be skipped
d-a-s-v:Booking-Book-Time-yes should be skipped
d-a-s-v:Booking-Book-People-no should be skipped
"""
        self.template_file.write(template_content)
        self.template_file.close()
        self.template = self.template_file.name
    
    def __del__(self):
        if hasattr(self, 'template_file'):
            try:
                os.unlink(self.template)
            except:
                pass

# Create dataset instance
dataset = MinimalDataset()

# batch_size = 2, beam_size = 3
batch_size = 2
beam_size = 3

# gens: (batch_size, beam_size) - list of lists of generated strings
gens = [
    [
        'xxx @boo-book-day xxx @boo-book-name xxx',
        '@boo-book-day @boo-book-name @boo-book-time',
        '@boo-book-name @boo-book-name @boo-book-time @boo-book-time',
    ],
    [
        '@boo-book-day @boo-book-name',
        'xxx @boo-book-time xxx',
        '@boo-book-day @boo-book-name @boo-book-time @boo-book-people',
    ]
]

# refs: (batch_size,) - reference indices (not used in get_slot_error but required)
refs = [0, 1]

# sv_indexes: (batch_size,) - list of lists of slot value indices
# Each inner list contains indices into cardinality dict
sv_indexes = [
    [0, 1, 2],  # indices for first batch sample
    [1, 2, 3],  # indices for second batch sample
]

ARGS = {
    'dataset': dataset,
    'gens': gens,
    'refs': refs,
    'sv_indexes': sv_indexes,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
score Ran
ran, honoured the contract we drafted
mrcmoresi/sc-lstm/run_woz3.py
pointer only (licence: NONE) · get_code("faf421c0fe195b81")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mrcmoresi/sc-lstm when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

score Ran
ran, honoured the contract we drafted
andy194673/nlg-sclstm-multiwoz/run_woz3.py
code served (permissive licence) · get_code("2d9e4c619f62021f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned tuple, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
import os

# Create a temporary template file with sample d-a-s-v entries
template_content = """some header line
d-a-s-v:Booking-Book-Day-1
d-a-s-v:Booking-Book-Name-1
d-a-s-v:Booking-Book-Name-2
d-a-s-v:Booking-Book-Time-1
d-a-s-v:Booking-Book-Time-none
d-a-s-v:Booking-Book-Time-?
d-a-s-v:Booking-Book-Time-yes
d-a-s-v:Booking-Book-Time-no
"""

# Write to a temporary file
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write(template_content)
temp_file.close()

feat = [
    'd-a-s-v:Booking-Book-Day-1',
    'd-a-s-v:Booking-Book-Name-1',
    'd-a-s-v:Booking-Book-Name-2'
]

gen = 'xxx slot-boo-book-day xxx slot-boo-book-name xxx slot-boo-book-name slot-boo-book-time'

template = temp_file.name

ARGS = {
    'feat': feat,
    'gen': gen,
    'template': template
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
score_woz3 Ran
ran; our contract draft was wrong, not the code
andy194673/nlg-sclstm-multiwoz/bleu.py
code served (permissive licence) · get_code("f5a233167ed9efc4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
import os

# Create a temporary file with the expected format
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("""Feat: color
Target: red
Base: red color
Gen: red hue
Feat: size
Target: large
Base: large object
Gen: big item
""")
temp_file.close()

ARGS = {
    'res_file': temp_file.name,
    'ignore': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Natural language generation (NLG) is a critical component of spoken dialogue and it has a significant impact both on usability and perceived quality. Most NLG systems in common use employ rules and heuristics and tend to generate rigid and stylised responses without the natural variation of human language. They are also not easily scaled to systems covering multiple domains and languages. This paper presents a statistical language generator based on a semantically controlled Long Short-term Memory (LSTM) structure. The LSTM generator can learn from unaligned data by jointly optimising sentence planning and surface realisation using a simple cross entropy training criterion, and language variation can be easily achieved by sampling from output candidates. With fewer heuristics, an objective evaluation in two differing test domains showed the proposed method improved performance compared to previous methods. Human judges scored the LSTM system higher on informativeness and naturalness and overall preferred it to the other systems.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1508.01745")
get_code_for_paper("1508.01745")
have("1508.01745")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1508.01745.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1508.01745.svg)](https://syntology.ai/paper/1508.01745)

Connect an agent — have() is free.