Automatic compilation of a Pre-Qin philosophy lexicon via large language models
摘要
Pre-Qin philosophy is foundational to Chinese intellectual history, but its terminology features polysemy, contextuality, and school-specific variation, posing challenges to manual dictionary compilation. This study proposes an automatic lexicon construction method using large language models. A semantic framework is established, consisting of four core tasks: term identification, school classification, definition generation, and context translation. Corpora are sourced from Chinese Text Project and Guoxue Dashi, with structured term data based on the Encyclopedia of Chinese Philosophy. Training employs the LLaMA Factory with LoRA-based tuning on DeepSeek-R1-Distill-Qwen, Qwen3, and Llama3 models, using continued pretraining and few-shot fine-tuning. During inference, task-specific few-shot prompts guide the model in semantic generation for each task. Results show Qwen3 outperforms DeepSeek-R1-Distill-Qwen and Llama3 in semantic alignment and disambiguation. A structured term database and interactive Streamlit-based interface support an end-to-end workflow from corpus acquisition to dictionary display, highlighting the potential of large language models in automating lexicographic work on classical Chinese philosophy.