SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2022.acl-long.48 · ACL · 2022

Legal Judgment Prediction via Event Extraction with Constraints

Yi Feng, Chuanyi Li, Vincent Ng

Code that ran

4 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; 1 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 0 failures of our instrument; 3 no recorded run), measured 2026-11-24; 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/2022.acl-long.48.json · badge: /api/ran/2022.acl-long.48.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
WAPAY/EPM canonical (classifier label)
classifier basis: census
4 ran · 3 no recorded run
FunctionStatusWhere it lives
collect_named_entities Ran
ran on a synthesized input
WAPAY/EPM/metric.py
code served (permissive licence) · get_code("2893c9d38af61c22")
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, through the batch API) and returned list, ndim 2, dtype family float; 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 torch
import numpy as np

# The function takes a list of tags where tags follow BIO notation (Begin, Inside, Outside)
# Tags are formatted as either 'O' for outside, or '{B|I}-{EntityType}' for entities
# We need to construct a realistic list of such tags

ARGS = {
    'tokens': [
        'B-PER',      # Begin Person entity at offset 0
        'I-PER',      # Inside Person entity at offset 1
        'O',          # Outside any entity at offset 2
        'B-LOC',      # Begin Location entity at offset 3
        'I-LOC',      # Inside Location entity at offset 4
        'I-LOC',      # Inside Location entity at offset 5
        'O',          # Outside any entity at offset 6
        'B-ORG',      # Begin Organization entity at offset 7
        'O',          # Outside any entity at offset 8
        'B-PER',      # Begin another Person entity at offset 9
    ]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list 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
convert_to_token Ran
ran on a synthesized input
WAPAY/EPM/metric.py
code served (permissive licence) · get_code("367fd84ff80deac0")
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, through the batch API) and returned list, ndim 1, dtype family float; 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 torch
import numpy as np

torch.manual_seed(0)

# Construct test data for convert_to_token
# ids: a list/array of integer IDs where 0 means 'O' tag, other values are entity IDs
# id2token: a dict mapping entity IDs to token strings

ids = [0, 1, 1, 2, 0, 1, 3, 3, 0]
id2token = {
    1: "PERSON",
    2: "LOCATION",
    3: "ORGANIZATION"
}

ARGS = {
    "ids": ids,
    "id2token": id2token
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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
my_metric Ran
ran on a synthesized input
WAPAY/EPM/metric.py
code served (permissive licence) · get_code("fbbfea09a29a50b1")
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, through the batch API) and returned tuple, ndim 1, dtype family float; 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 numpy as np
from sklearn import metrics

# Create simple binary classification data
# y_true: ground truth labels (0 or 1)
# y_predict: predicted labels (0 or 1)

np.random.seed(0)

y_true = np.array([0, 1, 1, 0, 1, 1, 0, 0])
y_predict = np.array([0, 1, 0, 0, 1, 1, 0, 1])

ARGS = {
    'y_true': y_true,
    'y_predict': y_predict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — 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 float — 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
noam_scheme Ran
ran, honoured the contract we drafted
WAPAY/EPM/module.py
code served (permissive licence) · get_code("dff2504e573ffb61")
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, through the batch API) and returned EagerTensor, 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 tensorflow as tf

# Define the ARGS dictionary with valid arguments for noam_scheme
ARGS = {
    "init_lr": 0.001,  # Initial learning rate as a scalar
    "global_step": tf.constant(0, dtype=tf.int32),  # Global step as a TensorFlow scalar
    "warmup_steps": 4000.0,  # Warmup steps as a scalar (default value shown)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
dag_lstm Not yet run
unverified (harvested, no recorded run)
WAPAY/EPM/module.py
code served (permissive licence) · get_code("12085bbc88ded217")
How it ran

no invocation recorded.

label_smoothing Not yet run
unverified (harvested, no recorded run)
WAPAY/EPM/module.py
code served (permissive licence) · get_code("608fc99edb38cdcb")
How it ran

no invocation recorded.

save_variable_specs Not yet run
unverified (harvested, no recorded run)
WAPAY/EPM/utils.py
code served (permissive licence) · get_code("612d3e340e13bf41")
How it ran

no invocation recorded.

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, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 0 later) and 5 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.

FunctionAlso present inEarliest-datedOthers named
label_smoothing 2 other papers
2 dated earlier
1706.03762 (2017-06)
Attention Is All You Need
2008.05089 (2020-08)
Quaternion Graph Neural Networks
noam_scheme 1 other paper
1 dated earlier
1706.03762 (2017-06)
Attention Is All You Need

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-24.

Repositories linked to this paper

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

Abstract

While significant progress has been made on the task of Legal Judgment Prediction (LJP) in recent years, the incorrect predictions made by SOTA LJP models can be attributed in part to their failure to (1) locate the key event information that determines the judgment, and (2) exploit the cross-task consistency constraints that exist among the subtasks of LJP. To address these weaknesses, we propose EPM, an Event-based Prediction Model with constraints, which surpasses existing SOTA models in performance on a standard LJP dataset.

For agents

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

get_harvested_code_for_paper("2022.acl-long.48")
get_code_for_paper("2022.acl-long.48")
have("2022.acl-long.48")

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

curl https://syntology.ai/api/ran/2022.acl-long.48.json

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

[![Syntology run record](https://syntology.ai/api/ran/2022.acl-long.48.svg)](https://syntology.ai/paper/2022.acl-long.48)

Connect an agent — have() is free.