SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2005.07421 · ACL · 2020

Spelling Error Correction with Soft-Masked BERT

Hang Li, Haoran Huang, Shaohua Zhang, Jicong Liu

arXiv · PDF · Open in the Atlas

Code that ran

14 of 17 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 12 have no contract verdict; 1 failure of our instrument; 3 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/2005.07421.json · badge: /api/ran/2005.07421.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
gitabtion/BertBasedCorrectionModels community (classifier label)
classifier basis not recorded on the link
6 ran · 1 no recorded run
mszpc/SoftMaskedBert community (classifier label)
classifier basis not recorded on the link
4 ran · 1 no recorded run
nocoolsandwich/pinyin_gen_error_sentence community
Papers with Code archive
2 ran · 0 no recorded run
lemon234071/TransformerBaselines community
Papers with Code archive
1 ran · 1 no recorded run
hiyoung123/SoftMaskedBert community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
BiGRU Ran
ran on a synthesized input
nocoolsandwich/pinyin_gen_error_sentence/model/soft_masked_bert.py
pointer only (licence: NONE) · get_code("a728cf7fd8651ddf")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, nocoolsandwich/pinyin_gen_error_sentence 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.

BiGRU Ran
ran on a synthesized input
lemon234071/TransformerBaselines/agents/bert/soft_masked_bert/soft_masked_bert.py
code served (permissive licence) · get_code("3e404afd004bb929")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, 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 torch.nn as nn

class BiGRU(nn.Module):
    """
    decotor 使用 BiGRU
    """

    def __init__(self, embedding_size, hidden, n_layers, dropout=0.0):
        super(BiGRU, self).__init__()
        self.rnn = nn.GRU(embedding_size, hidden, num_layers=n_layers, bidirectional=True, dropout=dropout, batch_first=True)
        self.cls = nn.Sequential(nn.Linear(hidden * 2, 1), nn.Sigmoid())

    def forward(self, x):
        rnn_out, _ = self.rnn(x)
        prob = self.cls(rnn_out)
        return prob


INIT_ARGS = {
    'embedding_size': 4,
    'hidden': 8,
    'n_layers': 2,
    'dropout': 0.1
}

ARGS = {
    'x': torch.randn(2, 3, 4)
}

