SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.12639 · 2026

CLASE: A Hybrid Method for Chinese Legalese Stylistic Evaluation

Huiyuan Xie, Yuxiao Ye, Yiran Ma

arXiv · PDF

Code that ran

17 of 20 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; 5 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 12 failures of our instrument; 3 no recorded run), measured 2026-11-22; 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/2602.12639.json · badge: /api/ran/2602.12639.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
rexera/CLASE community
Papers with Code archive
17 ran · 3 no recorded run
FunctionStatusWhere it lives
calculate_character_percentage Ran
ran, honoured the contract we drafted
rexera/CLASE/linguistic_features/feature_extractor.py
code served (permissive licence) · get_code("4242172a7e5c5abe")
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.

from collections import Counter
from typing import Dict, List, Set

# Define the arguments for calculate_character_percentage
text = "hello world"
common_chars = {'h', 'e', 'l', 'o', ' ', 'w', 'r', 'd'}

ARGS = {
    "text": text,
    "common_chars": common_chars,
}
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 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
calculate_second_most_common_percentage Ran
ran, honoured the contract we drafted
rexera/CLASE/linguistic_features/feature_extractor.py
code served (permissive licence) · get_code("e5c01f01bf81d45d")
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
from collections import Counter
from typing import Set

torch.manual_seed(0)

# Construct arguments for calculate_second_most_common_percentage
text = "the quick brown fox jumps over the lazy dog"
character_set = {'t', 'h', 'e', 'q', 'u', 'i', 'c', 'k', 'b', 'r', 'o', 'w', 'n', 'f', 'x', 'j', 'm', 'p', 's', 'v', 'l', 'a', 'z', 'y', 'd', 'g'}

ARGS = {
    "text": text,
    "character_set": character_set
}
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
calculate_stroke_ratios Ran
ran, honoured the contract we drafted
rexera/CLASE/linguistic_features/feature_extractor.py
code served (permissive licence) · get_code("b811ef24a1c8e9ca")
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
import numpy as np

# Set seed for reproducibility
torch.manual_seed(0)

# Construct the arguments for calculate_stroke_ratios
text = "你好世界abc"

stroke_data = {
    "你": 7,
    "好": 6,
    "世": 5,
    "界": 9,
    "a": 1,
    "b": 2,
    "c": 3,
}

ARGS = {
    "text": text,
    "stroke_data": stroke_data,
}
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 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
count_words Ran
ran, honoured the contract we drafted
rexera/CLASE/linguistic_features/feature_extractor.py
code served (permissive licence) · get_code("9c81670a59d88906")
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 int, ndim 0, dtype family int, 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

torch.manual_seed(0)

# Analyzing the function:
# - It takes a single parameter 'text' of type str
# - It counts Chinese characters in the range '一' to '鿿'
# - It returns an int

# Create a test string with some Chinese characters and other text
text_with_chinese = "Hello世界一二三鿿test中文字符"

ARGS = {
    "text": text_with_chinese
}
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 int, ndim 0, dtype family int, 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
feature_19_to_24 Ran
ran; our contract draft was wrong, not the code
rexera/CLASE/linguistic_features/feature_extractor.py
code served (permissive licence) · get_code("a3b69be84b392c29")
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 re

def split_chinese_sentences(text):
    """
    Split Chinese text into sentences based on punctuation marks.
    """
    sentence_endings = '[。!?]'
    sentences = re.split(sentence_endings, text)
    sentences = [s.strip() for s in sentences if s.strip()]
    return sentences

