[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-80065":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":12,"contributorsCount":12,"subscribersCount":12,"size":12,"stars1d":12,"stars7d":12,"stars30d":12,"stars90d":12,"forks30d":12,"starsTrendScore":12,"compositeScore":12,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":14,"fork":14,"defaultBranch":15,"hasWiki":16,"hasPages":14,"topics":17,"createdAt":9,"pushedAt":9,"updatedAt":18,"readmeContent":19,"aiSummary":20,"trendingCount":12,"starSnapshotCount":12,"syncStatus":21,"lastSyncTime":22,"discoverSource":23},80065,"Japanese-Corpus-Syntactic-Analysis-Agent","Albertaworlds\u002FJapanese-Corpus-Syntactic-Analysis-Agent","Albertaworlds","日本語コーパス形態素解析・依存構文解析・可視化エージェント | Japanese Corpus Morphological & Syntactic Dependency Analysis & Visualization Agent",null,"Python",61,0,3,false,"main",true,[],"2026-06-12 02:03:57","\u003Ch1 align=\"center\">日本語コーパス構文解析エージェント\u003C\u002Fh1>\n\u003Ch3 align=\"center\">Japanese Corpus Syntactic Analysis Agent\u003C\u002Fh3>\n\n\u003Cp align=\"center\">\n  \u003Cb>形態素解析 → 依存構文解析 → 指標計算 → 可視化\u003C\u002Fb>\u003Cbr>\n  \u003Cb>Morphological Analysis → Syntactic Dependency Parsing → Metrics Computation → Visualization\u003C\u002Fb>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.12-blue.svg\" alt=\"Python 3.12\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLangGraph-1.0-green.svg\" alt=\"LangGraph\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FMeCab-UniDic_3.1.0-orange.svg\" alt=\"MeCab + UniDic\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FspaCy-GSD_UD-yellow.svg\" alt=\"spaCy\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-gray.svg\" alt=\"MIT License\">\n\u003C\u002Fp>\n\n---\n\n## 🎯 概要 \u002F Overview\n\n**日本語:** 日本語テキストに対し、語料清洗・形態素解析・依存構文解析・指標計算・可視化を全自動で実行する AI エージェントです。LLM が分析の指示・解釈を担い、MeCab+UniDic と spaCy が精密な言語解析を担当するハイブリッド構成です。\n\n**English:** An AI agent that performs fully automated linguistic analysis on Japanese text: corpus cleaning, morphological analysis, syntactic dependency parsing, metrics computation, and visualization. A hybrid architecture where LLM handles analysis orchestration and interpretation, while MeCab+UniDic and spaCy handle precise linguistic processing.\n\n### 🔑 主要機能 \u002F Key Features\n\n| # | 機能 \u002F Feature | 説明 \u002F Description |\n|---|---------------|-------------------|\n| 1 | **語料清洗 \u002F Corpus Cleaning** | Unicode 正規化、ルビ記号除去、非本文行検出\u003Cbr>Unicode normalization, ruby notation removal, non-body line detection |\n| 2 | **形態素解析 \u002F Morphological Analysis** | MeCab + UniDic v3.1.0 (完全版 501MB) による高精度解析\u003Cbr>High-precision analysis with MeCab + UniDic v3.1.0 (full 501MB) |\n| 3 | **依存構文解析 \u002F Dependency Parsing** | spaCy GSD UD モデルによる 13 フィールド規格の依存関係抽出\u003Cbr>13-field dependency extraction with spaCy GSD UD model |\n| 4 | **指標計算 \u002F Metrics Computation** | 形態素・構文複雑さ・依存距離・対照の 4 次元指標体系\u003Cbr>4-dimensional metrics: morphological, syntactic complexity, dependency distance, comparison |\n| 5 | **可視化 \u002F Visualization** | 依存ツリー図・レーダーチャート・対照棒グラフ (PNG\u002FPDF)\u003Cbr>Dependency tree diagrams, radar charts, comparison bar charts (PNG\u002FPDF) |\n\n---\n\n## 🏗 アーキテクチャ \u002F Architecture\n\n```\n┌──────────────────────────────────────────────────┐\n│                    LLM (交換可能)                  │\n│   分析指示・結果解釈・ツール呼出の判断               │\n│   Orchestrates tools, interprets results          │\n└──────────┬───────────────────────────────┬────────┘\n           │                               │\n    ┌──────▼──────┐                 ┌──────▼──────┐\n    │  MeCab +    │                 │   spaCy     │\n    │  UniDic     │                 │  GSD UD     │\n    │  形態素解析  │                 │  依存構文解析 │\n    └──────┬──────┘                 └──────┬──────┘\n           │                               │\n    ┌──────▼──────────────────────────────▼──────┐\n    │         指標計算 + 可視化モジュール           │\n    │    Metrics Computation & Visualization      │\n    │  ┌────────────┬──────────────┬───────────┐  │\n    │  │ 形態素指標   │ 構文複雑さ指標 │ 依存距離指標│  │\n    │  │ Morphology │ Syntactic    │ Dependency │  │\n    │  │  Metrics   │ Complexity   │  Distance  │  │\n    │  └────────────┴──────────────┴───────────┘  │\n    └─────────────────────────────────────────────┘\n```\n\n> **日本語:** LLM は交換可能なコンポーネントです。環境変数でモデルを切替可能。言語解析のコア（MeCab\u002FspaCy\u002F指標計算）は LLM に依存せず動作します。\n>\n> **English:** The LLM is a swappable component. Switch models via environment variables. The linguistic analysis core (MeCab\u002FspaCy\u002Fmetrics) operates independently of the LLM.\n\n---\n\n## 📊 官方データとの対照 \u002F Validation Against Reference Data\n\n夏目漱石『こころ』第二章で検証 \u002F Validated on Chapter 2 of Natsume Sōseki's *Kokoro*:\n\n| 指標 \u002F Metric | 本ツール \u002F Ours | 官方値 \u002F Reference | 差異 \u002F Diff |\n|:---|---:|---:|---:|\n| 総形態素数 \u002F Total morphemes | 951 | 955 | -4 (0.4%) |\n| 異なり語数 \u002F Unique morphemes | **303** | **303** | **0 ✅** |\n| 動詞（自立）\u002F Verbs (self-standing) | **86** | **86** | **0 ✅** |\n| 連体詞 \u002F Attributive words | **11** | **11** | **0 ✅** |\n| 固有名詞 \u002F Proper nouns | **6** | **6** | **0 ✅** |\n\n> **日本語:** 異なり語数は語彙素ID前12桁による去重で官方と完全一致。品詞分類も官方基準（動詞＝自立動詞のみ、非自立可能→その他）に準拠。\n>\n> **English:** Unique morpheme count matches the reference exactly using lemma ID prefix-12 deduplication. POS classification follows the official standard (verbs = self-standing only; auxiliary verbs → その他\u002Fother).\n\n---\n\n## 📈 分析指標一覧 \u002F Metrics Overview\n\n### 形態素指標 \u002F Morphological Metrics\n- 延べ語数 \u002F 異なり語数 \u002F TTR（語彙多様性）\u002F Total, unique morphemes, TTR\n- 品詞分布（UniDic 分類 + 官方風分類）\u002F POS distribution (UniDic + official style)\n\n### 構文複雑さ指標 \u002F Syntactic Complexity Metrics\n- MLS（平均文長）\u002F MLT（平均節長）\u002F Mean length of sentence \u002F clause\n- DC（節密度）\u002F C\u002FT \u002F T\u002FS \u002F Clause density\n\n### 依存距離指標 \u002F Dependency Distance Metrics\n- MDD（平均依存距離）\u002F MDD_std \u002F Mean dependency distance\n- NDD（正規化依存距離）\u002F Normalized dependency distance\n- HDD（階層依存距離）\u002F PDD（投影度）\u002F Hierarchical \u002F projection degree\n\n### 対照指標 \u002F Cross-text Comparison Metrics\n- 多テキスト間の全指標横断対照 \u002F Cross-text comparison across all metrics\n- レーダーチャート + 棒グラフ可視化 \u002F Radar chart + bar chart visualization\n\n---\n\n## 🤖 対応 LLM モデル \u002F Supported LLM Models\n\n環境変数 `AGENT_MODEL` でモデルを動的切替可能（未指定時は設定ファイルのデフォルト）。\n\nSwitch models dynamically via `AGENT_MODEL` env var (falls back to config file default).\n\n| Model ID | 特徴 \u002F Description |\n|-----------|------|\n| `doubao-seed-2-0-pro-260215` | 旗艦モデル・複雑推論 \u002F Flagship, complex reasoning |\n| `doubao-seed-2-0-lite-260215` | 均衡型 \u002F Balanced performance-cost |\n| `doubao-seed-2-0-mini-260215` | 軽量高速・256k CTX \u002F Lightweight, 256k context |\n| `doubao-seed-1-6-251015` | 多面手・デフォルト \u002F General-purpose, default |\n| `deepseek-r1-250528` | 671B 満血推論 \u002F Full 671B reasoning model |\n| `kimi-k2-5-260127` | オープンソース SoTA \u002F Open-source SoTA |\n| `glm-5-0-260211` | Agentic Engineering 旗艦 \u002F Agentic flagship |\n| `qwen-3-5-plus-260215` | 混合アーキテクチャ \u002F Hybrid MoE architecture |\n\n> **日本語:** LLM は任意の OpenAI 互換 API に対応可能です。上記は Coze プラットフォームで利用可能なモデル一覧です。\n>\n> **English:** The LLM backend supports any OpenAI-compatible API. The list above shows models available on the Coze platform.\n\n---\n\n## 🚀 クイックスタート \u002F Quick Start\n\n### 前提条件 \u002F Prerequisites\n\n- Python 3.12+\n- [uv](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F) パッケージマネージャ \u002F Package manager\n- OpenAI 互換 LLM API キー \u002F An OpenAI-compatible LLM API key\n\n### インストール \u002F Installation\n\n```bash\n# リポジトリをクローン \u002F Clone repository\ngit clone https:\u002F\u002Fgithub.com\u002FAlbertaworlds\u002FJapanese-Corpus-Syntactic-Analysis-Agent.git\ncd Japanese-Corpus-Syntactic-Analysis-Agent\n\n# 依存関係をインストール \u002F Install dependencies\nuv sync\n\n# spaCy 日本語モデルをダウンロード \u002F Download spaCy Japanese model\npython -m spacy download ja_core_news_ud\n```\n\n### UniDic 辞書のセットアップ \u002F UniDic Dictionary Setup\n\nUniDic v3.1.0 完全版（~501MB）が必要です。以下のいずれかの方法で取得してください：\n\nYou need UniDic v3.1.0 (full, ~501MB). Use one of the following methods:\n\n**方法 A：pip パッケージから（推奨）\u002F Method A: From pip package (recommended)**\n\n```bash\nuv add unidic\npython -m unidic download    # ~501MB, downloads to .venv\n```\n\n**方法 B：手動ダウンロード → プロジェクトディレクトリ \u002F Method B: Manual download → project directory**\n\n```bash\n# 辞書用ディレクトリを作成 \u002F Create dictionary directory\nmkdir -p assets\u002Funidic_dicdir\n\n# UniDic 3.1.0 をダウンロード・解凍して、中身を assets\u002Funidic_dicdir\u002F に配置\n# Download UniDic 3.1.0, extract, and place contents into assets\u002Funidic_dicdir\u002F\n# ダウンロード元: https:\u002F\u002Funidic.ninjal.ac.jp\u002F\n# 必須ファイル: sys.dic, matrix.bin, char.bin, unk.dic, dicrc\n```\n\n> **日本語:** 方法 A が最も簡単です。方法 B は .venv を再構築する環境や、辞書をプロジェクト内で一元管理したい場合に適しています。コードは `assets\u002Funidic_dicdir\u002F` → `unidic` パッケージの順で検索します。\n>\n> **English:** Method A is the simplest. Method B is suitable for environments where .venv gets rebuilt, or when you want to manage the dictionary within the project. The code searches `assets\u002Funidic_dicdir\u002F` first, then falls back to the `unidic` package.\n\n### 環境変数 \u002F Environment Variables\n\n```bash\n# 必須：LLM API キー \u002F Required: LLM API key\nexport COZE_WORKLOAD_IDENTITY_API_KEY=\"your-api-key\"\nexport COZE_INTEGRATION_MODEL_BASE_URL=\"https:\u002F\u002Fyour-model-endpoint\"\n\n# オプション：モデル動的切替 \u002F Optional: dynamic model switching\nexport AGENT_MODEL=\"doubao-seed-1-6-251015\"\n```\n\n> ⚠️ **セキュリティ \u002F Security:** API キーは絶対に Git にコミットしないでください。`.env` ファイルで管理し、`.gitignore` に `.env` を含めてください。\n>\n> **Never commit API keys to Git.** Use `.env` files and ensure `.env` is in `.gitignore`.\n\n### 実行 \u002F Run\n\n```bash\n# HTTP サーバー起動 \u002F Start HTTP server\nbash scripts\u002Fhttp_run.sh -p 5000\n\n# ローカル対話モード \u002F Local conversation mode\nbash scripts\u002Flocal_run.sh -m flow\n```\n\n---\n\n## 📁 プロジェクト構造 \u002F Project Structure\n\n```\n.\n├── config\u002F\n│   └── agent_llm_config.json       # LLM 設定 \u002F LLM configuration\n├── docs\u002F\n│   └── spec.md                     # 技術仕様書 \u002F Technical specification\n├── scripts\u002F\n│   ├── http_run.sh                 # HTTP 起動 \u002F HTTP server launch\n│   ├── local_run.sh                # ローカル実行 \u002F Local execution\n│   └── setup.sh                    # 初期セットアップ \u002F Initial setup\n├── src\u002F\n│   ├── agents\u002F\n│   │   └── agent.py                # エージェント本体 \u002F Agent core (LangGraph)\n│   ├── storage\u002F\n│   │   └── memory\u002F                 # チェックポインタ \u002F Checkpointer\n│   ├── tools\u002F\n│   │   ├── _mecab_helper.py        # MeCab + UniDic 解析コア \u002F Morphological core\n│   │   ├── corpus_cleaner.py       # 語料清洗 \u002F Corpus cleaning\n│   │   ├── morphology_analyzer.py  # 形態素解析 \u002F Morphological analysis\n│   │   ├── japanese_parser.py      # 依存構文解析 \u002F Dependency parsing\n│   │   ├── dependency_visualizer.py    # 依存ツリー可視化 \u002F Tree visualization\n│   │   ├── comparison_visualizer.py    # 対照可視化 \u002F Comparison visualization\n│   │   ├── full_analysis_pipeline.py   # 全行程パイプライン \u002F Full pipeline\n│   │   └── skills\u002F                 # 指標計算モジュール \u002F Metrics modules\n│   │       ├── morphology_metrics\u002F\n│   │       ├── syntactic_complexity_metrics\u002F\n│   │       ├── dependency_distance_metrics\u002F\n│   │       └── comparison_metrics\u002F\n│   ├── utils\u002F                      # 共通ユーティリティ \u002F Utilities\n│   └── main.py                     # エントリーポイント \u002F Entry point\n└── assets\u002F\n    ├── unidic_dicdir\u002F              # UniDic 辞書（要セットアップ）\u002F UniDic dict (setup required)\n    └── config\u002F                     # ツール設定 \u002F Tool configurations\n```\n\n---\n\n## ⚙️ 設定 \u002F Configuration\n\n### `config\u002Fagent_llm_config.json`\n\n```json\n{\n  \"config\": {\n    \"model\": \"doubao-seed-1-6-251015\",\n    \"temperature\": 0.3,\n    \"top_p\": 0.9,\n    \"max_completion_tokens\": 10000,\n    \"timeout\": 600,\n    \"thinking\": \"disabled\"\n  },\n  \"sp\": \"あなたは日本語コーパス構文分析の専門家です...\",\n  \"tools\": [\"analysis_pipeline\", \"clean_japanese_corpus\", ...]\n}\n```\n\nモデル優先順位 \u002F Model priority:\n\n```\n環境変数 AGENT_MODEL > config\u002Fagent_llm_config.json の model フィールド\nEnv var AGENT_MODEL > model field in config\u002Fagent_llm_config.json\n```\n\n---\n\n## 📖 技術仕様 \u002F Technical Specification\n\n詳細は [docs\u002Fspec.md](docs\u002Fspec.md) を参照 \u002F See [docs\u002Fspec.md](docs\u002Fspec.md) for details:\n\n- 13 フィールド依存対規格 \u002F 13-field dependency annotation format\n- 4 次元指標体系の計算定義 \u002F 4-dimensional metrics computation definitions\n- MeCab + UniDic 品詞分類と官方基準の対応表 \u002F POS mapping: UniDic ↔ official standard\n- Skill モジュールのインターフェース仕様 \u002F Skill module interface specification\n\n---\n\n## 🛠 開発 \u002F Development\n\n### テスト \u002F Testing\n\n```bash\nbash scripts\u002Flocal_run.sh -m flow\n```\n\n### 依存関係の追加 \u002F Adding Dependencies\n\n```bash\nuv add \u003Cpackage-name>\n```\n\n> ⚠️ `pip install` は使用しないでください。本プロジェクトは `uv` で管理されています。\n> Do not use `pip install`. This project is managed by `uv`.\n\n---\n\n## 📄 ライセンス \u002F License\n\nMIT License\n\n---\n\n## 🙏 謝辞 \u002F Acknowledgements\n\n- [UniDic](https:\u002F\u002Funidic.ninjal.ac.jp\u002F) — 国立国語研究所 形態素解析辞書 \u002F NINJAL morphological dictionary\n- [MeCab](https:\u002F\u002Ftaku910.github.io\u002Fmecab\u002F) — 形態素解析エンジン \u002F Morphological Analyzer\n- [spaCy](https:\u002F\u002Fspacy.io\u002F) — 依存構文解析 \u002F Dependency parser\n- [LangGraph](https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flanggraph) — エージェントフレームワーク \u002F Agent framework\n","该项目是一个针对日语文本进行全自动语料清洗、形态素解析、依存构文解析、指标计算及可视化的AI代理。它采用混合架构，利用大语言模型（LLM）负责分析流程的编排与结果解释，而具体的语言处理任务则由MeCab+UniDic和spaCy承担，确保了高精度的文本分析。项目支持Unicode正規化、非本文行检测等预处理步骤，并能够生成包括依赖树图、雷达图在内的多种可视化图表，适用于需要深入理解日语文本结构复杂性的研究场景，如自然语言处理实验、语言学研究或教育工具开发等领域。",2,"2026-06-11 03:59:06","CREATED_QUERY"]