Title

reduce_aigc -- Reduce AIGC similarity in Word documents (bilingual)

Syntax

reduce_aigc , input(filename) [output(filename)
target(#) intensity(#)
dict(filename) methods(string)
language(string)]

Description

reduce_aigc calls an enhanced Python script (reduce_word.py) to perform multiple
text transformations on Microsoft Word (.docx) documents. It reduces the likelihood of
being flagged as AI-generated content (AIGC) or plagiarized text, with full
bilingual support (English/Chinese) and optimization for official similarity checks
such as VIP (维普).

Features:

- 7 reduction methods (synonym replacement, voice change, negative inversion,

sentence split/merge, order adjustment, abbreviation expansion, modifier addition)

- Full Chinese support with jieba分词 for accurate word segmentation

- User-defined synonym dictionaries (JSON/TXT/CSV)

- Adjustable target similarity and reduction intensity

- XML-compatible text cleaning to handle special characters

Options

input(string) Specifies the input Word (.docx) file (required).

output(string) Specifies the output Word file. If omitted, the output
file is automatically named by inserting _reduced before .docx.

target(real) Target similarity level (0.1 to 0.95). Lower values
apply more aggressive reduction. Default is 0.3 (30% similarity).

intensity(real) Controls overall reduction intensity (0.1 to 0.95).
Higher values apply more transformations. Default is 0.5.

dict(string) User-defined synonym dictionary file.
Supported formats: JSON, TXT (key=value), CSV. See examples below.

methods(string) Comma-separated list of reduction methods to use.
Available methods:

synonym - Synonym replacement

voice - Active/passive voice conversion

neg - Affirmative/double negative conversion

split - Sentence split/merge

order - Word order adjustment

expand - Abbreviation expansion (English only)

modifier- Modifier addition

language(string) Language mode: zh (Chinese) or en (English).
Default is zh.

Reduction Methods Details

The tool uses multiple strategies to reduce text similarity:

1. Synonym Replacement - Replace words with semantically equivalent alternatives
Uses built-in synonym dictionaries (100+ entries in Chinese, 50+ in English)

2. Voice Change - Convert between active and passive structures
Examples: "执行了" → "被执行", "performs" → "is performed by"

3. Negative Inversion - Convert affirmative to double-negative forms
Examples: "很重要" → "不是不重要", "important" → "not unimportant"

4. Split/Merge - Split long sentences or merge short ones
Chinese: splits at 30+ characters; English: splits at 80+ characters

5. Order Adjustment - Adjust clause or phrase order
Examples: "因为...所以..." ↔ "...，因为..."

6. Abbreviation Expansion - Expand common abbreviations (English only)
Examples: "e.g." → "for example", "i.e." → "that is"

7. Modifier Addition - Add appropriate modifiers
Examples: "显著地", "明显地", "significantly", "notably"

User Dictionary Formats

JSON format (recommended for Chinese):
{"研究": ["探讨", "考察", "分析", "探究"],
"方法": ["方式", "手段", "途径", "策略"],
"重要": ["关键", "核心", "主要", "首要"]}

TXT format (key=value):
研究=探讨,考察,分析,探究
方法=方式,手段,途径,策略
重要=关键,核心,主要,首要

CSV format:
研究,探讨,考察,分析,探究
方法,方式,手段,途径,策略
重要,关键,核心,主要,首要

Requirements

Software Requirements:
- Stata 12.0 or higher
- Python 3.6 or higher

Python Packages (install via pip):
pip install python-docx (required)
pip install jieba (strongly recommended for Chinese mode)

File Location:

All three files must be in the same directory:

- reduce_aigc.ado

- reduce_aigc.sthlp

- reduce_word.py

Recommended path: D:/Stata18/ado/personal/

Setup Instructions

Step 1: Install Python packages
! python -m pip install python-docx jieba -i https://pypi.tuna.tsinghua.edu.cn/simple

Step 2: Set Python path in Stata (permanently)
set python_exec "C:\Users\YourName\...\python.exe", permanently

Step 3: Verify installation
python: import jieba; print("OK")
python: import docx; print("OK")

Examples

Basic usage (Chinese, default):
. reduce_aigc , input("thesis.docx")

With custom parameters:
. reduce_aigc , input("thesis.docx") target(0.25) intensity(0.6)

Specify output file:
. reduce_aigc , input("thesis.docx") output("final.docx") target(0.2)

Use custom dictionary:
. reduce_aigc , input("thesis.docx") dict("mydict.json")

Use specific methods only:
. reduce_aigc , input("thesis.docx") methods("synonym,voice,split") target(0.3)

English document:
. reduce_aigc , input("paper.docx") language("en") target(0.25) intensity(0.6)

Recommendations for Similarity Checks (e.g., VIP 维普)

Recommended parameter settings based on required similarity:

First draft (target < 40%):
target(0.35) intensity(0.4)

Final submission (target < 30%):
target(0.25) intensity(0.6)

Strict requirement (target < 20%):
target(0.15) intensity(0.8)

Extreme requirement (target < 12%):
target(0.10) intensity(0.9)

Output Statistics

After processing, the program displays:

- Total paragraphs processed

- Number of modified paragraphs

- Modification percentage

- Total changes made

- Methods used

- Output file path

Troubleshooting

Error: "All strings must be XML compatible"
The document contains special control characters. The script automatically
cleans these. If the error persists, save the document as a new .docx file.

Error: "No module named 'jieba'"
Install jieba: pip install jieba -i https://pypi.tuna.tsinghua.edu.cn/simple

Error: "Cannot find file reduce_word.py"
Ensure reduce_word.py is in the same directory as reduce_aigc.ado.

Download timeout when installing packages
Use domestic mirrors: -i https://pypi.tuna.tsinghua.edu.cn/simple

Notes

1. Always manually review the output to ensure academic integrity and readability.

2. Start with lower intensity (0.4-0.5) and gradually increase.

3. Use custom dictionaries to protect technical terms from being replaced.

4. For Chinese documents, jieba is strongly recommended for better results.

5. The script automatically cleans XML-incompatible characters.

6. Both paragraphs and tables are processed.

7. Original document formatting (bold, italic, font size, etc.) is preserved.

Performance

Example with a 700-paragraph Chinese thesis:

- Processing time: ~1-2 minutes

- Modification rate: typically 10-30% depending on intensity

- Memory usage: ~200-500 MB

Authors

Wu Lianghai

School of Business, Anhui University of Technology (AHUT), Ma'anshan, China

Email: agd2010@yeah.net

Wu Hanyan

School of Economics and Management, Nanjing University of Aeronautics and Astronautics (NUAA), China

Email: 2325476320@qq.com

Chen Liwen

School of Business, Anhui University of Technology (AHUT), Ma'anshan, China

Email: 2184844526@qq.com

Version

8.0 (bilingual support + jieba integration + XML cleaning)

Date

06June2026

Acknowledgments

Thanks to the open-source community for python-docx and jieba packages.