def feature_19_to_24(text):
    """
    Extract features 19-24 from the input text.
    
    Args:
        text (str): Input text document
        
    Returns:
        list: List of dictionaries containing feature values
    """
    sentences = split_chinese_sentences(text)
    num_sentences = len(sentences)
    total_words = 0
    total_chars = 0
    total_punctuation = 0
    sentence_word_counts = []
    sentence_char_counts = []
    sentence_punctuation_counts = []
    for sentence in sentences:
        words = sentence.split()
        word_count = len(words)
        sentence_word_counts.append(word_count)
        total_words += word_count
        char_count = len(re.findall('[\\u4e00-\\u9fff]', sentence))
        sentence_char_counts.append(char_count)
        total_chars += char_count
        punctuation_count = len(re.findall('[,。!?;:、]', sentence))
        sentence_punctuation_counts.append(punctuation_count)
        total_punctuation += punctuation_count
    avg_words_per_sentence = total_words / num_sentences if num_sentences > 0 else 0
    avg_chars_per_sentence = total_chars / num_sentences if num_sentences > 0 else 0
    avg_punctuation_per_sentence = total_punctuation / num_sentences if num_sentences > 0 else 0
    features = [{'19': num_sentences}, {'20': avg_words_per_sentence}, {'21': avg_chars_per_sentence}, {'22': avg_punctuation_per_sentence}, {'23': total_chars}, {'24': total_punctuation}]
    return features

# Sample Chinese text with multiple sentences
sample_text = "这是第一句话。这是第二句话!这是第三句话?这是第四句话,包含标点符号;另有一个冒号:和顿号、在其中。"

ARGS = {
    'text': sample_text
}
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 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
feature_1_to_3 Ran
ran; our contract draft was wrong, not the code
rexera/CLASE/linguistic_features/feature_extractor.py
code served (permissive licence) · get_code("9a3b058b63e215e3")
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 json
import tempfile
import os

# Create a temporary character.json file for testing
temp_dir = tempfile.mkdtemp()
json_path = os.path.join(temp_dir, 'characters.json')

# Create a minimal character list with Chinese characters
# We need at least 6500 characters for the function to work
characters = ['中', '国', '人', '大', '小', '天', '地', '火', '水', '木']
# Extend the list to have at least 6500 entries
extended_characters = characters + [chr(0x4E00 + i) for i in range(6500)]

with open(json_path, 'w', encoding='utf-8') as f:
    json.dump(extended_characters, f, ensure_ascii=False)

# Create test text
test_text = "中国人民很伟大。中国文化源远流长。这是一个测试文本。"

# Define the ARGS dictionary
ARGS = {
    'text': test_text,
    'json_path': json_path
}
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 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
feature_25_to_53 Ran
ran; our contract draft was wrong, not the code
rexera/CLASE/linguistic_features/feature_extractor.py
code served (permissive licence) · get_code("406646e492867d9a")
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 re
import jieba.posseg as pseg

