Skip to content

Commit

Permalink
docs: 添加英文文档
Browse files Browse the repository at this point in the history
  • Loading branch information
wangtao2001 committed Nov 19, 2024
1 parent c24b075 commit aded3fa
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 15 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,23 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # 如果未启用 lastUpdated,则不需要
# - uses: pnpm/action-setup@v2 # 如果使用 pnpm,请取消注释
# - uses: oven-sh/setup-bun@v1 # 如果使用 Bun,请取消注释
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm # 或 pnpm / yarn
cache: npm
cache-dependency-path: docs/package-lock.json
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install dependencies
run: |
cd docs
npm ci # 或 pnpm install / yarn install / bun install
working-directory: ./docs
run: npm ci
- name: Build with VitePress
working-directory: ./docs
run: |
cd docs
npm run build # 或 pnpm build / yarn build / bun run build
touch docs/.vitepress/dist/.nojekyll
npm run build
touch .vitepress/dist/.nojekyll
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ CourseGraph 使用大模型,利用多种 prompt 优化技术, 自动从教材

## 🚀 快速使用

首先 [申请阿里云通义千问 API Key](https://help.aliyun.com/zh/model-studio/developer-reference/get-api-key?spm=a2c4g.11186623.0.0.1be847bbvv6p4o),然后选择使用 Docker 安装或本地安装
首先申请阿里云通义千问 [API Key](https://help.aliyun.com/zh/model-studio/developer-reference/get-api-key),然后选择使用 Docker 安装或本地安装

### 方式一:使用 Docker(推荐)

Expand Down
100 changes: 98 additions & 2 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,102 @@
<h2>CourseGraph: Automatic Construction of Course Knowledge Graphs Using Large Models</h2>

<p>
<a href="README.md">中文</a> | <b>English</b>
<a href="README.md">Chinese</a> | <b>English</b>
</p>
</div>
</div>

CourseGraph utilizes large language models and various prompt optimization techniques to automatically extract knowledge points from textbooks and books, forming a knowledge graph centered around courses, chapters, and knowledge points. To enrich each knowledge point, CourseGraph can link relevant exercises, extended reading materials, and other resources. Additionally, it can leverage multimodal large models to extract information from pptx files, images, and videos, establishing connections with the knowledge points.

## 🤔 Limitations

- Currently, only basic knowledge graph extraction and pptx parsing have been implemented, with room for optimization
- Video parsing is still in the planning phase

## 📈 Future Development

- Improve prompt engineering and explore using Agents for related tasks
- Knowledge graph-based question answering (KBQA or Graph-RAG)

## 🚀 Quick Start

First, obtain an Alibaba Cloud Tongyi Qianwen [API Key](https://help.aliyun.com/zh/model-studio/developer-reference/get-api-key?spm=a2c4g.11186623.0.0.1be847bbvv6p4o), then choose either Docker installation or local installation

### Option 1: Using Docker (Recommended)

This project provides Docker configuration for quick environment setup:

```bash
git clone [email protected]:wangtao2001/CourseGraph.git
cd CourseGraph
export DASHSCOPE_API_KEY=
docker-compose -f docker/docker-compose.yml up -d
python examples/get_knowledge_graph.py
```

### Option 2: Local Installation

#### Install Dependencies

Ensure Anaconda (or Miniconda) and Rust are installed, then execute:

```bash
git clone [email protected]:wangtao2001/CourseGraph.git
cd CourseGraph
conda create -n cg python=3.10 -y
conda activate cg
pip install poetry
poetry config virtualenvs.create false
poetry install
cd rust
maturin develop
cd ..
```

> On Linux, libreoffice is required for document conversion. For Debian-based systems: `sudo apt install libreoffice`
Then locate the file `examples/get_knowledge_graph.py`

#### Configure Graph Database

The project uses Neo4j as the graph database. You'll need to provide the connection address and credentials. If not installed, please refer to the [Neo4j documentation](https://neo4j.com/docs/operations-manual/current/installation/)

#### Execute

```bash
python examples/get_knowledge_graph.py
```

## 📚 Documentation

Documentation can be found in the `docs` directory, or you can visit the [online documentation](https://wangtao2001.github.io/CourseGraph/) (As the project features are still under rapid development, the online documentation is not yet ready). If you wish to customize the online documentation, follow these steps:

#### Install Dependencies and Preview

The documentation is built with [VitePress](https://vitepress.dev/), requiring Node.js 18 or above. Execute:

```bash
cd docs
npm i
npm run docs:dev
```

Open [http://localhost:5173/](http://localhost:5173/) in your browser to preview

#### Deployment

Online documentation is deployed using Github Actions + Github Pages, with the workflow file at `.github/workflows/docs.yaml`

## 🛠️ Contributing and Citation

[PR](https://github.com/wangtao2001/CourseGraph/pulls) and [Issues](https://github.com/wangtao2001/CourseGraph/issues) are welcome, as well as any form of contribution

If you find CourseGraph helpful for your work, please consider citing:

```
@misc{CourseGraph,
author = {Wang, Tao},
year = {2024},
note = {https://github.com/wangtao2001/CourseGraph},
title = {CourseGraph: Automatic Construction of Course Knowledge Graphs Using Large Models}
}
```
4 changes: 2 additions & 2 deletions docs/.vitepress/theme/style/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
@import "./custom-block.css";

:root {
--gradient-background: linear-gradient(135deg, #1be7c9 10%, #025c4b 100%);
--gradient-background: linear-gradient(135deg, #4FD0F6 10%, #01056C 100%);

--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: var(--gradient-background);
--vp-home-hero-image-background-image: var(--gradient-background);
/* --vp-home-hero-image-background-image: var(--gradient-background); */
--vp-home-hero-image-filter: blur(60px);
}
Binary file added docs/public/logo-fill.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit aded3fa

Please sign in to comment.