ssci-subagent-skills 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +195 -0
- package/LICENSE +21 -0
- package/README.md +529 -0
- package/agents/LITERATURE_EXPERT_INTEGRATION_SUMMARY.md +618 -0
- package/agents/LITERATURE_EXPERT_INTEGRATION_UPDATE.md +284 -0
- package/agents/__pycache__/literature_expert_integration.cpython-312.pyc +0 -0
- package/agents/ant-expert-main.md +127 -0
- package/agents/ant-expert.md +301 -0
- package/agents/chinese-localization-expert.md +261 -0
- package/agents/core_engine.py +375 -0
- package/agents/digital-ecosystem-analyst/digital-ecosystem-analyst.py +507 -0
- package/agents/digital-marx-expert.md +373 -0
- package/agents/digital-transformation-ecosystem-analyst/digital-transformation-ecosystem-analyst.md +76 -0
- package/agents/digital-transformation-innovation-analyst/DATA_CONSTITUTION_REALITY_VERIFIED.py +233 -0
- package/agents/digital-transformation-innovation-analyst/DATA_CONSTITUTION_SKILL_SPECIFICATION.md +357 -0
- package/agents/digital-transformation-innovation-analyst/README_AGENTSILLS_IO_STANDARD.md +418 -0
- package/agents/digital-transformation-innovation-analyst/digital-transformation-innovation-analyst.md +469 -0
- package/agents/digital-transformation-innovation-analyst/digital-transformation-innovation-analyst.py +513 -0
- package/agents/digital-transformation-innovation-analyst/digital-transformation-innovation-analyst_DATA_CONSTITUTION.md +299 -0
- package/agents/digital-transformation-innovation-analyst/digital-transformation-innovation-analyst_DATA_CONSTITUTION.py +342 -0
- package/agents/digital-transformation-innovation-analyst/digital-transformation-innovation-analyst_DATA_CONSTITUTION_TDD.py +615 -0
- package/agents/digital-transformation-innovation-analyst/digital-transformation-innovation-analyst_REAL_DATA_TDD.py +291 -0
- package/agents/digital-transformation-innovation-analyst/digital-transformation-innovation-analyst_data_real_sources.py +468 -0
- package/agents/digital-transformation-innovation-analyst/digital-transformation-innovation-analyst_tdd.py +1126 -0
- package/agents/digital-transformation-innovation-analyst/digital_transformation_innovation-analyst.py +756 -0
- package/agents/digital-transformation-innovation-analyst/tdd_executor.py +203 -0
- package/agents/digital-transformation-innovation-analyst/tdd_runner.py +154 -0
- package/agents/field-analysis-expert-main.md +129 -0
- package/agents/field-analysis-expert.md +231 -0
- package/agents/grounded-theory-agent-implementation.md +431 -0
- package/agents/grounded-theory-expert-v2.md +202 -0
- package/agents/grounded-theory-expert.md +309 -0
- package/agents/literature-expert-v2.md +489 -0
- package/agents/literature-expert.md +639 -0
- package/agents/literature_expert_integration.py +384 -0
- package/agents/references/actor-network-analysis.html +598 -0
- package/agents/references/ant-actor-identification.md +155 -0
- package/agents/references/ant-network-analysis.md +266 -0
- package/agents/references/ant-power-analysis.md +323 -0
- package/agents/references/ant-translation-process.md +185 -0
- package/agents/references/bourdieu-field-analysis.html +805 -0
- package/agents/references/business-ecosystem-analysis.html +598 -0
- package/agents/references/business-model-analysis-implementation-plan.md +199 -0
- package/agents/references/business-model-analysis-plan.md +217 -0
- package/agents/references/business-model-analysis.html +620 -0
- package/agents/references/business-model-coordinator.js +356 -0
- package/agents/references/business-model-expert-agent.js +204 -0
- package/agents/references/data-analysis.html +397 -0
- package/agents/references/did-analysis.html +591 -0
- package/agents/references/digital-durkheim.html +725 -0
- package/agents/references/digital-marx.html +460 -0
- package/agents/references/digital-weber.html +591 -0
- package/agents/references/field-boundary-identification.md +232 -0
- package/agents/references/field-capital-analysis.md +268 -0
- package/agents/references/grounded-theory.html +731 -0
- package/agents/references/msqca-analysis.html +589 -0
- package/agents/references/research-design.html +394 -0
- package/agents/references/social-network-analysis.html +590 -0
- package/agents/references/survey-design.html +577 -0
- package/agents/sna-expert.md +348 -0
- package/common/dependency_config.py +96 -0
- package/common/dependency_manager.py +175 -0
- package/common/smart_dependency_manager.py +331 -0
- package/package.json +81 -0
- package/scripts/postinstall.js +147 -0
- package/scripts/validate-skills.js +209 -0
- package/skills/2025_12_21_cnki-downloader.skill.install/cnki-downloader.skill +0 -0
- package/skills/2025_12_21_cnki-downloader.skill.install/cnki-downloader.skill.install.md +114 -0
- package/skills/COMPLIANCE_REPORT.md +122 -0
- package/skills/INTEGRATION_PLAN.md +405 -0
- package/skills/QWEN.md +230 -0
- package/skills/SKILLS_APPLICATION_MAPPING.md +155 -0
- package/skills/__init__.py +7 -0
- package/skills/__pycache__/__init__.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/SKILL.md +195 -0
- package/skills/alienation-analysis/__init__.py +8 -0
- package/skills/alienation-analysis/prompts/core-analysis-framework.md +88 -0
- package/skills/alienation-analysis/prompts/specialized-alienation-analysis.md +190 -0
- package/skills/alienation-analysis/pyproject.toml +36 -0
- package/skills/alienation-analysis/scripts/__init__.py +8 -0
- package/skills/alienation-analysis/scripts/__pycache__/alienation_analysis_engine.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/career_development_evaluation.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/classify_alienation_types.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/consumer_behavior_analysis.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/core_analyzer.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/digital_wellbeing_evaluation.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/generate_intervention_plan.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/materialism_assessment.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/relationship_quality_assessment.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/social_network_analysis.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/technology_dependency_analysis.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/__pycache__/workplace_satisfaction_analysis.cpython-312.pyc +0 -0
- package/skills/alienation-analysis/scripts/alienation_analysis_engine.py +597 -0
- package/skills/alienation-analysis/scripts/career_development_evaluation.py +512 -0
- package/skills/alienation-analysis/scripts/classify_alienation_types.py +357 -0
- package/skills/alienation-analysis/scripts/consumer_behavior_analysis.py +643 -0
- package/skills/alienation-analysis/scripts/core_analyzer.py +571 -0
- package/skills/alienation-analysis/scripts/digital_wellbeing_evaluation.py +597 -0
- package/skills/alienation-analysis/scripts/generate_intervention_plan.py +358 -0
- package/skills/alienation-analysis/scripts/materialism_assessment.py +528 -0
- package/skills/alienation-analysis/scripts/relationship_quality_assessment.py +621 -0
- package/skills/alienation-analysis/scripts/social_network_analysis.py +802 -0
- package/skills/alienation-analysis/scripts/technology_dependency_analysis.py +534 -0
- package/skills/alienation-analysis/scripts/workplace_satisfaction_analysis.py +340 -0
- package/skills/alienation_analysis/SKILL.md +291 -0
- package/skills/alienation_analysis/__init__.py +1 -0
- package/skills/alienation_analysis/__pycache__/__init__.cpython-312.pyc +0 -0
- package/skills/alienation_analysis/scripts/__init__.py +1 -0
- package/skills/alienation_analysis/scripts/__pycache__/__init__.cpython-312.pyc +0 -0
- package/skills/ant/SKILL.md +139 -0
- package/skills/ant/pyproject.toml +36 -0
- package/skills/ant/scripts/ant_analysis_with_fallback.py +383 -0
- package/skills/ant-expert/SKILL.md +182 -0
- package/skills/ant-expert/integration_with_trusted_scraper.md +115 -0
- package/skills/ant-expert/modules/__pycache__/network_analysis.cpython-312.pyc +0 -0
- package/skills/ant-expert/modules/__pycache__/participant_identification.cpython-312.pyc +0 -0
- package/skills/ant-expert/modules/__pycache__/translation_process.cpython-312.pyc +0 -0
- package/skills/ant-expert/modules/network_analysis.py +253 -0
- package/skills/ant-expert/modules/participant_identification.py +325 -0
- package/skills/ant-expert/modules/translation_process.py +283 -0
- package/skills/ant-expert/pyproject.toml +27 -0
- package/skills/ant-expert/scripts/ant_expert_analyzer.py +146 -0
- package/skills/ant-expert/test_input.json +82 -0
- package/skills/ant-expert/test_output.json +728 -0
- package/skills/ant-network-analysis/SKILL.md +132 -0
- package/skills/ant-participant-identification/SKILL.md +140 -0
- package/skills/ant-participant-identification/pyproject.toml +35 -0
- package/skills/ant-participant-identification/scripts/identify_participants.py +318 -0
- package/skills/ant-subagent/SKILL.md +60 -0
- package/skills/ant-subagent/modules/network_analysis.py +146 -0
- package/skills/ant-subagent/pyproject.toml +16 -0
- package/skills/ant-translation-process/SKILL.md +144 -0
- package/skills/ant-translation-process/pyproject.toml +35 -0
- package/skills/ant-translation-process/scripts/trace_translation.py +370 -0
- package/skills/ant_relationship_analysis.md +157 -0
- package/skills/arxiv-paper-search/ARXIV_SKILL_COMPLETION_REPORT.md +449 -0
- package/skills/arxiv-paper-search/DEPENDENCY_OPTIMIZATION.md +355 -0
- package/skills/arxiv-paper-search/OPTIMIZATION_SUMMARY.md +213 -0
- package/skills/arxiv-paper-search/README.md +90 -0
- package/skills/arxiv-paper-search/SKILL.md +321 -0
- package/skills/arxiv-paper-search/pyproject.toml +29 -0
- package/skills/arxiv-paper-search/references/ADVANCED_USAGE.md +587 -0
- package/skills/arxiv-paper-search/references/API_REFERENCE.md +350 -0
- package/skills/arxiv-paper-search/references/ARXIV_CATEGORIES.md +249 -0
- package/skills/arxiv-paper-search/references/USER_GUIDE.md +349 -0
- package/skills/arxiv-paper-search/requirements.txt +13 -0
- package/skills/arxiv-paper-search/scripts/__pycache__/arxiv_searcher.cpython-312.pyc +0 -0
- package/skills/arxiv-paper-search/scripts/arxiv_searcher.py +439 -0
- package/skills/arxiv-paper-search/scripts/test_arxiv_searcher.py +307 -0
- package/skills/arxiv-paper-search/test_abstracts.json +461 -0
- package/skills/arxiv-paper-search/test_batch_papers/2009.00804v2_Architectural_Implications_of_.pdf +0 -0
- package/skills/arxiv-paper-search/test_batch_papers/2201.00978v1_PyramidTNT +0 -0
- package/skills/arxiv-paper-search/test_batch_papers/2207.13219v4_Dalorex +0 -0
- package/skills/arxiv-paper-search/test_papers/1706.03762.pdf +0 -0
- package/skills/arxiv-paper-search/test_papers.csv +11 -0
- package/skills/best_practices.md +271 -0
- package/skills/business-ecosystem-analysis/integration_with_trusted_scraper.md +97 -0
- package/skills/business-ecosystem-data-collection/FreeDataCrawler.js +472 -0
- package/skills/business-ecosystem-data-collection/INFO.md +68 -0
- package/skills/business-ecosystem-data-collection/SKILL.md +118 -0
- package/skills/business-ecosystem-data-collection/algorithms/data_validation.py +44 -0
- package/skills/business-ecosystem-data-collection/algorithms/entity_recognition.py +53 -0
- package/skills/business-ecosystem-data-collection/algorithms/relationship_mapping.py +44 -0
- package/skills/business-ecosystem-data-collection/config.json +10 -0
- package/skills/business-ecosystem-data-collection/e2e-test.js +81 -0
- package/skills/business-ecosystem-data-collection/package-lock.json +433 -0
- package/skills/business-ecosystem-data-collection/package.json +21 -0
- package/skills/business-ecosystem-data-collection/references/data-collection-strategies.md +18 -0
- package/skills/business-ecosystem-data-collection/references/data-validation.md +22 -0
- package/skills/business-ecosystem-data-collection/references/entity-recognition.md +16 -0
- package/skills/business-ecosystem-data-collection/references/relationship-mapping.md +16 -0
- package/skills/business-ecosystem-data-collection/scripts/ecosystem_data_collector.py +103 -0
- package/skills/business-ecosystem-data-collection/skill.js +1383 -0
- package/skills/business-ecosystem-data-collection/skill.json +191 -0
- package/skills/business-ecosystem-data-collection/test.js +304 -0
- package/skills/business-ecosystem-data-collection/test_context.json +16 -0
- package/skills/business-model-analysis/INFO.md +65 -0
- package/skills/business-model-analysis/SKILL.md +208 -0
- package/skills/business-model-analysis/e2e-test.js +111 -0
- package/skills/business-model-analysis/integration_with_trusted_scraper.md +97 -0
- package/skills/business-model-analysis/package.json +23 -0
- package/skills/business-model-analysis/skill.js +1779 -0
- package/skills/business-model-analysis/skill.json +175 -0
- package/skills/business-model-analysis/test.js +202 -0
- package/skills/business-model-canvas-analysis/INFO.md +68 -0
- package/skills/business-model-canvas-analysis/README.md +53 -0
- package/skills/business-model-canvas-analysis/SKILL.md +215 -0
- package/skills/business-model-canvas-analysis/prompts.txt +70 -0
- package/skills/business-model-canvas-analysis/reference.md +101 -0
- package/skills/business-model-canvas-analysis/skill.js +675 -0
- package/skills/business-model-canvas-analysis/skill.json +47 -0
- package/skills/business-service-supply-analysis/INFO.md +28 -0
- package/skills/business-service-supply-analysis/SKILL.md +300 -0
- package/skills/business-service-supply-analysis/skill.js +1319 -0
- package/skills/business-service-supply-analysis/skill.json +233 -0
- package/skills/capital-analysis/INFO.md +80 -0
- package/skills/capital-analysis/README.md +65 -0
- package/skills/capital-analysis/SKILL.md +367 -0
- package/skills/capital-analysis/prompts.txt +103 -0
- package/skills/capital-analysis/reference.md +132 -0
- package/skills/capital-analysis/skill.js +739 -0
- package/skills/capital-analysis/skill.json +268 -0
- package/skills/checking-theory-saturation/SKILL.md +280 -0
- package/skills/checking-theory-saturation/pyproject.toml +17 -0
- package/skills/checking-theory-saturation/references/README.md +54 -0
- package/skills/checking-theory-saturation/scripts/__pycache__/assess_saturation.cpython-312.pyc +0 -0
- package/skills/checking-theory-saturation/scripts/assess_saturation.py +296 -0
- package/skills/checking-theory-saturation/tests/__pycache__/test_assess_saturation.cpython-312-pytest-7.4.3.pyc +0 -0
- package/skills/checking-theory-saturation/tests/test_assess_saturation.py +194 -0
- package/skills/class-structure-analysis/SKILL.md +211 -0
- package/skills/competitive-analysis/INFO.md +77 -0
- package/skills/competitive-analysis/README.md +61 -0
- package/skills/competitive-analysis/SKILL.md +357 -0
- package/skills/competitive-analysis/prompts.txt +117 -0
- package/skills/competitive-analysis/reference.md +206 -0
- package/skills/competitive-analysis/skill.js +1166 -0
- package/skills/competitive-analysis/skill.json +219 -0
- package/skills/conflict-resolution/SKILL.md +124 -0
- package/skills/conflict-resolution/conflict-resolution-skill.md +628 -0
- package/skills/data-analysis/SKILL.md +73 -0
- package/skills/data-analysis/prompts/data-cleaning-outline.md +355 -0
- package/skills/data-analysis/prompts/data-cleaning.md +40 -0
- package/skills/data-analysis/prompts/data-understanding-outline.md +243 -0
- package/skills/data-analysis/prompts/data-understanding.md +43 -0
- package/skills/data-analysis/prompts/exploratory-analysis-outline.md +316 -0
- package/skills/data-analysis/prompts/exploratory-analysis.md +40 -0
- package/skills/data-analysis/prompts/modeling-strategy.md +40 -0
- package/skills/data-analysis/pyproject.toml +39 -0
- package/skills/dependency_management.md +46 -0
- package/skills/dialectical-quantitative-synthesis/SKILL.md +239 -0
- package/skills/did-analysis/SKILL.md +239 -0
- package/skills/did-analysis/prompts/causal-interpretation.md +245 -0
- package/skills/did-analysis/prompts/experimental-design.md +260 -0
- package/skills/did-analysis/prompts/model-specification.md +242 -0
- package/skills/did-analysis/prompts/policy-recommendation.md +253 -0
- package/skills/did-analysis/pyproject.toml +35 -0
- package/skills/did-analysis/references/BEST_PRACTICES.md +553 -0
- package/skills/did-analysis/scripts/__pycache__/did_estimator.cpython-312.pyc +0 -0
- package/skills/did-analysis/scripts/__pycache__/integrated_did.cpython-312.pyc +0 -0
- package/skills/did-analysis/scripts/__pycache__/parallel_trend.cpython-312.pyc +0 -0
- package/skills/did-analysis/scripts/__pycache__/robustness_test.cpython-312.pyc +0 -0
- package/skills/did-analysis/scripts/__pycache__/visualization.cpython-312.pyc +0 -0
- package/skills/did-analysis/scripts/did_estimator.py +553 -0
- package/skills/did-analysis/scripts/integrated_did.py +867 -0
- package/skills/did-analysis/scripts/parallel_trend.py +473 -0
- package/skills/did-analysis/scripts/parallel_trend_plot.png +0 -0
- package/skills/did-analysis/scripts/parallel_trend_test.png +0 -0
- package/skills/did-analysis/scripts/placebo_test_distribution.png +0 -0
- package/skills/did-analysis/scripts/robustness_test.py +633 -0
- package/skills/did-analysis/scripts/test_integration.py +253 -0
- package/skills/did-analysis/scripts/visualization.py +539 -0
- package/skills/digital-durkheim/SKILL.md +114 -0
- package/skills/digital-durkheim/prompts/collective-consciousness.md +127 -0
- package/skills/digital-durkheim/prompts/functional-analysis.md +127 -0
- package/skills/digital-durkheim/prompts/social-fact-identification.md +128 -0
- package/skills/digital-durkheim/prompts/social-solidarity.md +134 -0
- package/skills/digital-durkheim/pyproject.toml +36 -0
- package/skills/digital-durkheim/scripts/__pycache__/integrated_durkheim_analyzer.cpython-312.pyc +0 -0
- package/skills/digital-durkheim/scripts/__pycache__/social_fact_analyzer.cpython-312.pyc +0 -0
- package/skills/digital-durkheim/scripts/durkheim_analysis_results.json +226 -0
- package/skills/digital-durkheim/scripts/integrated_durkheim_analyzer.py +540 -0
- package/skills/digital-durkheim/scripts/social_fact_analyzer.py +712 -0
- package/skills/digital-durkheim/test_integration.py +226 -0
- package/skills/digital-marx/README.md +215 -0
- package/skills/digital-marx/SHORT_TERM_IMPLEMENTATION_REPORT.md +183 -0
- package/skills/digital-marx/SKILL.md +189 -0
- package/skills/digital-marx/THEORETICAL_ACCURACY_ANALYSIS.md +278 -0
- package/skills/digital-marx/prompts/material-base-analysis.md +113 -0
- package/skills/digital-marx/prompts/production-relations-analysis.md +113 -0
- package/skills/digital-marx/prompts/social-change-prediction.md +112 -0
- package/skills/digital-marx/prompts/superstructure-analysis.md +112 -0
- package/skills/digital-marx/pyproject.toml +37 -0
- package/skills/digital-marx/scripts/__pycache__/dialectical_thinking_analyzer.cpython-312.pyc +0 -0
- package/skills/digital-marx/scripts/__pycache__/enhanced_historical_materialism_analyzer.cpython-312.pyc +0 -0
- package/skills/digital-marx/scripts/__pycache__/historical_materialism_analyzer.cpython-312.pyc +0 -0
- package/skills/digital-marx/scripts/basic_quality_detector.py +760 -0
- package/skills/digital-marx/scripts/dialectical_thinking_analyzer.py +1601 -0
- package/skills/digital-marx/scripts/enhanced_historical_materialism_analyzer.py +1525 -0
- package/skills/digital-marx/scripts/historical_materialism_analyzer.py +963 -0
- package/skills/digital-marx/scripts/integrated_marx_analyzer.py +932 -0
- package/skills/digital-marx/scripts/marxist_theory_validator.py +1192 -0
- package/skills/digital-marx/scripts/quality_validator.py +890 -0
- package/skills/digital-marx-expert/SKILL.md +179 -0
- package/skills/digital-marx-expert/modules/__pycache__/capital_analysis.cpython-312.pyc +0 -0
- package/skills/digital-marx-expert/modules/__pycache__/class_analysis.cpython-312.pyc +0 -0
- package/skills/digital-marx-expert/modules/__pycache__/historical_materialism.cpython-312.pyc +0 -0
- package/skills/digital-marx-expert/modules/capital_analysis.py +611 -0
- package/skills/digital-marx-expert/modules/class_analysis.py +836 -0
- package/skills/digital-marx-expert/modules/historical_materialism.py +435 -0
- package/skills/digital-marx-expert/pyproject.toml +29 -0
- package/skills/digital-marx-expert/scripts/digital_marx_expert_analyzer.py +189 -0
- package/skills/digital-marx-expert/test_input.json +100 -0
- package/skills/digital-marx-expert/test_output.json +588 -0
- package/skills/digital-transformation/business-innovation-pathway-planning.SKILL.md +102 -0
- package/skills/digital-transformation/business-model-reconstruction.SKILL.md +88 -0
- package/skills/digital-transformation/business-scene-deconstruction-analysis.SKILL.md +131 -0
- package/skills/digital-transformation/config.json +16 -0
- package/skills/digital-transformation/config_host_llm.json +311 -0
- package/skills/digital-transformation/config_llm.json +297 -0
- package/skills/digital-transformation/digitization-deconstruction-analysis.SKILL.md +84 -0
- package/skills/digital-transformation/innovation-niche-identification.SKILL.md +78 -0
- package/skills/digital-transformation/intelligent-transformation-deconstruction-analysis.SKILL.md +110 -0
- package/skills/digital-transformation/online-transformation-deconstruction-analysis.SKILL.md +110 -0
- package/skills/digital-transformation/scripts/data_integrator.py +637 -0
- package/skills/digital-transformation/scripts/digital_transformation_analyzer.py +800 -0
- package/skills/digital-transformation/scripts/digital_transformation_analyzer_agentskills_io.py +1677 -0
- package/skills/digital-transformation/scripts/digital_transformation_analyzer_host_cli.py +834 -0
- package/skills/digital-transformation/scripts/digital_transformation_analyzer_host_llm.py +1026 -0
- package/skills/digital-transformation/scripts/digital_transformation_analyzer_llm.py +957 -0
- package/skills/digital-transformation/scripts/host_cli_interface.py +531 -0
- package/skills/digital-transformation/scripts/llm_client.py +662 -0
- package/skills/digital-transformation/scripts/skill_executor.py +527 -0
- package/skills/digital-transformation/scripts/transformation_visualizer.py +946 -0
- package/skills/digital-transformation/test_context.json +6 -0
- package/skills/digital-transformation/tests/test_digital_transformation.py +844 -0
- package/skills/digital-weber/SKILL.md +88 -0
- package/skills/digital-weber/prompts/comparative-research.md +155 -0
- package/skills/digital-weber/prompts/institutional-analysis.md +147 -0
- package/skills/digital-weber/prompts/theoretical-interpretation.md +102 -0
- package/skills/digital-weber/prompts/understanding-analysis.md +129 -0
- package/skills/digital-weber/pyproject.toml +36 -0
- package/skills/digital-weber/scripts/__pycache__/integrated_weber_analyzer.cpython-312.pyc +0 -0
- package/skills/digital-weber/scripts/__pycache__/optimized_weberian_analyzer.cpython-312.pyc +0 -0
- package/skills/digital-weber/scripts/__pycache__/weberian_analyzer.cpython-312.pyc +0 -0
- package/skills/digital-weber/scripts/enhanced_weberian_analyzer.py +531 -0
- package/skills/digital-weber/scripts/integrated_weber_analyzer.py +772 -0
- package/skills/digital-weber/scripts/optimized_weberian_analyzer.py +713 -0
- package/skills/digital-weber/scripts/weber_analysis_results.json +196 -0
- package/skills/digital-weber/scripts/weberian_analyzer.py +877 -0
- package/skills/digital-weber/simple_quality_test.py +204 -0
- package/skills/digital-weber/test_comprehensive.py +320 -0
- package/skills/digital-weber/test_quality_improvement.py +237 -0
- package/skills/dissent-resolution/SKILL.md +159 -0
- package/skills/ecosystem-analysis/analyzing-business-model-of-key-species.SKILL.md +31 -0
- package/skills/ecosystem-analysis/analyzing-digital-transformation-impact-on-business.SKILL.md +36 -0
- package/skills/ecosystem-analysis/assessing-ecosystem-impact-of-digital-transformation.SKILL.md +36 -0
- package/skills/ecosystem-analysis/config.json +15 -0
- package/skills/ecosystem-analysis/constructing-business-ecosystem-map.SKILL.md +31 -0
- package/skills/ecosystem-analysis/identifying-key-species-in-industry.SKILL.md +30 -0
- package/skills/ecosystem-analysis/performing-industry-ecosystem-analysis.SKILL.md +79 -0
- package/skills/ecosystem-analysis/references/industry-life-cycle.md +29 -0
- package/skills/ecosystem-analysis/references/value-chain-analysis.md +28 -0
- package/skills/ecosystem-analysis/scripts/business_ecosystem_analyzer.py +640 -0
- package/skills/ecosystem-analysis/scripts/data_collector.py +239 -0
- package/skills/ecosystem-analysis/scripts/ecosystem_analysis.py +309 -0
- package/skills/ecosystem-analysis/scripts/ecosystem_data_integrator.py +620 -0
- package/skills/ecosystem-analysis/scripts/ecosystem_preprocessing.py +262 -0
- package/skills/ecosystem-analysis/scripts/ecosystem_visualizer.py +811 -0
- package/skills/ecosystem-analysis/test_context.json +6 -0
- package/skills/ecosystem-analysis/tests/test_ecosystem_analysis.py +1193 -0
- package/skills/ecosystem-relationship-analysis/INFO.md +28 -0
- package/skills/ecosystem-relationship-analysis/SKILL.md +147 -0
- package/skills/ecosystem-relationship-analysis/algorithms/community_detection.py +128 -0
- package/skills/ecosystem-relationship-analysis/algorithms/health_assessment.py +53 -0
- package/skills/ecosystem-relationship-analysis/algorithms/network_analysis.py +171 -0
- package/skills/ecosystem-relationship-analysis/config.json +10 -0
- package/skills/ecosystem-relationship-analysis/references/community-detection.md +24 -0
- package/skills/ecosystem-relationship-analysis/references/ecosystem-theory.md +23 -0
- package/skills/ecosystem-relationship-analysis/references/health-assessment.md +23 -0
- package/skills/ecosystem-relationship-analysis/references/network-analysis-theory.md +19 -0
- package/skills/ecosystem-relationship-analysis/references/relationship-analysis.md +27 -0
- package/skills/ecosystem-relationship-analysis/scripts/ecosystem_relationship_analyzer.py +155 -0
- package/skills/ecosystem-relationship-analysis/skill.js +797 -0
- package/skills/ecosystem-relationship-analysis/skill.json +205 -0
- package/skills/field-analysis/SKILL.md +145 -0
- package/skills/field-boundary-identification/SKILL.md +156 -0
- package/skills/field-boundary-identification/pyproject.toml +36 -0
- package/skills/field-boundary-identification/scripts/identify_boundaries.py +326 -0
- package/skills/field-capital-analysis/SKILL.md +165 -0
- package/skills/field-expert/SKILL.md +409 -0
- package/skills/field-expert/WORKFLOW_SPEC.md +195 -0
- package/skills/field-expert/field_analysis_workflow/input/processed/combined_input.json +247 -0
- package/skills/field-expert/field_analysis_workflow/input/processed/llm_input.json +76 -0
- package/skills/field-expert/field_analysis_workflow/intermediate/01_boundary/boundary_results.json +6 -0
- package/skills/field-expert/field_analysis_workflow/intermediate/02_capital/capital_results.json +5 -0
- package/skills/field-expert/field_analysis_workflow/intermediate/03_habitus/habitus_results.json +120 -0
- package/skills/field-expert/field_analysis_workflow/intermediate/04_dynamics/dynamics_results.json +6 -0
- package/skills/field-expert/field_analysis_workflow/output/executive_summary.txt +35 -0
- package/skills/field-expert/field_analysis_workflow/output/json/comprehensive_analysis.json +180 -0
- package/skills/field-expert/field_analysis_workflow/output/reports/field_analysis_report.html +22 -0
- package/skills/field-expert/modules/__pycache__/boundary_analysis.cpython-312.pyc +0 -0
- package/skills/field-expert/modules/__pycache__/capital_analysis.cpython-312.pyc +0 -0
- package/skills/field-expert/modules/__pycache__/habitus_analysis.cpython-312.pyc +0 -0
- package/skills/field-expert/modules/boundary_analysis.py +234 -0
- package/skills/field-expert/modules/capital_analysis.py +407 -0
- package/skills/field-expert/modules/habitus_analysis.py +306 -0
- package/skills/field-expert/prompts/boundary_analysis.txt +56 -0
- package/skills/field-expert/prompts/boundary_analysis_simple.txt +17 -0
- package/skills/field-expert/prompts/capital_analysis.txt +87 -0
- package/skills/field-expert/prompts/dynamics_analysis.txt +89 -0
- package/skills/field-expert/prompts/habitus_analysis.txt +87 -0
- package/skills/field-expert/pyproject.toml +27 -0
- package/skills/field-expert/scripts/__pycache__/field_analysis_tool.cpython-312.pyc +0 -0
- package/skills/field-expert/scripts/__pycache__/prepare_data.cpython-312.pyc +0 -0
- package/skills/field-expert/scripts/debug_output.txt +4 -0
- package/skills/field-expert/scripts/debug_output_converted.txt +27 -0
- package/skills/field-expert/scripts/field_analysis_tool.py +536 -0
- package/skills/field-expert/scripts/field_expert_analyzer.py +136 -0
- package/skills/field-expert/scripts/generate_report.py +525 -0
- package/skills/field-expert/scripts/prepare_data.py +226 -0
- package/skills/field-expert/scripts/run_workflow.py +571 -0
- package/skills/field-expert/scripts/summarize_data.py +156 -0
- package/skills/field-expert/scripts/temp_prompt_20260106_213035_964505.txt +135 -0
- package/skills/field-expert/scripts/temp_prompt_20260106_213534_264265.txt +16 -0
- package/skills/field-expert/scripts/temp_prompt_20260106_213932_601575.txt +22 -0
- package/skills/field-expert/scripts/temp_prompt_20260106_214330_241706.txt +15 -0
- package/skills/field-expert/scripts/test_host_llm.py +164 -0
- package/skills/field-expert/scripts/test_stigmergy_llm.py +91 -0
- package/skills/field-expert/test_input.json +168 -0
- package/skills/field-expert/test_output.json +724 -0
- package/skills/field-expert/workflow_spec.json +171 -0
- package/skills/field-habitus-analysis/SKILL.md +165 -0
- package/skills/fsqca-analysis/SKILL.md +71 -0
- package/skills/fsqca-analysis/assets/templates/report_template.md +122 -0
- package/skills/fsqca-analysis/comprehensive_test.py +573 -0
- package/skills/fsqca-analysis/comprehensive_test_report.json +207 -0
- package/skills/fsqca-analysis/comprehensive_test_report.md +35 -0
- package/skills/fsqca-analysis/fsqca_analysis_report.md +35 -0
- package/skills/fsqca-analysis/prompts/calibration-guidance-outline.md +142 -0
- package/skills/fsqca-analysis/prompts/calibration-guidance.md +40 -0
- package/skills/fsqca-analysis/prompts/result-interpretation-outline.md +133 -0
- package/skills/fsqca-analysis/prompts/result-interpretation.md +45 -0
- package/skills/fsqca-analysis/prompts/theoretical-analysis-outline.md +75 -0
- package/skills/fsqca-analysis/prompts/theoretical-analysis.md +34 -0
- package/skills/fsqca-analysis/pyproject.toml +36 -0
- package/skills/fsqca-analysis/references/BEST_PRACTICES-outline.md +158 -0
- package/skills/fsqca-analysis/references/BEST_PRACTICES.md +39 -0
- package/skills/fsqca-analysis/references/METHODOLOGY-outline.md +103 -0
- package/skills/fsqca-analysis/references/METHODOLOGY.md +38 -0
- package/skills/fsqca-analysis/scripts/__pycache__/calibration.cpython-312.pyc +0 -0
- package/skills/fsqca-analysis/scripts/__pycache__/integrated_analysis.cpython-312.pyc +0 -0
- package/skills/fsqca-analysis/scripts/__pycache__/minimization.cpython-312.pyc +0 -0
- package/skills/fsqca-analysis/scripts/__pycache__/truth_table.cpython-312.pyc +0 -0
- package/skills/fsqca-analysis/scripts/calibration.py +540 -0
- package/skills/fsqca-analysis/scripts/integrated_analysis.py +651 -0
- package/skills/fsqca-analysis/scripts/minimization.py +536 -0
- package/skills/fsqca-analysis/scripts/truth_table.py +433 -0
- package/skills/fsqca-analysis/test_fsqca.py +199 -0
- package/skills/fusion_plan.md +232 -0
- package/skills/grounded-theory-expert/SKILL.md +180 -0
- package/skills/grounded-theory-expert/pyproject.toml +23 -0
- package/skills/grounded-theory-expert/scripts/gt_expert_analyzer.py +185 -0
- package/skills/grounded-theory-expert/stages/__pycache__/axial_coding.cpython-312.pyc +0 -0
- package/skills/grounded-theory-expert/stages/__pycache__/open_coding.cpython-312.pyc +0 -0
- package/skills/grounded-theory-expert/stages/__pycache__/selective_coding.cpython-312.pyc +0 -0
- package/skills/grounded-theory-expert/stages/axial_coding.py +294 -0
- package/skills/grounded-theory-expert/stages/open_coding.py +245 -0
- package/skills/grounded-theory-expert/stages/selective_coding.py +410 -0
- package/skills/grounded-theory-expert/test_input.json +27 -0
- package/skills/grounded-theory-expert/test_output.json +874 -0
- package/skills/grounded-theory-expert/tests/sample-cases/hongloumeng.txt +91 -0
- package/skills/grounded-theory-expert/tests/sample-cases/sanguoyanyi_excerpts.txt +169 -0
- package/skills/grounded-theory-expert/tests/sample-cases/shuihuzhuan_excerpts.txt +216 -0
- package/skills/grounded-theory-expert/tests/sample-cases/xiyouji_excerpts.txt +100 -0
- package/skills/grounded-theory-expert/tests/sample-cases//345/233/233/345/244/247/345/220/215/350/221/227ANT/345/210/206/346/236/220/346/212/245/345/221/212.md +283 -0
- package/skills/grounded-theory-expert/tools/__pycache__/memo_writer.cpython-312.pyc +0 -0
- package/skills/grounded-theory-expert/tools/__pycache__/saturation_checker.cpython-312.pyc +0 -0
- package/skills/grounded-theory-expert/tools/memo_writer.py +512 -0
- package/skills/grounded-theory-expert/tools/saturation_checker.py +345 -0
- package/skills/grounded-theory-expert-enhanced/SKILL.md +218 -0
- package/skills/grounded-theory-expert-enhanced/docs/00_master_guide.md +276 -0
- package/skills/grounded-theory-expert-enhanced/docs/01_quick_start.md +59 -0
- package/skills/grounded-theory-expert-enhanced/docs/02_task_flow.md +464 -0
- package/skills/grounded-theory-expert-enhanced/docs/03_path/350/247/204/350/214/203.md +161 -0
- package/skills/grounded-theory-expert-enhanced/docs/04_html_report.md +340 -0
- package/skills/grounded-theory-expert-enhanced/docs/05_best_practices.md +322 -0
- package/skills/grounded-theory-expert-enhanced/docs/FLOW_GUIDE.md +280 -0
- package/skills/grounded-theory-expert-enhanced/docs/LLM/350/260/203/347/224/250/346/250/241/346/213/237/346/265/201/347/250/213.md +299 -0
- package/skills/grounded-theory-expert-enhanced/docs/experts/constructivist_expert.md +64 -0
- package/skills/grounded-theory-expert-enhanced/docs/experts/localization_expert.md +66 -0
- package/skills/grounded-theory-expert-enhanced/docs/experts/phenomenological_expert.md +64 -0
- package/skills/grounded-theory-expert-enhanced/docs/experts/positivist_expert.md +67 -0
- package/skills/grounded-theory-expert-enhanced/docs/prompts/level1_prompts.md +174 -0
- package/skills/grounded-theory-expert-enhanced/docs/prompts/level2_prompts.md +176 -0
- package/skills/grounded-theory-expert-enhanced/docs/prompts/level3_prompts.md +219 -0
- package/skills/grounded-theory-expert-enhanced/docs/prompts/preprocessing_prompts.md +120 -0
- package/skills/grounded-theory-expert-enhanced/docs/references/quality_standards.md +166 -0
- package/skills/grounded-theory-expert-enhanced/docs/references/reliability_methods.md +159 -0
- package/skills/grounded-theory-expert-enhanced/docs/references/saturation_methods.md +193 -0
- package/skills/grounded-theory-expert-enhanced/docs/references/theory_construction.md +166 -0
- package/skills/grounded-theory-expert-enhanced/pyproject.toml +33 -0
- package/skills/grounded-theory-expert-enhanced/references/llm_integration_principles.md +56 -0
- package/skills/grounded-theory-expert-enhanced/scripts/preprocessing_script.py +191 -0
- package/skills/grounded-theory-expert-enhanced/stages/enhanced_axial_coding.py +146 -0
- package/skills/grounded-theory-expert-enhanced/stages/enhanced_open_coding.py +94 -0
- package/skills/grounded-theory-expert-enhanced/stages/enhanced_selective_coding.py +163 -0
- package/skills/grounded-theory-expert-enhanced/tools/.env.example +34 -0
- package/skills/grounded-theory-expert-enhanced/tools/LLM_CONFIG_GUIDE.md +67 -0
- package/skills/grounded-theory-expert-enhanced/tools/__pycache__/analysis_controller.cpython-312.pyc +0 -0
- package/skills/grounded-theory-expert-enhanced/tools/__pycache__/host_cli_coder.cpython-312.pyc +0 -0
- package/skills/grounded-theory-expert-enhanced/tools/__pycache__/llm_expert_coder.cpython-312.pyc +0 -0
- package/skills/grounded-theory-expert-enhanced/tools/__pycache__/project_structure.cpython-312.pyc +0 -0
- package/skills/grounded-theory-expert-enhanced/tools/__pycache__/reliability_validator.cpython-312.pyc +0 -0
- package/skills/grounded-theory-expert-enhanced/tools/analysis_controller.py +2344 -0
- package/skills/grounded-theory-expert-enhanced/tools/enhanced_memo_writer.py +90 -0
- package/skills/grounded-theory-expert-enhanced/tools/enhanced_saturation_checker.py +216 -0
- package/skills/grounded-theory-expert-enhanced/tools/fix_dirs.py +48 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/00_raw_data/source_document.txt +91 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/01_preprocessing/preprocessing_report.json +15 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/01_preprocessing/text_cleaned/cleaned_text.txt +198 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/01_preprocessing/text_tokenized/tokenized_text.json +1099 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/02_segmentation/segment_10_1%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/02_segmentation/segment_10_1%/segment_text.txt +20 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/02_segmentation/segment_10_2%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/02_segmentation/segment_10_2%/segment_text.txt +21 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/02_segmentation/segment_10_3%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/02_segmentation/segment_10_3%/segment_text.txt +23 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/02_segmentation/segment_70%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/02_segmentation/segment_70%/segment_text.txt +135 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/02_segmentation/segmentation_summary.json +34 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_constructivist/initial_concepts.json +242 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_constructivist/open_coding_results.json +250 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_constructivist/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_localization/initial_concepts.json +242 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_localization/open_coding_results.json +250 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_localization/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_phenomenological/initial_concepts.json +242 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_phenomenological/open_coding_results.json +250 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_phenomenological/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_positivist/initial_concepts.json +242 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_positivist/open_coding_results.json +250 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/expert_positivist/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/03_level1_coding/level1_all_experts_summary.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/04_level1_consensus/consensus_achievement/consensus_report.json +13 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/04_level1_consensus/consensus_achievement/merged_concept_library.json +308 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/04_level1_consensus/consensus_calculation/cohens_kappa.json +10 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/04_level1_consensus/consensus_calculation/fleiss_kappa.json +5 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/04_level1_consensus/consensus_calculation/krippendorff_alpha.json +5 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/05_level2_coding/expert_constructivist/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/05_level2_coding/expert_localization/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/05_level2_coding/expert_phenomenological/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/05_level2_coding/expert_positivist/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/05_level2_coding/level2_all_experts_summary.json +31 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/06_level2_consensus/divergence_resolution/divergence_report.json +10 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/06_level2_consensus/divergence_resolution/merged_category_library.json +7 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/06_level2_consensus/divergence_resolution/paradigm_model.json +9 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/07_level3_coding/expert_constructivist/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/07_level3_coding/expert_localization/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/07_level3_coding/expert_phenomenological/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/07_level3_coding/expert_positivist/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/07_level3_coding/level3_all_experts_summary.json +30 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/08_level3_consensus/consensus_calculation/core_category_comparison.json +40 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/08_level3_consensus/theoretical_integration/final_theoretical_integration.json +52 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/08_level3_consensus/theoretical_integration/theory_description.md +40 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/09_saturation_test/final_saturation_verdict.json +32 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/09_saturation_test/iteration_100/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/09_saturation_test/iteration_70/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/09_saturation_test/iteration_80/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/09_saturation_test/iteration_90/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/10_final_report/codebook.md +84 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/10_final_report/comprehensive_analysis_report.md +360 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/10_final_report/project_summary.json +214 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/10_final_report/theory_description.md +91 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/config.json +68 -0
- package/skills/grounded-theory-expert-enhanced/tools/hongloumeng_project/project_manifest.json +9 -0
- package/skills/grounded-theory-expert-enhanced/tools/host_cli_coder.py +168 -0
- package/skills/grounded-theory-expert-enhanced/tools/llm_expert_coder.py +469 -0
- package/skills/grounded-theory-expert-enhanced/tools/project_structure.py +1202 -0
- package/skills/grounded-theory-expert-enhanced/tools/reliability_validator.py +800 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/00_raw_data/source_document.txt +169 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/01_preprocessing/preprocessing_report.json +15 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/01_preprocessing/text_cleaned/cleaned_text.txt +200 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/01_preprocessing/text_tokenized/tokenized_text.json +1109 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/02_segmentation/segment_10_1%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/02_segmentation/segment_10_1%/segment_text.txt +22 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/02_segmentation/segment_10_2%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/02_segmentation/segment_10_2%/segment_text.txt +18 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/02_segmentation/segment_10_3%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/02_segmentation/segment_10_3%/segment_text.txt +24 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/02_segmentation/segment_70%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/02_segmentation/segment_70%/segment_text.txt +134 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/02_segmentation/segmentation_summary.json +34 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_constructivist/initial_concepts.json +242 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_constructivist/open_coding_results.json +250 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_constructivist/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_localization/initial_concepts.json +242 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_localization/open_coding_results.json +250 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_localization/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_phenomenological/initial_concepts.json +242 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_phenomenological/open_coding_results.json +250 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_phenomenological/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_positivist/initial_concepts.json +242 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_positivist/open_coding_results.json +250 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/expert_positivist/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/03_level1_coding/level1_all_experts_summary.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/04_level1_consensus/consensus_achievement/consensus_report.json +13 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/04_level1_consensus/consensus_achievement/merged_concept_library.json +308 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/04_level1_consensus/consensus_calculation/cohens_kappa.json +10 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/04_level1_consensus/consensus_calculation/fleiss_kappa.json +5 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/04_level1_consensus/consensus_calculation/krippendorff_alpha.json +5 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/05_level2_coding/expert_constructivist/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/05_level2_coding/expert_localization/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/05_level2_coding/expert_phenomenological/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/05_level2_coding/expert_positivist/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/05_level2_coding/level2_all_experts_summary.json +31 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/06_level2_consensus/divergence_resolution/divergence_report.json +10 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/06_level2_consensus/divergence_resolution/merged_category_library.json +7 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/06_level2_consensus/divergence_resolution/paradigm_model.json +9 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/07_level3_coding/expert_constructivist/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/07_level3_coding/expert_localization/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/07_level3_coding/expert_phenomenological/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/07_level3_coding/expert_positivist/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/07_level3_coding/level3_all_experts_summary.json +30 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/08_level3_consensus/consensus_calculation/core_category_comparison.json +40 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/08_level3_consensus/theoretical_integration/final_theoretical_integration.json +52 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/08_level3_consensus/theoretical_integration/theory_description.md +40 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/09_saturation_test/final_saturation_verdict.json +32 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/09_saturation_test/iteration_100/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/09_saturation_test/iteration_70/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/09_saturation_test/iteration_80/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/09_saturation_test/iteration_90/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/10_final_report/codebook.md +84 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/10_final_report/comprehensive_analysis_report.md +360 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/10_final_report/project_summary.json +214 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/10_final_report/theory_description.md +91 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/config.json +68 -0
- package/skills/grounded-theory-expert-enhanced/tools/sanguoyanyi_project/project_manifest.json +9 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_claude.py +40 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_host_cli_coder.py +168 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/00_raw_data/source_document.txt +11 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/01_preprocessing/preprocessing_report.json +15 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/01_preprocessing/text_cleaned/cleaned_text.txt +16 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/01_preprocessing/text_tokenized/tokenized_text.json +129 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/02_segmentation/segment_10_1%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/02_segmentation/segment_10_1%/segment_text.txt +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/02_segmentation/segment_10_2%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/02_segmentation/segment_10_2%/segment_text.txt +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/02_segmentation/segment_10_3%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/02_segmentation/segment_10_3%/segment_text.txt +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/02_segmentation/segment_70%/segment_info.json +8 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/02_segmentation/segment_70%/segment_text.txt +11 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/02_segmentation/segmentation_summary.json +34 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_constructivist/initial_concepts.json +218 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_constructivist/open_coding_results.json +226 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_constructivist/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_localization/initial_concepts.json +218 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_localization/open_coding_results.json +226 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_localization/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_phenomenological/initial_concepts.json +218 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_phenomenological/open_coding_results.json +226 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_phenomenological/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_positivist/initial_concepts.json +218 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_positivist/open_coding_results.json +226 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/expert_positivist/raw_quotes.json +1 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/03_level1_coding/level1_all_experts_summary.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/04_level1_consensus/consensus_achievement/consensus_report.json +13 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/04_level1_consensus/consensus_achievement/merged_concept_library.json +278 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/04_level1_consensus/consensus_calculation/cohens_kappa.json +10 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/04_level1_consensus/consensus_calculation/fleiss_kappa.json +5 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/04_level1_consensus/consensus_calculation/krippendorff_alpha.json +5 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/05_level2_coding/expert_constructivist/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/05_level2_coding/expert_localization/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/05_level2_coding/expert_phenomenological/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/05_level2_coding/expert_positivist/axial_coding_results.json +14 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/05_level2_coding/level2_all_experts_summary.json +31 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/06_level2_consensus/divergence_resolution/divergence_report.json +10 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/06_level2_consensus/divergence_resolution/merged_category_library.json +7 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/06_level2_consensus/divergence_resolution/paradigm_model.json +9 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/07_level3_coding/expert_constructivist/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/07_level3_coding/expert_localization/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/07_level3_coding/expert_phenomenological/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/07_level3_coding/expert_positivist/selective_coding_results.json +28 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/07_level3_coding/level3_all_experts_summary.json +30 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/08_level3_consensus/consensus_calculation/core_category_comparison.json +40 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/08_level3_consensus/theoretical_integration/final_theoretical_integration.json +52 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/08_level3_consensus/theoretical_integration/theory_description.md +40 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/09_saturation_test/final_saturation_verdict.json +32 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/09_saturation_test/iteration_100/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/09_saturation_test/iteration_70/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/09_saturation_test/iteration_80/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/09_saturation_test/iteration_90/saturation_indicators.json +6 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/10_final_report/codebook.md +84 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/10_final_report/comprehensive_analysis_report.md +360 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/10_final_report/project_summary.json +214 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/10_final_report/theory_description.md +91 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/config.json +68 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_project_3/project_manifest.json +9 -0
- package/skills/grounded-theory-expert-enhanced/tools/test_real_coding.py +135 -0
- package/skills/historical-materialist-analysis/SKILL.md +186 -0
- package/skills/information-verification/INFO.md +69 -0
- package/skills/information-verification/README.md +80 -0
- package/skills/information-verification/SKILL.md +305 -0
- package/skills/information-verification/prompts.txt +103 -0
- package/skills/information-verification/reference.md +212 -0
- package/skills/information-verification/skill.js +1056 -0
- package/skills/information-verification/skill.json +198 -0
- package/skills/management-theory-analysis/INFO.md +74 -0
- package/skills/management-theory-analysis/README.md +63 -0
- package/skills/management-theory-analysis/SKILL.md +361 -0
- package/skills/management-theory-analysis/prompts.txt +113 -0
- package/skills/management-theory-analysis/reference.md +167 -0
- package/skills/management-theory-analysis/skill.js +561 -0
- package/skills/management-theory-analysis/skill.json +223 -0
- package/skills/mathematical-statistics/SKILL.md +227 -0
- package/skills/mathematical-statistics/pyproject.toml +36 -0
- package/skills/mathematical-statistics/scripts/statistics_toolkit.py +270 -0
- package/skills/msqca-analysis/SKILL.md +261 -0
- package/skills/msqca-analysis/assets/templates/data_template.csv +11 -0
- package/skills/msqca-analysis/assets/templates/report_template.md +188 -0
- package/skills/msqca-analysis/integrated_analysis_report.md +35 -0
- package/skills/msqca-analysis/prompts/calibration-guidance.md +251 -0
- package/skills/msqca-analysis/prompts/result-interpretation.md +253 -0
- package/skills/msqca-analysis/prompts/theoretical-analysis.md +172 -0
- package/skills/msqca-analysis/pyproject.toml +37 -0
- package/skills/msqca-analysis/references/BEST_PRACTICES.md +612 -0
- package/skills/msqca-analysis/references/METHODOLOGY.md +282 -0
- package/skills/msqca-analysis/scripts/__pycache__/calibration.cpython-312.pyc +0 -0
- package/skills/msqca-analysis/scripts/__pycache__/integrated_analysis.cpython-312.pyc +0 -0
- package/skills/msqca-analysis/scripts/__pycache__/minimization.cpython-312.pyc +0 -0
- package/skills/msqca-analysis/scripts/__pycache__/truth_table.cpython-312.pyc +0 -0
- package/skills/msqca-analysis/scripts/calibration.py +341 -0
- package/skills/msqca-analysis/scripts/integrated_analysis.py +621 -0
- package/skills/msqca-analysis/scripts/integrated_analysis_report.md +35 -0
- package/skills/msqca-analysis/scripts/minimization.py +580 -0
- package/skills/msqca-analysis/scripts/truth_table.py +438 -0
- package/skills/network-computation/SKILL.md +270 -0
- package/skills/network-computation/pyproject.toml +34 -0
- package/skills/network-computation/scripts/calculate_centrality.py +213 -0
- package/skills/network-computation-expert/SKILL.md +183 -0
- package/skills/network-computation-expert/modules/__pycache__/centrality_analysis.cpython-312.pyc +0 -0
- package/skills/network-computation-expert/modules/__pycache__/community_detection.cpython-312.pyc +0 -0
- package/skills/network-computation-expert/modules/__pycache__/data_processing.cpython-312.pyc +0 -0
- package/skills/network-computation-expert/modules/__pycache__/network_construction.cpython-312.pyc +0 -0
- package/skills/network-computation-expert/modules/centrality_analysis.py +438 -0
- package/skills/network-computation-expert/modules/community_detection.py +467 -0
- package/skills/network-computation-expert/modules/data_processing.py +467 -0
- package/skills/network-computation-expert/modules/network_construction.py +460 -0
- package/skills/network-computation-expert/pyproject.toml +27 -0
- package/skills/network-computation-expert/scripts/network_computation_expert_analyzer.py +208 -0
- package/skills/network-computation-expert/test_input.json +140 -0
- package/skills/network-computation-expert/test_output.json +627 -0
- package/skills/operations-analysis/INFO.md +76 -0
- package/skills/operations-analysis/README.md +61 -0
- package/skills/operations-analysis/SKILL.md +365 -0
- package/skills/operations-analysis/prompts.txt +109 -0
- package/skills/operations-analysis/pyproject.toml +35 -0
- package/skills/operations-analysis/reference.md +178 -0
- package/skills/operations-analysis/skill.js +870 -0
- package/skills/operations-analysis/skill.json +219 -0
- package/skills/patent-downloader/README.md +358 -0
- package/skills/patent-downloader/SKILL.md +309 -0
- package/skills/patent-downloader/assets/README_TEMPLATE.md +140 -0
- package/skills/patent-downloader/assets/requirements.txt +5 -0
- package/skills/patent-downloader/references/google_patents.md +210 -0
- package/skills/patent-downloader/scripts/patent_server.py +279 -0
- package/skills/performing-axial-coding/SKILL.md +301 -0
- package/skills/performing-axial-coding/pyproject.toml +30 -0
- package/skills/performing-axial-coding/references/README.md +111 -0
- package/skills/performing-axial-coding/references/_BACKUP_paradigm-theory.md +375 -0
- package/skills/performing-axial-coding/references/_BACKUP_relationship-types.md +544 -0
- package/skills/performing-axial-coding/references/_BACKUP_troubleshooting.md +627 -0
- package/skills/performing-axial-coding/references/category-construction/INDEX.md +190 -0
- package/skills/performing-axial-coding/references/category-construction/complete-example.md +438 -0
- package/skills/performing-axial-coding/references/paradigm-theory/INDEX.md +181 -0
- package/skills/performing-axial-coding/references/paradigm-theory/chinese-adaptation.md +349 -0
- package/skills/performing-axial-coding/references/paradigm-theory/quality-standards.md +345 -0
- package/skills/performing-axial-coding/references/paradigm-theory/six-components.md +323 -0
- package/skills/performing-axial-coding/references/relationship-types/INDEX.md +126 -0
- package/skills/performing-axial-coding/references/relationship-types/causal.md +141 -0
- package/skills/performing-axial-coding/references/relationship-types/conditional.md +150 -0
- package/skills/performing-axial-coding/references/troubleshooting/INDEX.md +136 -0
- package/skills/performing-axial-coding/references/troubleshooting/category-issues.md +129 -0
- package/skills/performing-axial-coding/references/troubleshooting/relationship-issues.md +137 -0
- package/skills/performing-axial-coding/references/troubleshooting/technical-issues.md +184 -0
- package/skills/performing-axial-coding/scripts/__pycache__/build_relationships.cpython-312.pyc +0 -0
- package/skills/performing-axial-coding/scripts/__pycache__/construct_paradigm.cpython-312.pyc +0 -0
- package/skills/performing-axial-coding/scripts/__pycache__/identify_categories.cpython-312.pyc +0 -0
- package/skills/performing-axial-coding/scripts/build_relationships.py +314 -0
- package/skills/performing-axial-coding/scripts/categories_test.json +122 -0
- package/skills/performing-axial-coding/scripts/construct_paradigm.py +271 -0
- package/skills/performing-axial-coding/scripts/identify_categories.py +267 -0
- package/skills/performing-axial-coding/tests/test_integration.py +84 -0
- package/skills/performing-centrality-analysis/SKILL.md +210 -0
- package/skills/performing-centrality-analysis/pyproject.toml +21 -0
- package/skills/performing-centrality-analysis/references/README.md +60 -0
- package/skills/performing-centrality-analysis/references/centrality-theory/INDEX.md +136 -0
- package/skills/performing-centrality-analysis/references/chinese-context/INDEX.md +169 -0
- package/skills/performing-centrality-analysis/scripts/__pycache__/calculate_centrality.cpython-312.pyc +0 -0
- package/skills/performing-centrality-analysis/scripts/calculate_centrality.py +213 -0
- package/skills/performing-centrality-analysis/tests/__pycache__/test_calculate_centrality.cpython-312-pytest-7.4.3.pyc +0 -0
- package/skills/performing-centrality-analysis/tests/test_calculate_centrality.py +218 -0
- package/skills/performing-network-computation/SKILL.md +224 -0
- package/skills/performing-network-computation/pyproject.toml +34 -0
- package/skills/performing-network-computation/scripts/build_network.py +260 -0
- package/skills/performing-network-computation/scripts/calculate_metrics.py +236 -0
- package/skills/performing-network-computation/scripts/detect_communities.py +281 -0
- package/skills/performing-network-computation/scripts/visualize_network.py +272 -0
- package/skills/performing-open-coding/SKILL.md +299 -0
- package/skills/performing-open-coding/pyproject.toml +35 -0
- package/skills/performing-open-coding/references/chinese-context.md +270 -0
- package/skills/performing-open-coding/references/examples.md +338 -0
- package/skills/performing-open-coding/references/theory.md +215 -0
- package/skills/performing-open-coding/references/troubleshooting.md +491 -0
- package/skills/performing-open-coding/scripts/__pycache__/auto_loader.cpython-312.pyc +0 -0
- package/skills/performing-open-coding/scripts/__pycache__/compare_codes.cpython-312.pyc +0 -0
- package/skills/performing-open-coding/scripts/__pycache__/preprocess_text.cpython-312.pyc +0 -0
- package/skills/performing-open-coding/scripts/auto_loader.py +195 -0
- package/skills/performing-open-coding/scripts/cluster_concepts.py +294 -0
- package/skills/performing-open-coding/scripts/clusters_test.json +169 -0
- package/skills/performing-open-coding/scripts/compare_codes.py +257 -0
- package/skills/performing-open-coding/scripts/comparison_test.json +19 -0
- package/skills/performing-open-coding/scripts/concepts_test.json +135 -0
- package/skills/performing-open-coding/scripts/preprocess_text.py +218 -0
- package/skills/performing-open-coding/scripts/test_output.json +134 -0
- package/skills/performing-open-coding/scripts/validate_codes.py +302 -0
- package/skills/performing-open-coding/scripts/validation_test.json +95 -0
- package/skills/performing-open-coding/tests/__pycache__/test_auto_loader.cpython-312-pytest-7.4.3.pyc +0 -0
- package/skills/performing-open-coding/tests/__pycache__/test_preprocess.cpython-312-pytest-7.4.3.pyc +0 -0
- package/skills/performing-open-coding/tests/run_integration_tests.py +148 -0
- package/skills/performing-open-coding/tests/test_auto_loader.py +233 -0
- package/skills/performing-open-coding/tests/test_compare_codes.py +336 -0
- package/skills/performing-open-coding/tests/test_preprocess.py +187 -0
- package/skills/performing-selective-coding/SKILL.md +305 -0
- package/skills/performing-selective-coding/pyproject.toml +21 -0
- package/skills/performing-selective-coding/references/README.md +86 -0
- package/skills/performing-selective-coding/references/core-category/INDEX.md +132 -0
- package/skills/performing-selective-coding/references/saturation/INDEX.md +153 -0
- package/skills/performing-selective-coding/references/storyline/INDEX.md +166 -0
- package/skills/performing-selective-coding/references/theory-integration/INDEX.md +203 -0
- package/skills/performing-selective-coding/scripts/README.md +101 -0
- package/skills/performing-selective-coding/scripts/__pycache__/check_saturation.cpython-312.pyc +0 -0
- package/skills/performing-selective-coding/scripts/__pycache__/identify_core_category.cpython-312.pyc +0 -0
- package/skills/performing-selective-coding/scripts/check_saturation.py +236 -0
- package/skills/performing-selective-coding/scripts/construct_storyline.py +237 -0
- package/skills/performing-selective-coding/scripts/identify_core_category.py +265 -0
- package/skills/performing-selective-coding/scripts/integrate_theory.py +173 -0
- package/skills/performing-selective-coding/tests/__pycache__/test_check_saturation.cpython-312-pytest-7.4.3.pyc +0 -0
- package/skills/performing-selective-coding/tests/__pycache__/test_identify_core_category.cpython-312-pytest-7.4.3.pyc +0 -0
- package/skills/performing-selective-coding/tests/test_check_saturation.py +157 -0
- package/skills/performing-selective-coding/tests/test_identify_core_category.py +157 -0
- package/skills/practical-marxist-application/SKILL.md +230 -0
- package/skills/processing-network-data/SKILL.md +146 -0
- package/skills/processing-network-data/pyproject.toml +33 -0
- package/skills/processing-network-data/scripts/clean_survey_data.py +285 -0
- package/skills/processing-network-data/scripts/extract_network_data.py +286 -0
- package/skills/processing-network-data/scripts/transform_data_format.py +334 -0
- package/skills/processing-network-data/scripts/validate_network_data.py +322 -0
- package/skills/pubscholar-auto-search/AGENTSKILLS_OPTIMIZATION_REPORT.md +540 -0
- package/skills/pubscholar-auto-search/README.md +66 -0
- package/skills/pubscholar-auto-search/SKILL.md +242 -0
- package/skills/pubscholar-auto-search/references/API_REFERENCE.md +349 -0
- package/skills/pubscholar-auto-search/references/DEVELOPMENT.md +395 -0
- package/skills/pubscholar-auto-search/references/EXTENSION_STRATEGIES.md +415 -0
- package/skills/pubscholar-auto-search/references/USER_GUIDE.md +432 -0
- package/skills/pubscholar-auto-search/requirements.txt +17 -0
- package/skills/pubscholar-auto-search/scripts/__pycache__/pubscholar_searcher.cpython-312.pyc +0 -0
- package/skills/pubscholar-auto-search/scripts/pubscholar_searcher.py +602 -0
- package/skills/pubscholar-auto-search/scripts/test_pubscholar_search.py +205 -0
- package/skills/research-design/DEPENDENCY_MANAGEMENT.md +112 -0
- package/skills/research-design/README.md +158 -0
- package/skills/research-design/SKILL.md +82 -0
- package/skills/research-design/assets/templates/research_design_template.md +297 -0
- package/skills/research-design/prompts/analysis-strategy-outline.md +307 -0
- package/skills/research-design/prompts/analysis-strategy.md +37 -0
- package/skills/research-design/prompts/data-planning-outline.md +204 -0
- package/skills/research-design/prompts/data-planning.md +36 -0
- package/skills/research-design/prompts/ethics-review-outline.md +406 -0
- package/skills/research-design/prompts/ethics-review.md +36 -0
- package/skills/research-design/prompts/method-selection-outline.md +181 -0
- package/skills/research-design/prompts/method-selection.md +36 -0
- package/skills/research-design/prompts/problem-definition-outline.md +107 -0
- package/skills/research-design/prompts/problem-definition.md +30 -0
- package/skills/research-design/pyproject.toml +35 -0
- package/skills/research-design/references/best-practices.md +185 -0
- package/skills/research-design/references/methodology.md +162 -0
- package/skills/research-design/scripts/__pycache__/design_evaluation.cpython-312.pyc +0 -0
- package/skills/research-design/scripts/__pycache__/integrated_analysis.cpython-312.pyc +0 -0
- package/skills/research-design/scripts/__pycache__/literature_analysis.cpython-312.pyc +0 -0
- package/skills/research-design/scripts/__pycache__/method_matching.cpython-312.pyc +0 -0
- package/skills/research-design/scripts/design_evaluation.py +670 -0
- package/skills/research-design/scripts/integrated_analysis.py +543 -0
- package/skills/research-design/scripts/literature_analysis.py +303 -0
- package/skills/research-design/scripts/method_matching.py +478 -0
- package/skills/research-design/test_research_design.py +281 -0
- package/skills/sna-analysis/integration_with_trusted_scraper.md +115 -0
- package/skills/spark-integration/INFO.md +64 -0
- package/skills/spark-integration/README.md +159 -0
- package/skills/spark-integration/SKILL.md +232 -0
- package/skills/spark-integration/skill.js +308 -0
- package/skills/spark-integration/skill.json +37 -0
- package/skills/trusted-web-scraper/CONFIG.yaml +60 -0
- package/skills/trusted-web-scraper/README.md +137 -0
- package/skills/trusted-web-scraper/SKILL.md +173 -0
- package/skills/trusted-web-scraper/final_test.json +240 -0
- package/skills/trusted-web-scraper/modules/__pycache__/core_trusted_scraper.cpython-312.pyc +0 -0
- package/skills/trusted-web-scraper/modules/__pycache__/scraper.cpython-312.pyc +0 -0
- package/skills/trusted-web-scraper/modules/__pycache__/trusted_web_scraper.cpython-312.pyc +0 -0
- package/skills/trusted-web-scraper/modules/core_trusted_scraper.py +778 -0
- package/skills/trusted-web-scraper/modules/scraper_minimal.py +623 -0
- package/skills/trusted-web-scraper/pyproject.toml +46 -0
- package/skills/trusted-web-scraper/scripts/__pycache__/trusted_web_scraper.cpython-312.pyc +0 -0
- package/skills/trusted-web-scraper/scripts/trusted_web_scraper.py +109 -0
- package/skills/trusted-web-scraper/test_comprehensive.py +53 -0
- package/skills/trusted-web-scraper/test_full.py +154 -0
- package/skills/trusted-web-scraper/test_input.json +10 -0
- package/skills/trusted-web-scraper/test_output.json +162 -0
- package/skills/trusted-web-scraper/test_output2.json +240 -0
- package/skills/trusted-web-scraper/test_output3.json +240 -0
- package/skills/trusted-web-scraper/test_output4.json +240 -0
- package/skills/validity-reliability/SKILL.md +130 -0
- package/skills/validity-reliability/pyproject.toml +36 -0
- package/skills/validity-reliability/scripts/validity_reliability_toolkit.py +480 -0
- package/skills/verify_compliance.ps1 +40 -0
- package/skills/visualization-expert/INFO.md +77 -0
- package/skills/visualization-expert/README.md +78 -0
- package/skills/visualization-expert/SKILL.md +374 -0
- package/skills/visualization-expert/prompts.txt +92 -0
- package/skills/visualization-expert/reference.md +212 -0
- package/skills/visualization-expert/skill.js +904 -0
- package/skills/visualization-expert/skill.json +195 -0
- package/skills/writing-grounded-theory-memos/SKILL.md +301 -0
|
@@ -0,0 +1,802 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""
|
|
4
|
+
社会网络分析器
|
|
5
|
+
分析个体的社会关系网络质量和连接状况
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import numpy as np
|
|
9
|
+
import pandas as pd
|
|
10
|
+
from typing import Dict, List, Tuple, Any, Optional, Set
|
|
11
|
+
from dataclasses import dataclass
|
|
12
|
+
from datetime import datetime, timedelta
|
|
13
|
+
from collections import defaultdict, Counter
|
|
14
|
+
import json
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@dataclass
|
|
18
|
+
class SocialNetworkMetrics:
|
|
19
|
+
"""社会网络指标数据类"""
|
|
20
|
+
network_size: float # 网络规模
|
|
21
|
+
network_density: float # 网络密度
|
|
22
|
+
tie_strength: float # 连接强度
|
|
23
|
+
structural_holes: float # 结构洞数量
|
|
24
|
+
betweenness_centrality: float # 介数中心性
|
|
25
|
+
closeness_centrality: float # 接近中心性
|
|
26
|
+
eigenvector_centrality: float # 特征向量中心性
|
|
27
|
+
reciprocity: float # 互惠性
|
|
28
|
+
transitivity: float # 传递性
|
|
29
|
+
diversity_index: float # 多样性指数
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class SocialNetworkAnalyzer:
|
|
33
|
+
"""社会网络分析器"""
|
|
34
|
+
|
|
35
|
+
def __init__(self):
|
|
36
|
+
self.network_weights = {
|
|
37
|
+
'network_size': 0.15,
|
|
38
|
+
'network_density': 0.12,
|
|
39
|
+
'tie_strength': 0.15,
|
|
40
|
+
'structural_holes': 0.10,
|
|
41
|
+
'betweenness_centrality': 0.12,
|
|
42
|
+
'closeness_centrality': 0.10,
|
|
43
|
+
'eigenvector_centrality': 0.08,
|
|
44
|
+
'reciprocity': 0.08,
|
|
45
|
+
'transitivity': 0.05,
|
|
46
|
+
'diversity_index': 0.05
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
self.network_thresholds = {
|
|
50
|
+
'excellent': 0.80,
|
|
51
|
+
'good': 0.65,
|
|
52
|
+
'satisfactory': 0.50,
|
|
53
|
+
'needs_improvement': 0.35,
|
|
54
|
+
'poor': 0.20
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
self.relationship_types = [
|
|
58
|
+
'family', 'friends', 'colleagues', 'neighbors',
|
|
59
|
+
'acquaintances', 'online_connections', 'professional_contacts'
|
|
60
|
+
]
|
|
61
|
+
|
|
62
|
+
def analyze_social_network(self, network_data: Dict[str, Any]) -> Dict[str, Any]:
|
|
63
|
+
"""
|
|
64
|
+
分析社会网络
|
|
65
|
+
|
|
66
|
+
Args:
|
|
67
|
+
network_data: 社会网络数据字典
|
|
68
|
+
|
|
69
|
+
Returns:
|
|
70
|
+
分析结果字典
|
|
71
|
+
"""
|
|
72
|
+
# 解析网络数据
|
|
73
|
+
edges = network_data.get('edges', [])
|
|
74
|
+
nodes = network_data.get('nodes', [])
|
|
75
|
+
relationship_data = network_data.get('relationship_data', {})
|
|
76
|
+
|
|
77
|
+
# 计算网络指标
|
|
78
|
+
metrics = self._calculate_network_metrics(nodes, edges, relationship_data)
|
|
79
|
+
|
|
80
|
+
# 分析网络结构
|
|
81
|
+
network_structure = self._analyze_network_structure(metrics)
|
|
82
|
+
|
|
83
|
+
# 评估网络质量
|
|
84
|
+
network_quality = self._assess_network_quality(metrics)
|
|
85
|
+
|
|
86
|
+
# 识别网络角色
|
|
87
|
+
network_roles = self._identify_network_roles(metrics)
|
|
88
|
+
|
|
89
|
+
# 分析关系质量
|
|
90
|
+
relationship_quality = self._analyze_relationship_quality(relationship_data)
|
|
91
|
+
|
|
92
|
+
# 评估社会支持
|
|
93
|
+
social_support = self._assess_social_support(metrics, relationship_data)
|
|
94
|
+
|
|
95
|
+
# 预测网络发展
|
|
96
|
+
network_evolution = self._predict_network_evolution(metrics)
|
|
97
|
+
|
|
98
|
+
# 评估异化相关性
|
|
99
|
+
alienation_correlation = self._assess_alienation_correlation(metrics)
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
'network_metrics': metrics,
|
|
103
|
+
'network_structure': network_structure,
|
|
104
|
+
'network_quality': network_quality,
|
|
105
|
+
'network_roles': network_roles,
|
|
106
|
+
'relationship_quality': relationship_quality,
|
|
107
|
+
'social_support': social_support,
|
|
108
|
+
'network_evolution': network_evolution,
|
|
109
|
+
'alienation_correlation': alienation_correlation,
|
|
110
|
+
'improvement_suggestions': self._generate_improvement_suggestions(metrics),
|
|
111
|
+
'analysis_timestamp': datetime.now().isoformat()
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
def _calculate_network_metrics(self, nodes: List[str], edges: List[Tuple[str, str]],
|
|
115
|
+
relationship_data: Dict[str, Dict]) -> SocialNetworkMetrics:
|
|
116
|
+
"""计算网络指标"""
|
|
117
|
+
if not nodes:
|
|
118
|
+
# 返回默认指标
|
|
119
|
+
return SocialNetworkMetrics(
|
|
120
|
+
network_size=0.1, network_density=0.1, tie_strength=0.1,
|
|
121
|
+
structural_holes=0.1, betweenness_centrality=0.1,
|
|
122
|
+
closeness_centrality=0.1, eigenvector_centrality=0.1,
|
|
123
|
+
reciprocity=0.1, transitivity=0.1, diversity_index=0.1
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
# 网络规模
|
|
127
|
+
network_size = min(1.0, len(nodes) / 50) # 假设50为理想网络规模
|
|
128
|
+
|
|
129
|
+
# 网络密度
|
|
130
|
+
max_edges = len(nodes) * (len(nodes) - 1) / 2
|
|
131
|
+
network_density = min(1.0, len(edges) / max_edges) if max_edges > 0 else 0
|
|
132
|
+
|
|
133
|
+
# 连接强度
|
|
134
|
+
tie_strength = self._calculate_average_tie_strength(edges, relationship_data)
|
|
135
|
+
|
|
136
|
+
# 结构洞 (使用Burt's constraint简化计算)
|
|
137
|
+
structural_holes = self._calculate_structural_holes(nodes, edges)
|
|
138
|
+
|
|
139
|
+
# 中心性指标
|
|
140
|
+
betweenness_centrality = self._calculate_betweenness_centrality(nodes, edges)
|
|
141
|
+
closeness_centrality = self._calculate_closeness_centrality(nodes, edges)
|
|
142
|
+
eigenvector_centrality = self._calculate_eigenvector_centrality(nodes, edges)
|
|
143
|
+
|
|
144
|
+
# 互惠性
|
|
145
|
+
reciprocity = self._calculate_reciprocity(edges)
|
|
146
|
+
|
|
147
|
+
# 传递性
|
|
148
|
+
transitivity = self._calculate_transitivity(nodes, edges)
|
|
149
|
+
|
|
150
|
+
# 多样性指数
|
|
151
|
+
diversity_index = self._calculate_diversity_index(relationship_data)
|
|
152
|
+
|
|
153
|
+
return SocialNetworkMetrics(
|
|
154
|
+
network_size=network_size,
|
|
155
|
+
network_density=network_density,
|
|
156
|
+
tie_strength=tie_strength,
|
|
157
|
+
structural_holes=structural_holes,
|
|
158
|
+
betweenness_centrality=betweenness_centrality,
|
|
159
|
+
closeness_centrality=closeness_centrality,
|
|
160
|
+
eigenvector_centrality=eigenvector_centrality,
|
|
161
|
+
reciprocity=reciprocity,
|
|
162
|
+
transitivity=transitivity,
|
|
163
|
+
diversity_index=diversity_index
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
def _calculate_average_tie_strength(self, edges: List[Tuple[str, str]],
|
|
167
|
+
relationship_data: Dict[str, Dict]) -> float:
|
|
168
|
+
"""计算平均连接强度"""
|
|
169
|
+
if not edges or not relationship_data:
|
|
170
|
+
return 0.5
|
|
171
|
+
|
|
172
|
+
total_strength = 0
|
|
173
|
+
valid_edges = 0
|
|
174
|
+
|
|
175
|
+
for edge in edges:
|
|
176
|
+
edge_key = f"{edge[0]}-{edge[1]}"
|
|
177
|
+
reverse_key = f"{edge[1]}-{edge[0]}"
|
|
178
|
+
|
|
179
|
+
strength = 0
|
|
180
|
+
if edge_key in relationship_data:
|
|
181
|
+
strength = relationship_data[edge_key].get('strength', 0.5)
|
|
182
|
+
elif reverse_key in relationship_data:
|
|
183
|
+
strength = relationship_data[reverse_key].get('strength', 0.5)
|
|
184
|
+
|
|
185
|
+
total_strength += strength
|
|
186
|
+
valid_edges += 1
|
|
187
|
+
|
|
188
|
+
return total_strength / valid_edges if valid_edges > 0 else 0.5
|
|
189
|
+
|
|
190
|
+
def _calculate_structural_holes(self, nodes: List[str], edges: List[Tuple[str, str]]) -> float:
|
|
191
|
+
"""计算结构洞 (简化版本)"""
|
|
192
|
+
if len(nodes) < 3:
|
|
193
|
+
return 0.1
|
|
194
|
+
|
|
195
|
+
# 构建邻接矩阵
|
|
196
|
+
adjacency = defaultdict(set)
|
|
197
|
+
for edge in edges:
|
|
198
|
+
adjacency[edge[0]].add(edge[1])
|
|
199
|
+
adjacency[edge[1]].add(edge[0])
|
|
200
|
+
|
|
201
|
+
# 计算每个节点的结构洞
|
|
202
|
+
total_holes = 0
|
|
203
|
+
for node in nodes:
|
|
204
|
+
neighbors = adjacency[node]
|
|
205
|
+
if len(neighbors) < 2:
|
|
206
|
+
continue
|
|
207
|
+
|
|
208
|
+
# 简化的结构洞计算:考虑非连接邻居对
|
|
209
|
+
non_connections = 0
|
|
210
|
+
total_pairs = 0
|
|
211
|
+
neighbor_list = list(neighbors)
|
|
212
|
+
|
|
213
|
+
for i in range(len(neighbor_list)):
|
|
214
|
+
for j in range(i + 1, len(neighbor_list)):
|
|
215
|
+
total_pairs += 1
|
|
216
|
+
if neighbor_list[j] not in adjacency[neighbor_list[i]]:
|
|
217
|
+
non_connections += 1
|
|
218
|
+
|
|
219
|
+
if total_pairs > 0:
|
|
220
|
+
node_holes = non_connections / total_pairs
|
|
221
|
+
total_holes += node_holes
|
|
222
|
+
|
|
223
|
+
# 标准化
|
|
224
|
+
max_possible_holes = len(nodes) * (len(nodes) - 1) / 2
|
|
225
|
+
return min(1.0, total_holes / max_possible_holes) if max_possible_holes > 0 else 0
|
|
226
|
+
|
|
227
|
+
def _calculate_betweenness_centrality(self, nodes: List[str], edges: List[Tuple[str, str]]) -> float:
|
|
228
|
+
"""计算介数中心性 (简化版本)"""
|
|
229
|
+
if len(nodes) < 3:
|
|
230
|
+
return 0.5
|
|
231
|
+
|
|
232
|
+
# 构建图
|
|
233
|
+
graph = defaultdict(set)
|
|
234
|
+
for edge in edges:
|
|
235
|
+
graph[edge[0]].add(edge[1])
|
|
236
|
+
graph[edge[1]].add(edge[0])
|
|
237
|
+
|
|
238
|
+
# 计算每个节点作为中间节点的重要性
|
|
239
|
+
total_betweenness = 0
|
|
240
|
+
for start_node in nodes:
|
|
241
|
+
# 简化的最短路径计算
|
|
242
|
+
paths = self._find_shortest_paths(graph, start_node, nodes)
|
|
243
|
+
betweenness = 0
|
|
244
|
+
for end_node in paths:
|
|
245
|
+
if end_node != start_node:
|
|
246
|
+
# 简化:使用路径长度作为介数指标
|
|
247
|
+
betweenness += 1 / len(paths[end_node])
|
|
248
|
+
total_betweenness += betweenness
|
|
249
|
+
|
|
250
|
+
# 标准化
|
|
251
|
+
max_betweenness = len(nodes) * (len(nodes) - 1) / 2
|
|
252
|
+
return min(1.0, total_betweenness / max_betweenness) if max_betweenness > 0 else 0.5
|
|
253
|
+
|
|
254
|
+
def _find_shortest_paths(self, graph: Dict[str, Set[str]], start: str, all_nodes: List[str]) -> Dict[str, List[str]]:
|
|
255
|
+
"""找到从起始节点到其他节点的最短路径"""
|
|
256
|
+
paths = {start: [start]}
|
|
257
|
+
visited = {start}
|
|
258
|
+
queue = [start]
|
|
259
|
+
|
|
260
|
+
while queue:
|
|
261
|
+
current = queue.pop(0)
|
|
262
|
+
for neighbor in graph[current]:
|
|
263
|
+
if neighbor not in visited:
|
|
264
|
+
visited.add(neighbor)
|
|
265
|
+
queue.append(neighbor)
|
|
266
|
+
# 简化的路径记录
|
|
267
|
+
paths[neighbor] = paths[current] + [neighbor]
|
|
268
|
+
|
|
269
|
+
return paths
|
|
270
|
+
|
|
271
|
+
def _calculate_closeness_centrality(self, nodes: List[str], edges: List[Tuple[str, str]]) -> float:
|
|
272
|
+
"""计算接近中心性 (简化版本)"""
|
|
273
|
+
if len(nodes) < 2:
|
|
274
|
+
return 0.5
|
|
275
|
+
|
|
276
|
+
# 构建图
|
|
277
|
+
graph = defaultdict(set)
|
|
278
|
+
for edge in edges:
|
|
279
|
+
graph[edge[0]].add(edge[1])
|
|
280
|
+
graph[edge[1]].add(edge[0])
|
|
281
|
+
|
|
282
|
+
# 计算平均最短路径长度
|
|
283
|
+
total_distance = 0
|
|
284
|
+
path_count = 0
|
|
285
|
+
|
|
286
|
+
for i, start_node in enumerate(nodes):
|
|
287
|
+
for j, end_node in enumerate(nodes):
|
|
288
|
+
if i != j:
|
|
289
|
+
distance = self._shortest_path_length(graph, start_node, end_node)
|
|
290
|
+
if distance > 0:
|
|
291
|
+
total_distance += distance
|
|
292
|
+
path_count += 1
|
|
293
|
+
|
|
294
|
+
if path_count > 0:
|
|
295
|
+
avg_distance = total_distance / path_count
|
|
296
|
+
# 转换为中心性分数(距离越短,中心性越高)
|
|
297
|
+
return min(1.0, 1.0 / avg_distance) if avg_distance > 0 else 0.5
|
|
298
|
+
else:
|
|
299
|
+
return 0.5
|
|
300
|
+
|
|
301
|
+
def _shortest_path_length(self, graph: Dict[str, Set[str]], start: str, end: str) -> int:
|
|
302
|
+
"""计算两点间最短路径长度"""
|
|
303
|
+
if start == end:
|
|
304
|
+
return 0
|
|
305
|
+
|
|
306
|
+
visited = {start}
|
|
307
|
+
queue = [(start, 0)]
|
|
308
|
+
|
|
309
|
+
while queue:
|
|
310
|
+
current, distance = queue.pop(0)
|
|
311
|
+
|
|
312
|
+
for neighbor in graph[current]:
|
|
313
|
+
if neighbor == end:
|
|
314
|
+
return distance + 1
|
|
315
|
+
if neighbor not in visited:
|
|
316
|
+
visited.add(neighbor)
|
|
317
|
+
queue.append((neighbor, distance + 1))
|
|
318
|
+
|
|
319
|
+
return float('inf') # 无法到达
|
|
320
|
+
|
|
321
|
+
def _calculate_eigenvector_centrality(self, nodes: List[str], edges: List[Tuple[str, str]]) -> float:
|
|
322
|
+
"""计算特征向量中心性 (简化版本)"""
|
|
323
|
+
if not edges:
|
|
324
|
+
return 0.1
|
|
325
|
+
|
|
326
|
+
# 计算每个节点的连接度
|
|
327
|
+
connections = {}
|
|
328
|
+
for node in nodes:
|
|
329
|
+
connections[node] = 0
|
|
330
|
+
|
|
331
|
+
for edge in edges:
|
|
332
|
+
connections[edge[0]] += 1
|
|
333
|
+
connections[edge[1]] += 1
|
|
334
|
+
|
|
335
|
+
# 标准化
|
|
336
|
+
max_connections = max(connections.values()) if connections.values() else 1
|
|
337
|
+
avg_centrality = sum(connections.values()) / len(connections) / max_connections if connections else 0
|
|
338
|
+
|
|
339
|
+
return avg_centrality
|
|
340
|
+
|
|
341
|
+
def _calculate_reciprocity(self, edges: List[Tuple[str, str]]) -> float:
|
|
342
|
+
"""计算互惠性"""
|
|
343
|
+
if not edges:
|
|
344
|
+
return 0.1
|
|
345
|
+
|
|
346
|
+
reciprocal_edges = 0
|
|
347
|
+
edge_set = set(edges)
|
|
348
|
+
|
|
349
|
+
for edge in edges:
|
|
350
|
+
reverse_edge = (edge[1], edge[0])
|
|
351
|
+
if reverse_edge in edge_set:
|
|
352
|
+
reciprocal_edges += 1
|
|
353
|
+
|
|
354
|
+
return reciprocal_edges / len(edges) if edges else 0.1
|
|
355
|
+
|
|
356
|
+
def _calculate_transitivity(self, nodes: List[str], edges: List[Tuple[str, str]]) -> float:
|
|
357
|
+
"""计算传递性"""
|
|
358
|
+
if len(nodes) < 3:
|
|
359
|
+
return 0.1
|
|
360
|
+
|
|
361
|
+
# 构建邻接集
|
|
362
|
+
adjacency = defaultdict(set)
|
|
363
|
+
for edge in edges:
|
|
364
|
+
adjacency[edge[0]].add(edge[1])
|
|
365
|
+
adjacency[edge[1]].add(edge[0])
|
|
366
|
+
|
|
367
|
+
triangles = 0
|
|
368
|
+
triples = 0
|
|
369
|
+
|
|
370
|
+
# 简化的传递性计算
|
|
371
|
+
for i, node1 in enumerate(nodes):
|
|
372
|
+
for j, node2 in enumerate(nodes):
|
|
373
|
+
if i >= j:
|
|
374
|
+
continue
|
|
375
|
+
|
|
376
|
+
for k, node3 in enumerate(nodes):
|
|
377
|
+
if j >= k:
|
|
378
|
+
continue
|
|
379
|
+
|
|
380
|
+
# 检查是否形成三角形
|
|
381
|
+
if (node2 in adjacency[node1] and
|
|
382
|
+
node3 in adjacency[node2] and
|
|
383
|
+
node3 in adjacency[node1]):
|
|
384
|
+
triangles += 1
|
|
385
|
+
|
|
386
|
+
triples += 1
|
|
387
|
+
|
|
388
|
+
return triangles / triples if triples > 0 else 0.1
|
|
389
|
+
|
|
390
|
+
def _calculate_diversity_index(self, relationship_data: Dict[str, Dict]) -> float:
|
|
391
|
+
"""计算多样性指数"""
|
|
392
|
+
if not relationship_data:
|
|
393
|
+
return 0.5
|
|
394
|
+
|
|
395
|
+
# 统计关系类型分布
|
|
396
|
+
type_counts = Counter()
|
|
397
|
+
for edge_data in relationship_data.values():
|
|
398
|
+
rel_type = edge_data.get('type', 'unknown')
|
|
399
|
+
type_counts[rel_type] += 1
|
|
400
|
+
|
|
401
|
+
# 计算香农多样性指数
|
|
402
|
+
total = sum(type_counts.values())
|
|
403
|
+
if total == 0:
|
|
404
|
+
return 0.1
|
|
405
|
+
|
|
406
|
+
diversity = 0
|
|
407
|
+
for count in type_counts.values():
|
|
408
|
+
p = count / total
|
|
409
|
+
if p > 0:
|
|
410
|
+
diversity -= p * np.log(p)
|
|
411
|
+
|
|
412
|
+
# 标准化 (假设最大多样性为ln(7) = 1.945)
|
|
413
|
+
max_diversity = np.log(len(self.relationship_types))
|
|
414
|
+
return diversity / max_diversity if max_diversity > 0 else 0.5
|
|
415
|
+
|
|
416
|
+
def _analyze_network_structure(self, metrics: SocialNetworkMetrics) -> Dict[str, Any]:
|
|
417
|
+
"""分析网络结构"""
|
|
418
|
+
return {
|
|
419
|
+
'network_type': self._classify_network_type(metrics),
|
|
420
|
+
'structural_characteristics': {
|
|
421
|
+
'size_adequacy': 'adequate' if 0.4 <= metrics.network_size <= 0.8 else 'inadequate',
|
|
422
|
+
'density_level': self._classify_density_level(metrics.network_density),
|
|
423
|
+
'centralization': 'high' if metrics.betweenness_centrality > 0.7 else 'moderate',
|
|
424
|
+
'clustering': 'high' if metrics.transitivity > 0.5 else 'low'
|
|
425
|
+
},
|
|
426
|
+
'structural_assessment': self._assess_structural_health(metrics)
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
def _assess_network_quality(self, metrics: SocialNetworkMetrics) -> Dict[str, Any]:
|
|
430
|
+
"""评估网络质量"""
|
|
431
|
+
overall_quality = self._calculate_overall_quality(metrics)
|
|
432
|
+
|
|
433
|
+
return {
|
|
434
|
+
'overall_quality_score': overall_quality,
|
|
435
|
+
'quality_level': self._determine_quality_level(overall_quality),
|
|
436
|
+
'quality_dimensions': {
|
|
437
|
+
'connectivity': (metrics.network_density + metrics.tie_strength) / 2,
|
|
438
|
+
'influence': (metrics.betweenness_centrality + metrics.eigenvector_centrality) / 2,
|
|
439
|
+
'support': (metrics.closeness_centrality + metrics.reciprocity) / 2,
|
|
440
|
+
'diversity': metrics.diversity_index
|
|
441
|
+
},
|
|
442
|
+
'quality_indicators': self._generate_quality_indicators(metrics)
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
def _identify_network_roles(self, metrics: SocialNetworkMetrics) -> Dict[str, Any]:
|
|
446
|
+
"""识别网络角色"""
|
|
447
|
+
return {
|
|
448
|
+
'primary_role': self._determine_primary_role(metrics),
|
|
449
|
+
'role_characteristics': self._analyze_role_characteristics(metrics),
|
|
450
|
+
'network_position': self._assess_network_position(metrics)
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
def _analyze_relationship_quality(self, relationship_data: Dict[str, Dict]) -> Dict[str, Any]:
|
|
454
|
+
"""分析关系质量"""
|
|
455
|
+
if not relationship_data:
|
|
456
|
+
return {'error': '关系数据缺失'}
|
|
457
|
+
|
|
458
|
+
# 分析不同类型关系的质量
|
|
459
|
+
type_quality = {}
|
|
460
|
+
for rel_type in self.relationship_types:
|
|
461
|
+
type_edges = [data for data in relationship_data.values()
|
|
462
|
+
if data.get('type') == rel_type]
|
|
463
|
+
if type_edges:
|
|
464
|
+
avg_quality = np.mean([edge.get('quality', 0.5) for edge in type_edges])
|
|
465
|
+
type_quality[rel_type] = avg_quality
|
|
466
|
+
|
|
467
|
+
return {
|
|
468
|
+
'relationship_type_quality': type_quality,
|
|
469
|
+
'overall_relationship_quality': np.mean(list(type_quality.values())) if type_quality else 0.5,
|
|
470
|
+
'relationship_distribution': self._analyze_relationship_distribution(relationship_data)
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
def _assess_social_support(self, metrics: SocialNetworkMetrics,
|
|
474
|
+
relationship_data: Dict[str, Dict]) -> Dict[str, Any]:
|
|
475
|
+
"""评估社会支持"""
|
|
476
|
+
# 基于网络指标评估社会支持水平
|
|
477
|
+
support_score = (
|
|
478
|
+
metrics.tie_strength * 0.3 +
|
|
479
|
+
metrics.network_size * 0.2 +
|
|
480
|
+
metrics.diversity_index * 0.2 +
|
|
481
|
+
metrics.reciprocity * 0.15 +
|
|
482
|
+
metrics.closeness_centrality * 0.15
|
|
483
|
+
)
|
|
484
|
+
|
|
485
|
+
return {
|
|
486
|
+
'support_score': support_score,
|
|
487
|
+
'support_level': self._determine_support_level(support_score),
|
|
488
|
+
'support_sources': self._identify_support_sources(relationship_data),
|
|
489
|
+
'support_gaps': self._identify_support_gaps(metrics)
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
def _predict_network_evolution(self, metrics: SocialNetworkMetrics) -> Dict[str, Any]:
|
|
493
|
+
"""预测网络发展"""
|
|
494
|
+
# 基于当前指标预测网络发展趋势
|
|
495
|
+
evolution_trend = self._calculate_evolution_trend(metrics)
|
|
496
|
+
|
|
497
|
+
return {
|
|
498
|
+
'evolution_trend': evolution_trend,
|
|
499
|
+
'predicted_changes': self._predict_network_changes(metrics),
|
|
500
|
+
'evolution_factors': self._identify_evolution_factors(metrics)
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
def _assess_alienation_correlation(self, metrics: SocialNetworkMetrics) -> Dict[str, float]:
|
|
504
|
+
"""评估与社会异化的相关性"""
|
|
505
|
+
# 社会网络薄弱与社会异化的相关性
|
|
506
|
+
alienation_correlation = 1 - (
|
|
507
|
+
metrics.network_size * 0.25 +
|
|
508
|
+
metrics.tie_strength * 0.25 +
|
|
509
|
+
metrics.diversity_index * 0.2 +
|
|
510
|
+
metrics.reciprocity * 0.15 +
|
|
511
|
+
metrics.closeness_centrality * 0.15
|
|
512
|
+
)
|
|
513
|
+
|
|
514
|
+
return {
|
|
515
|
+
'social_alienation_correlation': max(0, min(1, alienation_correlation)),
|
|
516
|
+
'alienation_risk_level': self._determine_risk_level(alienation_correlation),
|
|
517
|
+
'isolation_indicators': self._identify_isolation_indicators(metrics)
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
# 辅助方法
|
|
521
|
+
def _classify_network_type(self, metrics: SocialNetworkMetrics) -> str:
|
|
522
|
+
"""分类网络类型"""
|
|
523
|
+
if metrics.network_size < 0.3:
|
|
524
|
+
return '小型网络'
|
|
525
|
+
elif metrics.network_density > 0.7:
|
|
526
|
+
return '密集网络'
|
|
527
|
+
elif metrics.structural_holes > 0.6:
|
|
528
|
+
return '结构洞网络'
|
|
529
|
+
elif metrics.diversity_index > 0.7:
|
|
530
|
+
return '多样化网络'
|
|
531
|
+
else:
|
|
532
|
+
return '标准网络'
|
|
533
|
+
|
|
534
|
+
def _classify_density_level(self, density: float) -> str:
|
|
535
|
+
"""分类密度等级"""
|
|
536
|
+
if density > 0.7:
|
|
537
|
+
return '高密度'
|
|
538
|
+
elif density > 0.4:
|
|
539
|
+
return '中等密度'
|
|
540
|
+
else:
|
|
541
|
+
return '低密度'
|
|
542
|
+
|
|
543
|
+
def _assess_structural_health(self, metrics: SocialNetworkMetrics) -> str:
|
|
544
|
+
"""评估结构健康度"""
|
|
545
|
+
health_score = (
|
|
546
|
+
metrics.network_size * 0.2 +
|
|
547
|
+
metrics.network_density * 0.2 +
|
|
548
|
+
metrics.tie_strength * 0.2 +
|
|
549
|
+
metrics.structural_holes * 0.2 +
|
|
550
|
+
metrics.diversity_index * 0.2
|
|
551
|
+
)
|
|
552
|
+
|
|
553
|
+
if health_score > 0.7:
|
|
554
|
+
return '健康'
|
|
555
|
+
elif health_score > 0.5:
|
|
556
|
+
return '一般'
|
|
557
|
+
else:
|
|
558
|
+
return '不健康'
|
|
559
|
+
|
|
560
|
+
def _calculate_overall_quality(self, metrics: SocialNetworkMetrics) -> float:
|
|
561
|
+
"""计算总体质量分数"""
|
|
562
|
+
weights = self.network_weights
|
|
563
|
+
values = [
|
|
564
|
+
metrics.network_size * weights['network_size'],
|
|
565
|
+
metrics.network_density * weights['network_density'],
|
|
566
|
+
metrics.tie_strength * weights['tie_strength'],
|
|
567
|
+
metrics.structural_holes * weights['structural_holes'],
|
|
568
|
+
metrics.betweenness_centrality * weights['betweenness_centrality'],
|
|
569
|
+
metrics.closeness_centrality * weights['closeness_centrality'],
|
|
570
|
+
metrics.eigenvector_centrality * weights['eigenvector_centrality'],
|
|
571
|
+
metrics.reciprocity * weights['reciprocity'],
|
|
572
|
+
metrics.transitivity * weights['transitivity'],
|
|
573
|
+
metrics.diversity_index * weights['diversity_index']
|
|
574
|
+
]
|
|
575
|
+
|
|
576
|
+
return sum(values)
|
|
577
|
+
|
|
578
|
+
def _determine_quality_level(self, quality: float) -> str:
|
|
579
|
+
"""确定质量等级"""
|
|
580
|
+
if quality >= self.network_thresholds['excellent']:
|
|
581
|
+
return '优秀'
|
|
582
|
+
elif quality >= self.network_thresholds['good']:
|
|
583
|
+
return '良好'
|
|
584
|
+
elif quality >= self.network_thresholds['satisfactory']:
|
|
585
|
+
return '满意'
|
|
586
|
+
elif quality >= self.network_thresholds['needs_improvement']:
|
|
587
|
+
return '需要改进'
|
|
588
|
+
else:
|
|
589
|
+
return '较差'
|
|
590
|
+
|
|
591
|
+
def _generate_quality_indicators(self, metrics: SocialNetworkMetrics) -> List[str]:
|
|
592
|
+
"""生成质量指标"""
|
|
593
|
+
indicators = []
|
|
594
|
+
|
|
595
|
+
if metrics.network_size > 0.7:
|
|
596
|
+
indicators.append('网络规模适中')
|
|
597
|
+
if metrics.tie_strength > 0.7:
|
|
598
|
+
indicators.append('关系连接强度高')
|
|
599
|
+
if metrics.diversity_index > 0.6:
|
|
600
|
+
indicators.append('关系类型多样化')
|
|
601
|
+
if metrics.betweenness_centrality > 0.6:
|
|
602
|
+
indicators.append('在网络中具有重要影响力')
|
|
603
|
+
if metrics.reciprocity > 0.6:
|
|
604
|
+
indicators.append('关系互惠性良好')
|
|
605
|
+
|
|
606
|
+
return indicators
|
|
607
|
+
|
|
608
|
+
def _determine_primary_role(self, metrics: SocialNetworkMetrics) -> str:
|
|
609
|
+
"""确定主要网络角色"""
|
|
610
|
+
if metrics.betweenness_centrality > 0.7:
|
|
611
|
+
return '中介者'
|
|
612
|
+
elif metrics.eigenvector_centrality > 0.7:
|
|
613
|
+
return '影响者'
|
|
614
|
+
elif metrics.network_size > 0.8:
|
|
615
|
+
return '连接者'
|
|
616
|
+
elif metrics.tie_strength > 0.7:
|
|
617
|
+
return '紧密关系维护者'
|
|
618
|
+
else:
|
|
619
|
+
return '普通参与者'
|
|
620
|
+
|
|
621
|
+
def _analyze_role_characteristics(self, metrics: SocialNetworkMetrics) -> Dict[str, str]:
|
|
622
|
+
"""分析角色特征"""
|
|
623
|
+
return {
|
|
624
|
+
'influence_level': 'high' if metrics.betweenness_centrality > 0.6 else 'moderate',
|
|
625
|
+
'connectivity': 'strong' if metrics.network_size > 0.6 else 'moderate',
|
|
626
|
+
'relationship_quality': 'strong' if metrics.tie_strength > 0.6 else 'moderate',
|
|
627
|
+
'network_position': 'central' if metrics.closeness_centrality > 0.6 else 'peripheral'
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
def _assess_network_position(self, metrics: SocialNetworkMetrics) -> str:
|
|
631
|
+
"""评估网络位置"""
|
|
632
|
+
centrality_score = (metrics.betweenness_centrality +
|
|
633
|
+
metrics.closeness_centrality +
|
|
634
|
+
metrics.eigenvector_centrality) / 3
|
|
635
|
+
|
|
636
|
+
if centrality_score > 0.7:
|
|
637
|
+
return '中心位置'
|
|
638
|
+
elif centrality_score > 0.4:
|
|
639
|
+
return '半中心位置'
|
|
640
|
+
else:
|
|
641
|
+
return '边缘位置'
|
|
642
|
+
|
|
643
|
+
def _analyze_relationship_distribution(self, relationship_data: Dict[str, Dict]) -> Dict[str, int]:
|
|
644
|
+
"""分析关系分布"""
|
|
645
|
+
distribution = Counter()
|
|
646
|
+
for data in relationship_data.values():
|
|
647
|
+
rel_type = data.get('type', 'unknown')
|
|
648
|
+
distribution[rel_type] += 1
|
|
649
|
+
return dict(distribution)
|
|
650
|
+
|
|
651
|
+
def _determine_support_level(self, support_score: float) -> str:
|
|
652
|
+
"""确定支持水平"""
|
|
653
|
+
if support_score > 0.7:
|
|
654
|
+
return '高支持'
|
|
655
|
+
elif support_score > 0.5:
|
|
656
|
+
return '中等支持'
|
|
657
|
+
elif support_score > 0.3:
|
|
658
|
+
return '低支持'
|
|
659
|
+
else:
|
|
660
|
+
return '缺乏支持'
|
|
661
|
+
|
|
662
|
+
def _identify_support_sources(self, relationship_data: Dict[str, Dict]) -> List[str]:
|
|
663
|
+
"""识别支持来源"""
|
|
664
|
+
sources = []
|
|
665
|
+
for data in relationship_data.values():
|
|
666
|
+
rel_type = data.get('type', 'unknown')
|
|
667
|
+
quality = data.get('quality', 0)
|
|
668
|
+
if quality > 0.6:
|
|
669
|
+
sources.append(rel_type)
|
|
670
|
+
return sources
|
|
671
|
+
|
|
672
|
+
def _identify_support_gaps(self, metrics: SocialNetworkMetrics) -> List[str]:
|
|
673
|
+
"""识别支持缺口"""
|
|
674
|
+
gaps = []
|
|
675
|
+
|
|
676
|
+
if metrics.network_size < 0.4:
|
|
677
|
+
gaps.append('网络规模不足')
|
|
678
|
+
if metrics.diversity_index < 0.4:
|
|
679
|
+
gaps.append('关系类型单一')
|
|
680
|
+
if metrics.tie_strength < 0.4:
|
|
681
|
+
gaps.append('关系深度不足')
|
|
682
|
+
if metrics.reciprocity < 0.4:
|
|
683
|
+
gaps.append('互惠关系不足')
|
|
684
|
+
|
|
685
|
+
return gaps
|
|
686
|
+
|
|
687
|
+
def _calculate_evolution_trend(self, metrics: SocialNetworkMetrics) -> str:
|
|
688
|
+
"""计算发展趋势"""
|
|
689
|
+
trend_score = (
|
|
690
|
+
metrics.network_size * 0.3 +
|
|
691
|
+
metrics.tie_strength * 0.3 +
|
|
692
|
+
metrics.diversity_index * 0.2 +
|
|
693
|
+
metrics.structural_holes * 0.2
|
|
694
|
+
)
|
|
695
|
+
|
|
696
|
+
if trend_score > 0.6:
|
|
697
|
+
return '增长趋势'
|
|
698
|
+
elif trend_score > 0.4:
|
|
699
|
+
return '稳定趋势'
|
|
700
|
+
else:
|
|
701
|
+
return '衰退趋势'
|
|
702
|
+
|
|
703
|
+
def _predict_network_changes(self, metrics: SocialNetworkMetrics) -> List[str]:
|
|
704
|
+
"""预测网络变化"""
|
|
705
|
+
changes = []
|
|
706
|
+
|
|
707
|
+
if metrics.network_size < 0.4:
|
|
708
|
+
changes.append('网络规模可能扩大')
|
|
709
|
+
if metrics.tie_strength < 0.4:
|
|
710
|
+
changes.append('关系强度可能提升')
|
|
711
|
+
if metrics.diversity_index < 0.4:
|
|
712
|
+
changes.append('关系类型可能多样化')
|
|
713
|
+
if metrics.structural_holes > 0.7:
|
|
714
|
+
changes.append('结构洞位置可能保持')
|
|
715
|
+
|
|
716
|
+
return changes
|
|
717
|
+
|
|
718
|
+
def _identify_evolution_factors(self, metrics: SocialNetworkMetrics) -> List[str]:
|
|
719
|
+
"""识别发展因素"""
|
|
720
|
+
factors = []
|
|
721
|
+
|
|
722
|
+
if metrics.tie_strength > 0.6:
|
|
723
|
+
factors.append('强关系纽带有利于网络稳定')
|
|
724
|
+
if metrics.diversity_index > 0.6:
|
|
725
|
+
factors.append('多样化关系有利于网络扩展')
|
|
726
|
+
if metrics.structural_holes > 0.6:
|
|
727
|
+
factors.append('结构洞位置有利于信息获取')
|
|
728
|
+
if metrics.reciprocity > 0.6:
|
|
729
|
+
factors.append('互惠关系有利于长期发展')
|
|
730
|
+
|
|
731
|
+
return factors
|
|
732
|
+
|
|
733
|
+
def _determine_risk_level(self, risk: float) -> str:
|
|
734
|
+
"""确定风险等级"""
|
|
735
|
+
if risk >= 0.7:
|
|
736
|
+
return '高风险'
|
|
737
|
+
elif risk >= 0.5:
|
|
738
|
+
return '中等风险'
|
|
739
|
+
elif risk >= 0.3:
|
|
740
|
+
return '低风险'
|
|
741
|
+
else:
|
|
742
|
+
return '极低风险'
|
|
743
|
+
|
|
744
|
+
def _identify_isolation_indicators(self, metrics: SocialNetworkMetrics) -> List[str]:
|
|
745
|
+
"""识别孤立指标"""
|
|
746
|
+
indicators = []
|
|
747
|
+
|
|
748
|
+
if metrics.network_size < 0.3:
|
|
749
|
+
indicators.append('网络规模过小')
|
|
750
|
+
if metrics.tie_strength < 0.3:
|
|
751
|
+
indicators.append('关系连接薄弱')
|
|
752
|
+
if metrics.diversity_index < 0.3:
|
|
753
|
+
indicators.append('关系类型单一')
|
|
754
|
+
if metrics.closeness_centrality < 0.3:
|
|
755
|
+
indicators.append('网络位置边缘化')
|
|
756
|
+
|
|
757
|
+
return indicators
|
|
758
|
+
|
|
759
|
+
def _generate_improvement_suggestions(self, metrics: SocialNetworkMetrics) -> List[str]:
|
|
760
|
+
"""生成改进建议"""
|
|
761
|
+
suggestions = []
|
|
762
|
+
|
|
763
|
+
if metrics.network_size < 0.5:
|
|
764
|
+
suggestions.append('扩大社交网络,增加新的关系连接')
|
|
765
|
+
if metrics.tie_strength < 0.5:
|
|
766
|
+
suggestions.append('深化现有关系,提高连接质量')
|
|
767
|
+
if metrics.diversity_index < 0.5:
|
|
768
|
+
suggestions.append('拓展关系类型,建立多样化社交圈')
|
|
769
|
+
if metrics.reciprocity < 0.5:
|
|
770
|
+
suggestions.append('增强关系互惠性,建立双向支持')
|
|
771
|
+
if metrics.closeness_centrality < 0.5:
|
|
772
|
+
suggestions.append('提高网络中心性,增强影响力')
|
|
773
|
+
|
|
774
|
+
return suggestions
|
|
775
|
+
|
|
776
|
+
|
|
777
|
+
def main():
|
|
778
|
+
"""主函数 - 用于测试"""
|
|
779
|
+
analyzer = SocialNetworkAnalyzer()
|
|
780
|
+
|
|
781
|
+
# 测试数据
|
|
782
|
+
test_data = {
|
|
783
|
+
'nodes': ['A', 'B', 'C', 'D', 'E'],
|
|
784
|
+
'edges': [('A', 'B'), ('B', 'C'), ('C', 'D'), ('A', 'C'), ('B', 'D')],
|
|
785
|
+
'relationship_data': {
|
|
786
|
+
'A-B': {'type': 'friends', 'strength': 0.8, 'quality': 0.7},
|
|
787
|
+
'B-C': {'type': 'colleagues', 'strength': 0.6, 'quality': 0.6},
|
|
788
|
+
'C-D': {'type': 'family', 'strength': 0.9, 'quality': 0.8},
|
|
789
|
+
'A-C': {'type': 'acquaintances', 'strength': 0.4, 'quality': 0.5},
|
|
790
|
+
'B-D': {'type': 'neighbors', 'strength': 0.5, 'quality': 0.5}
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
# 分析社会网络
|
|
795
|
+
result = analyzer.analyze_social_network(test_data)
|
|
796
|
+
|
|
797
|
+
# 打印结果
|
|
798
|
+
print(json.dumps(result, ensure_ascii=False, indent=2))
|
|
799
|
+
|
|
800
|
+
|
|
801
|
+
if __name__ == '__main__':
|
|
802
|
+
main()
|