Chinese_Text_Classification.../create_project_structure.sh
2025-03-08 01:34:36 +08:00

114 lines
2.6 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# 项目结构创建脚本
# 用于创建文本分类系统的完整目录结构
# 作者AI助手
# 日期2023
echo "开始创建项目结构..."
# 创建配置目录和文件
mkdir -p config
touch config/__init__.py
touch config/model_config.py
touch config/system_config.py
# 创建数据层目录和文件
mkdir -p data/raw data/processed data/resources/stopwords data/resources/embeddings
touch data/__init__.py
touch data/dataloader.py
touch data/data_manager.py
touch data/dataset.py
# 创建处理层目录和文件
mkdir -p preprocessing
touch preprocessing/__init__.py
touch preprocessing/text_cleaner.py
touch preprocessing/tokenization.py
touch preprocessing/feature_extraction.py
touch preprocessing/vectorizer.py
touch preprocessing/data_augmentation.py
# 创建模型层目录和文件
mkdir -p models/layers
touch models/__init__.py
touch models/base_model.py
touch models/cnn_model.py
touch models/rnn_model.py
touch models/transformer_model.py
touch models/ensemble_model.py
touch models/model_factory.py
touch models/layers/__init__.py
# 创建训练模块
mkdir -p training
touch training/__init__.py
touch training/trainer.py
touch training/optimizer.py
touch training/callbacks.py
touch training/scheduler.py
# 创建评估模块
mkdir -p evaluation
touch evaluation/__init__.py
touch evaluation/evaluator.py
touch evaluation/metrics.py
touch evaluation/visualization.py
# 创建推理模块
mkdir -p inference
touch inference/__init__.py
touch inference/predictor.py
touch inference/batch_processor.py
# 创建接口层
mkdir -p interface/web/templates
touch interface/__init__.py
touch interface/cli.py
touch interface/api.py
touch interface/web/__init__.py
touch interface/web/app.py
touch interface/web/routes.py
# 创建工具模块
mkdir -p utils
touch utils/__init__.py
touch utils/logger.py
touch utils/file_utils.py
touch utils/time_utils.py
touch utils/text_utils.py
# 创建模型保存目录
mkdir -p saved_models/tokenizers saved_models/classifiers
# 创建测试目录
mkdir -p tests
touch tests/__init__.py
touch tests/test_preprocessing.py
touch tests/test_models.py
touch tests/test_evaluation.py
# 创建文档目录
mkdir -p docs
touch docs/architecture.md
touch docs/api_reference.md
touch docs/usage_guide.md
# 创建脚本目录
mkdir -p scripts
touch scripts/train.py
touch scripts/evaluate.py
touch scripts/predict.py
# 创建主要文件
touch main.py
touch requirements.txt
touch setup.py
touch README.md
echo "项目结构创建完成!"
echo "------------------------------"
echo "目录结构概览:"
find . -type d | sort
echo "------------------------------"
echo "文件总数: $(find . -type f | wc -l)"