Skip to content

Commit

Permalink
Merge pull request #121 from AI4WA/feature/cli
Browse files Browse the repository at this point in the history
add readme
  • Loading branch information
PascalSun authored Jan 7, 2025
2 parents 866eb2a + c858a1b commit 5f8aedd
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ python -m spacy download en_core_web_sm
Detailed setup and tutorial can be found in the [documentation](https://docs2kg.ai4wa.com/Tutorial/1.GettingStarted/).

You have two ways to run the package:

- import the package in the code, and hook it with your own code
- run the package in the command line

Expand Down Expand Up @@ -59,9 +60,39 @@ Options:
Commands:
batch-process Process all supported documents in a directory.
list-formats List all supported document formats.
neo4j Load data to Neo4j database.
process-document Process a single document file.
```

```text
Usage: docs2kg process-document [OPTIONS] FILE_PATH
Process a single document file.
FILE_PATH: Path to the document file (PDF, DOCX, HTML, or EPUB)
Options:
-p, --project-id TEXT Project ID for the knowledge graph construction
-n, --agent-name TEXT Name of the agent to use for NER extraction
-t, --agent-type TEXT Type of the agent to use for NER extraction
--help Show this message and exit.
```

```text
Usage: docs2kg neo4j [OPTIONS] PROJECT_ID
Load data to Neo4j database.
Options:
-m, --mode [import|export|load|docker_start|docker_stop]
Mode of operation (import or export)
-u, --neo4j-uri TEXT URI for the Neo4j database
-U, --neo4j-user TEXT Username for the Neo4j database
-P, --neo4j-password TEXT Password for the Neo4j database
-r, --reset_db Reset the database before loading data
--help
```

## Motivation

To digest diverse unstructured documents into a unified knowledge graph, there are two main challenges:
Expand Down
30 changes: 30 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,39 @@ Options:
Commands:
batch-process Process all supported documents in a directory.
list-formats List all supported document formats.
neo4j Load data to Neo4j database.
process-document Process a single document file.
```

```text
Usage: docs2kg process-document [OPTIONS] FILE_PATH
Process a single document file.
FILE_PATH: Path to the document file (PDF, DOCX, HTML, or EPUB)
Options:
-p, --project-id TEXT Project ID for the knowledge graph construction
-n, --agent-name TEXT Name of the agent to use for NER extraction
-t, --agent-type TEXT Type of the agent to use for NER extraction
--help Show this message and exit.
```

```text
Usage: docs2kg neo4j [OPTIONS] PROJECT_ID
Load data to Neo4j database.
Options:
-m, --mode [import|export|load|docker_start|docker_stop]
Mode of operation (import or export)
-u, --neo4j-uri TEXT URI for the Neo4j database
-U, --neo4j-user TEXT Username for the Neo4j database
-P, --neo4j-password TEXT Password for the Neo4j database
-r, --reset_db Reset the database before loading data
--help
```

---

![Docs2KG Design](./images/Docs2KG-Design.jpg)
Expand Down

0 comments on commit 5f8aedd

Please sign in to comment.