SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2205.03772 · 2022

Math-KG: Construction and Applications of Mathematical Knowledge Graph

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 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; 0 honoured the contract we drafted, 1 violated it and 4 have no contract verdict; 0 failures of our instrument; 1 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/2205.03772.json · badge: /api/ran/2205.03772.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
wjn1996/mathematical-knowledge-entity-recognition canonical (classifier label)
classifier basis not recorded on the link
5 ran · 1 no recorded run
FunctionStatusWhere it lives
get_PER_entity Ran
ran on a synthesized input
wjn1996/mathematical-knowledge-entity-recognition/utils.py
code served (permissive licence) · get_code("bcf5379b6a1ea5f4")
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

# Analyze the function to understand its parameters
# tag_seq: a sequence of tags (strings like 'B-KNOW', 'I-KNOW', or others)
# char_seq: a sequence of characters (strings)

# The function iterates through both sequences in parallel,
# building entities based on tag patterns

# Create small test data
tag_seq = ['B-KNOW', 'I-KNOW', 'I-KNOW', 'O', 'B-KNOW', 'O']
char_seq = ['J', 'o', 'h', 'n', 'M', 'a']

ARGS = {
    'tag_seq': tag_seq,
    'char_seq': char_seq
}
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
get_entity Ran
ran on a synthesized input
wjn1996/mathematical-knowledge-entity-recognition/utils.py
code served (permissive licence) · get_code("047bd8595bee4256")
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 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

# Analyze the function: get_entity takes tag_seq and char_seq
# tag_seq: sequence of tags like 'B-KNOW', 'I-KNOW', 'B-PRIN', 'I-PRIN', 'B-OTHER', 'I-OTHER', or other tags
# char_seq: sequence of characters to build entities from

# Create a simple test case with mixed entity tags
tag_seq = [
    'B-KNOW', 'I-KNOW', 'O',
    'B-PRIN', 'I-PRIN', 'O',
    'B-OTHER', 'I-OTHER'
]

char_seq = [
    'J', 'o', ' ',
    'N', 'Y', ' ',
    'A', 'B'
]

ARGS = {
    'tag_seq': tag_seq,
    'char_seq': char_seq
}
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 2, 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
read_corpus Ran
ran on a synthesized input
wjn1996/mathematical-knowledge-entity-recognition/data.py
code served (permissive licence) · get_code("acb71b1830976876")
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 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 tempfile
import os

# Create a temporary corpus file
temp_dir = tempfile.mkdtemp()
corpus_path = os.path.join(temp_dir, "corpus.txt")

# Write sample corpus data in the expected format
# Format: character label (per line), empty line separates sentences
corpus_content = """你 O
好 O
吗 O

我 O
很 B-PER
好 O
"""

with open(corpus_path, 'w', encoding='utf-8') as fw:
    fw.write(corpus_content)

ARGS = {
    'corpus_path': corpus_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 3, 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
sentence2id Ran
ran on a synthesized input
wjn1996/mathematical-knowledge-entity-recognition/data.py
code served (permissive licence) · get_code("51e657fc44fff6aa")
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 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 torch

# Construct a small word2id dictionary
word2id = {
    '<NUM>': 0,
    '<ENG>': 1,
    '<UNK>': 2,
    'hello': 3,
    'world': 4,
    'test': 5,
}

# Construct a sample sentence with various word types
sent = ['hello', '123', 'A', 'world', 'unknown_word', 'test']

ARGS = {
    'sent': sent,
    'word2id': word2id,
}
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 list, ndim 1, dtype family int — 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
str2bool Ran
ran, violated the contract we drafted
wjn1996/mathematical-knowledge-entity-recognition/utils.py
code served (permissive licence) · get_code("d9e6cfb815922343")
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 argparse

def str2bool(v):
    if v.lower() in ('yes', 'true', 't', 'y', '1'):
        return True
    elif v.lower() in ('no', 'false', 'f', 'n', '0'):
        return False
    else:
        raise argparse.ArgumentTypeError('Boolean value expected.')

ARGS = {
    'v': 'true'
}
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
read_dictionary Not yet run
unverified (harvested, no recorded run)
wjn1996/mathematical-knowledge-entity-recognition/data.py
code served (permissive licence) · get_code("647e00216f4ee586")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 1 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
str2bool 82 other papers
53 dated earlier, 1 the same month, 27 later, 1 same year, order not determinable
1510.03055 (2015-10)
A Diversity-Promoting Objective Function for Neural Conversation Models
1703.06490 (2017-03)
Generating Multi-label Discrete Patient Records using Generative Adversarial Networks
1710.10467 (2017-10)
Generalized End-to-End Loss for Speaker Verification
and 79 more not named here

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

Recently, the explosion of online education platforms makes a success in encouraging us to easily access online education resources. However, most of them ignore the integration of massive unstructured information, which inevitably brings the problem of \textit{information overload} and \textit{knowledge trek}. In this paper, we proposed a mathematical knowledge graph named Math-KG, which automatically constructed by the pipeline method with the natural language processing technology to integrate the resources of the mathematics. It is built from the corpora of Baidu Baike, Wikipedia. We implement a simple application system to validate the proposed Math-KG can make contributions on a series of scenes, including faults analysis and semantic search. The system is publicly available at GitHub \footnote{\url{https://github.com/wjn1996/Mathematical-Knowledge-Entity-Recognition}.}.

For agents

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

get_harvested_code_for_paper("2205.03772")
get_code_for_paper("2205.03772")
have("2205.03772")

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

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

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

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

Connect an agent — have() is free.