if __name__ == '__main__':
    model = BiGRU(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
SoftMaskedBert Ran
ran on a synthesized input · constructed an object; no result was computed
nocoolsandwich/pinyin_gen_error_sentence/model/soft_masked_bert.py
pointer only (licence: NONE) · get_code("b722732fc955e68c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, nocoolsandwich/pinyin_gen_error_sentence 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.

SoftMaskedBert Ran
ran on a synthesized input · constructed an object; no result was computed
hiyoung123/SoftMaskedBert/model/soft_masked_bert.py
pointer only (licence: NONE) · get_code("3f71761e83e0177e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, hiyoung123/SoftMaskedBert 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.

compute_correction_prf Ran
ran on a synthesized input
mszpc/SoftMaskedBert/softmaskedbert/src/utils.py
code served (permissive licence) · get_code("c06aca58c0b60862")
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 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 numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - results2[i] is indexed with [1] and [2], suggesting it's a sequence/list with at least 3 elements
# - results2[i][1][j] and results2[i][2][j] are compared, suggesting they're sequences of words/tokens
# - all_predict_true_index[i] is iterable (used in for loop and if check)
# - all_gold_index[i] is iterable
# - The function compares predicted words with gold words

# results2 structure: list of items where each item has [something, gold_words, predicted_words]
# all_predict_true_index: list of lists containing indices of predicted corrections
# all_gold_index: list of lists containing indices of gold corrections

# Construct small example data
results2 = [
    # Item 0: [unused, gold_words_list, predicted_words_list]
    [None, ["the", "cat", "sat"], ["the", "dog", "sat"]],
    # Item 1: [unused, gold_words_list, predicted_words_list]
    [None, ["a", "bird", "flew"], ["a", "bird", "flew"]],
]

# all_predict_true_index: indices where predictions were made (non-empty means there were predictions)
all_predict_true_index = [
    [0, 1, 2],  # For item 0, predicted corrections at indices 0, 1, 2
    [0, 1],     # For item 1, predicted corrections at indices 0, 1
]

# all_gold_index: indices where gold corrections exist
all_gold_index = [
    [1],        # For item 0, gold correction at index 1
    [0, 1, 2],  # For item 1, gold corrections at indices 0, 1, 2
]

ARGS = {
    "results2": results2,
    "all_predict_true_index": all_predict_true_index,
    "all_gold_index": all_gold_index,
}
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 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
compute_corrector_prf Ran
ran on a synthesized input
mszpc/SoftMaskedBert/softmaskedbert/src/utils.py
code served (permissive licence) · get_code("8b028660c9e94b5c")
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 torch

torch.manual_seed(0)

# Analyze the function to understand what it needs:
# compute_corrector_prf takes: results
# It calls compute_detection_prf(results) which expects:
#   - results is a list of items where each item is (src, tgt, predict)
#   - src, tgt, predict are sequences (strings or lists) that support len() and indexing
# Then it calls compute_correction_prf(results, all_predict_true_index, all_gold_index)
#   - results is a list where results[i] has [1] and [2] indices (tgt and predict)
#   - results[i][2][j] accesses predicted words
#   - results[i][1][j] accesses gold words
#   - all_predict_true_index is a list of lists of indices
#   - all_gold_index is a list of lists of indices

# Build sample data that satisfies the structure
# Each item in results should be (src, tgt, predict) where each is indexable

# Example: sequences of characters or words
# src: original sequence
# tgt: target/gold sequence (what we want)
# predict: predicted sequence (what model produced)

results = [
    # First example: 3-character sequence
    # src differs from tgt at indices 0 and 2
    # predict matches gold at index 0 but not 2
    ("abc", "dbc", "dbe"),
    
    # Second example: 4-character sequence
    # src differs from tgt at indices 1 and 3
    # predict matches gold at index 1 but not 3
    ("hello", "hallo", "hallo"),
]

# Verify structure: each tuple has (src, tgt, predict) all indexable
assert len(results) == 2
assert len(results[0]) == 3
assert len(results[1]) == 3

# Check that src, tgt, predict support len() and indexing
for src, tgt, predict in results:
    assert len(src) == len(tgt) == len(predict)
    for i in range(len(src)):
        _ = src[i]
        _ = tgt[i]
        _ = predict[i]

ARGS = {
    "results": results
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — 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
compute_detection_prf Ran
ran on a synthesized input
mszpc/SoftMaskedBert/softmaskedbert/src/utils.py
code served (permissive licence) · get_code("ac8790d05ecb703c")
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. 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

torch.manual_seed(0)

# The function expects results1 to be a list of tuples
# Each tuple contains (src, tgt, predict) where each is a sequence
# The function compares elements at each index

# Create sample data - using strings as sequences
results1 = [
    # (src, tgt, predict)
    ("abcd", "abxd", "abyd"),  # gold_index=[2], predict_index=[2], TP=1
    ("hello", "hallo", "hallo"),  # gold_index=[1], predict_index=[1], TP=1
    ("test", "tast", "text"),  # gold_index=[1], predict_index=[2], FP=1, FN=1
    ("xyz", "xya", "xyz"),  # gold_index=[2], predict_index=[], FN=1
]

ARGS = {
    "results1": results1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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
compute_sentence_level_prf Ran
ran, honoured the contract we drafted
gitabtion/BertBasedCorrectionModels/bbcm/utils/evaluations.py
code served (permissive licence) · get_code("b088e76916ad21f3")
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 logging

# Create a simple logger
class SimpleLogger:
    def info(self, msg):
        print(msg)

logger = SimpleLogger()

# Create sample results: list of tuples (src, tgt, predict)
# Each tuple represents: (source_text, target_text, predicted_text)
results = [
    # Case 1: src == tgt and tgt == predict → TN
    ("hello world", "hello world", "hello world"),
    
    # Case 2: src == tgt and tgt != predict → FP
    ("good morning", "good morning", "good evening"),
    
    # Case 3: src != tgt and tgt == predict → TP
    ("the cat", "a cat", "a cat"),
    
    # Case 4: src != tgt and tgt != predict → FN
    ("i am here", "i am there", "i am lost"),
    
    # Case 5: src == tgt and tgt == predict → TN
    ("perfect", "perfect", "perfect"),
    
    # Case 6: src != tgt and tgt == predict → TP
    ("mispelling", "misspelling", "misspelling"),
]

ARGS = {
    "results": results,
    "logger": logger,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 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
dump_json Ran
ran on a synthesized input
gitabtion/BertBasedCorrectionModels/bbcm/utils/file_io.py
code served (permissive licence) · get_code("712509715b4485d4")
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 bool, 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 json
import os
import tempfile

# Create a temporary directory for the test
temp_dir = tempfile.mkdtemp()

# Define test data - a simple dictionary that is JSON-serializable
test_obj = {
    "name": "test",
    "value": 42,
    "nested": {
        "key1": "value1",
        "key2": [1, 2, 3]
    },
    "unicode": "你好世界"
}

# Define the file path where the JSON will be saved
test_fp = os.path.join(temp_dir, "subdir", "test_output.json")

ARGS = {
    "obj": test_obj,
    "fp": test_fp
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 bool, 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
dump_json Ran
ran on a synthesized input
mszpc/SoftMaskedBert/softmaskedbert/preprocess_dataset.py
code served (permissive licence) · get_code("40e10fdbe38a163f")
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 bool, 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 json
import os
import tempfile

# Create a temporary directory for the test
temp_dir = tempfile.mkdtemp()

# Define test data - a simple serializable object
test_obj = {
    "name": "test",
    "values": [1, 2, 3, 4],
    "nested": {
        "key": "value",
        "unicode": "中文测试"
    }
}

# Define the file path where the JSON will be saved
test_filepath = os.path.join(temp_dir, "subdir", "test_output.json")

ARGS = {
    "obj": test_obj,
    "fp": test_filepath
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 bool, 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_cache_dir Ran
ran on a synthesized input
gitabtion/BertBasedCorrectionModels/bbcm/utils/file_io.py
code served (permissive licence) · get_code("9f0e70bc9b57f335")
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 str. 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 os

ARGS = {
    'cache_dir': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
load_json Ran
ran on a synthesized input
gitabtion/BertBasedCorrectionModels/bbcm/utils/file_io.py
code served (permissive licence) · get_code("fa2946b9355af8b5")
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 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 json
import os
import tempfile

# Create a temporary file with valid JSON content
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test.json")

test_data = {"key1": "value1", "key2": 42, "nested": {"inner": True}}
with open(temp_file, 'w', encoding='utf8') as f:
    json.dump(test_data, f)

ARGS = {
    "fp": temp_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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
make_optimizer Ran
ran; our contract draft was wrong, not the code
gitabtion/BertBasedCorrectionModels/bbcm/solver/build.py
code served (permissive licence) · get_code("3c707eafb83ce730")
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 SGD. 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 torch.nn as nn

torch.manual_seed(0)

# Create a simple model with parameters (including bias)
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

# Create a config object with required SOLVER attributes
class Config:
    class SOLVER:
        BASE_LR = 0.001
        WEIGHT_DECAY = 0.0005
        BIAS_LR_FACTOR = 2.0
        WEIGHT_DECAY_BIAS = 0.0
        OPTIMIZER_NAME = 'SGD'
        MOMENTUM = 0.9

cfg = Config()

ARGS = {
    'cfg': cfg,
    'model': model
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SGD — a SGD output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SGD 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
report_prf Ran
ran on a synthesized input
gitabtion/BertBasedCorrectionModels/bbcm/utils/evaluations.py
code served (permissive licence) · get_code("704deca2af268bca")
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 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 torch
import logging

# Set up a minimal logger
class MinimalLogger:
    def info(self, msg):
        print(f"[INFO] {msg}")

logger = MinimalLogger()

# Define ARGS with all parameters for report_prf
ARGS = {
    'tp': 45,
    'fp': 12,
    'fn': 8,
    'phase': 'validation',
    'logger': logger,
    'return_dict': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — 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
SoftMaskedBert Not yet run
unverified (harvested, no recorded run)
lemon234071/TransformerBaselines/agents/bert/soft_masked_bert/soft_masked_bert.py
code served (permissive licence) · get_code("0d5cdc01abffb5cb")
How it ran

no invocation recorded.

compute_corrector_prf Not yet run
unverified (harvested, no recorded run)
gitabtion/BertBasedCorrectionModels/bbcm/utils/evaluations.py
code served (permissive licence) · get_code("98cd0539309793ca")
How it ran

no invocation recorded.

proc_test_set Not yet run
unverified (harvested, no recorded run)
mszpc/SoftMaskedBert/softmaskedbert/preprocess_dataset.py
code served (permissive licence) · get_code("c3ba3217b15fd141")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 1 later) and 14 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
make_optimizer 2 other papers
1 dated earlier, 1 later
2004.13922 (2020-04)
Revisiting Pre-trained Models for Chinese Natural Language Processing
2104.06770 (2021-04)
Graph-based Person Signature for Person Re-Identifications
compute_corrector_prf 1 other paper
1 dated earlier
2004.13922 (2020-04)
Revisiting Pre-trained Models for Chinese Natural Language Processing
compute_sentence_level_prf 1 other paper
1 dated earlier
2004.13922 (2020-04)
Revisiting Pre-trained Models for Chinese Natural Language Processing

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

Spelling error correction is an important yet challenging task because a satisfactory solution of it essentially needs human-level language understanding ability. Without loss of generality we consider Chinese spelling error correction (CSC) in this paper. A state-ofthe-art method for the task selects a character from a list of candidates for correction (including non-correction) at each position of the sentence on the basis of BERT, the language representation model. The accuracy of the method can be sub-optimal, however, because BERT does not have sufficient capability to detect whether there is an error at each position, apparently due to the way of pre-training it using mask language modeling. In this work, we propose a novel neural architecture to address the aforementioned issue, which consists of a network for error detection and a network for error correction based on BERT, with the former being connected to the latter with what we call soft-masking technique. Our method of using 'Soft-Masked BERT' is general, and it may be employed in other language detectioncorrection problems. Experimental results on two datasets demonstrate that the performance of our proposed method is significantly better than the baselines including the one solely based on BERT.

For agents

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

get_harvested_code_for_paper("2005.07421")
get_code_for_paper("2005.07421")
have("2005.07421")

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

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

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

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

Connect an agent — have() is free.