# Construct valid arguments for feature_25_to_53
ARGS = {
    "text": "我喜欢学习。这是一个很好的例子!你呢?这真是太棒了。"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jieba — 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
feature_4_to_7 Ran
ran; our contract draft was wrong, not the code
rexera/CLASE/linguistic_features/feature_extractor.py
code served (permissive licence) · get_code("6a44075205b52eb2")
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 json
import tempfile
import os

# Create a temporary stroke data file
stroke_data = {
    '中': 4,
    '文': 4,
    '测': 9,
    '试': 13,
    'a': 1,
    'b': 2,
    'c': 3,
    'd': 4,
    'e': 5,
    'f': 6,
    'g': 10,
    'h': 15,
    'i': 20,
    'j': 3,
    'k': 5,
    'l': 7,
    'm': 12,
    'n': 8,
    'o': 1,
}

# Write stroke data to a temporary file
with tempfile.NamedTemporaryFile(mode='w', suffix='.json', delete=False, encoding='utf-8') as f:
    json.dump(stroke_data, f)
    stroke_file_path = f.name

try:
    # Define arguments for feature_4_to_7
    ARGS = {
        'text': '中文测试abcdefghijklmno',
        'stroke_file': stroke_file_path
    }
finally:
    # Clean up the temporary file after defining ARGS
    pass
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 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
feature_60_to_65 Ran
ran; our contract draft was wrong, not the code
rexera/CLASE/linguistic_features/feature_extractor.py
code served (permissive licence) · get_code("66145e6bdf610ace")
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 jieba.posseg as pseg

# The function takes a text string and extracts adverb-related features
# The text should contain Chinese text with sentence boundaries marked by '。'

text = "我非常喜欢这部电影。他总是很认真地工作。她确实很聪明。"

ARGS = {
    "text": text
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jieba — 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
feature_66_to_78 Ran
ran; our contract draft was wrong, not the code
rexera/CLASE/linguistic_features/feature_extractor.py
code served (permissive licence) · get_code("e0852090dc7875ca")
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 jieba.posseg as pseg
import re

# The function takes a single parameter: text (str)
# It processes Chinese text to extract syntactic features
# No complex objects needed - just a simple string input

ARGS = {
    "text": "我喜欢吃苹果。他在公园里散步。这是一个美丽的季节!你好吗?"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jieba — 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
feature_8_to_18 Ran
ran; our contract draft was wrong, not the code
rexera/CLASE/linguistic_features/feature_extractor.py
code served (permissive licence) · get_code("a85f527c01058502")
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 jieba

# The function takes a Chinese text string as input
# and processes it using jieba tokenization
# We need to provide a valid Chinese text string

ARGS = {
    'text': '这是一个测试文本。中国是一个伟大的国家。自然语言处理很重要。'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jieba — 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
find_idioms_in_text Ran
ran, honoured the contract we drafted
rexera/CLASE/linguistic_features/feature_extractor.py
code served (permissive licence) · get_code("15a2af46ac5adcac")
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.

# Setup code for find_idioms_in_text function

# Define test arguments
text = "这是一个成语例子。卧虎藏龙是一个很好的成语。我喜欢这个地方。"
idioms = {
    "成语",
    "卧虎藏龙",
    "很好",
    "这个",
    "地方"
}

ARGS = {
    "text": text,
    "idioms": idioms
}
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 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
get_word_pos Ran
ran; our contract draft was wrong, not the code
rexera/CLASE/linguistic_features/feature_extractor.py
code served (permissive licence) · get_code("3a82c645ff23711b")
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 jieba.posseg as pseg

# The function takes a single parameter: text (str)
# It uses pseg.cut(text) which is the jieba Chinese word segmentation function
# that returns an iterable of (word, pos) tuples

ARGS = {
    "text": "我喜欢自然语言处理。"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jieba — 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
load_common_characters Ran
ran; our contract draft was wrong, not the code
rexera/CLASE/linguistic_features/feature_extractor.py
code served (permissive licence) · get_code("dc866e2d5707488d")
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 set. 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 tempfile
import os
from typing import Dict, List, Set

# Create a temporary JSON file with character data
temp_dir = tempfile.mkdtemp()
json_path = os.path.join(temp_dir, "character.json")

# Create sample character data - a list of Chinese characters
sample_characters = [
    "中", "国", "人", "大", "小", "山", "水", "火", "木", "土",
    "金", "日", "月", "星", "雨", "云", "风", "雪", "冰", "石",
    "田", "米", "麦", "豆", "玉", "珠", "宝", "金", "银", "铜",
    "红", "绿", "蓝", "黄", "黑", "白", "灰", "紫", "橙", "粉"
]

# Extend to have more characters than the default end_idx
extended_characters = sample_characters * 100  # Repeat to get ~4000 characters
extended_characters = extended_characters[:4000]  # Trim to 4000

# Write to JSON file
with open(json_path, 'w', encoding='utf-8') as f:
    json.dump(extended_characters, f, ensure_ascii=False)

# Define the arguments
ARGS = {
    "json_path": json_path,
    "start_idx": 0,
    "end_idx": 3500
}
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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_stroke_data Ran
ran; our contract draft was wrong, not the code
rexera/CLASE/linguistic_features/feature_extractor.py
code served (permissive licence) · get_code("c8bb249e65f69d67")
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 tempfile
import os

# Create a temporary JSON file with stroke data
stroke_data = {
    "一": 1,
    "二": 2,
    "三": 3,
    "中": 4,
    "国": 8,
    "人": 2,
    "大": 3,
    "小": 3
}

# Write to a temporary file
temp_dir = tempfile.mkdtemp()
stroke_file = os.path.join(temp_dir, "strokes.json")
with open(stroke_file, 'w', encoding='utf-8') as f:
    json.dump(stroke_data, f, ensure_ascii=False)

ARGS = {
    "stroke_file": stroke_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
split_chinese_sentences Ran
ran; our contract draft was wrong, not the code
rexera/CLASE/linguistic_features/feature_extractor.py
code served (permissive licence) · get_code("20cb2908e81784fb")
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 re

def split_chinese_sentences(text):
    """
    Split Chinese text into sentences based on punctuation marks.
    """
    sentence_endings = '[。!?]'
    sentences = re.split(sentence_endings, text)
    sentences = [s.strip() for s in sentences if s.strip()]
    return sentences

ARGS = {
    'text': '这是第一句。这是第二句!这是第三句?还有最后一句。'
}
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 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
split_into_sentences Ran
ran; our contract draft was wrong, not the code
rexera/CLASE/linguistic_features/feature_extractor.py
code served (permissive licence) · get_code("410516a5a8ae2900")
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 re
from typing import List, Dict

def split_into_sentences(text: str) -> List[str]:
    """Split Chinese text into sentences."""
    sentence_endings = '[。!?]'
    sentences = re.split(f'({sentence_endings})', text)
    return [''.join(i) for i in zip(sentences[0::2], sentences[1::2] + [''])]

ARGS = {
    'text': '你好。我是一个学生!你呢?'
}
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 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
extract_all_features Not yet run
unverified (harvested, no recorded run)
rexera/CLASE/linguistic_features/feature_extractor.py
code served (permissive licence) · get_code("322b83ed256e96df")
How it ran

no invocation recorded.

feature_54_to_59 Not yet run
unverified (harvested, no recorded run)
rexera/CLASE/linguistic_features/feature_extractor.py
code served (permissive licence) · get_code("9cb8f0cd9e686419")
How it ran

no invocation recorded.

load_idioms Not yet run
unverified (harvested, no recorded run)
rexera/CLASE/linguistic_features/feature_extractor.py
code served (permissive licence) · get_code("37b7962ab95bea4f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 20 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 20 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

Legal text generated by large language models (LLMs) can usually achieve reasonable factual accuracy, but it frequently fails to adhere to the specialised stylistic norms and linguistic conventions of legal writing. In order to improve stylistic quality, a crucial first step is to establish a reliable evaluation method. However, having legal experts manually develop such a metric is impractical, as the implicit stylistic requirements in legal writing practice are difficult to formalise into explicit rubrics. Meanwhile, existing automatic evaluation methods also fall short: reference-based metrics conflate semantic accuracy with stylistic fidelity, and LLM-as-a-judge evaluations suffer from opacity and inconsistency. To address these challenges, we introduce CLASE (Chinese LegAlese Stylistic Evaluation), a hybrid evaluation method that focuses on the stylistic performance of legal text. The method incorporates a hybrid scoring mechanism that combines 1) linguistic feature-based scores and 2) experience-guided LLM-as-a-judge scores. Both the feature coefficients and the LLM scoring experiences are learned from contrastive pairs of authentic legal documents and their LLM-restored counterparts. This hybrid design captures both surface-level features and implicit stylistic norms in a transparent, reference-free manner. Experiments on 200 Chinese legal documents show that CLASE achieves substantially higher alignment with human judgments than traditional metrics and pure LLM-as-ajudge methods. Beyond improved alignment, CLASE provides interpretable score breakdowns and suggestions for improvements, offering a scalable and practical solution for professional stylistic evaluation in legal text generation ⋆ .

For agents

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

get_harvested_code_for_paper("2602.12639")
get_code_for_paper("2602.12639")
have("2602.12639")

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

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

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

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

Connect an agent — have() is free.