Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,33 @@ A distinction is made between 'external' and 'internal' files. See below.

(in the below, replace `~/git` and `~/git/pythinfer/example_projects/eg0-basic` with folder paths on your system, of course)

1. Clone the repository:
1. Install `pythinfer` as a tool:

```bash
uv tool install pythinfer
```

1. Clone the repository [OPTIONAL - this is just to get the example]:

```bash
cd ~/git
git clone https://github.com/robertmuil/pythinfer.git
```

1. Execute it as a tool in your project:
1. Execute it as a tool in your project (or the example project):

```bash
cd ~/git/pythinfer/example_projects/eg0-basic
uvx ~/git/pythinfer query "SELECT * WHERE { ?s ?p ?o } LIMIT 10"
uvx ~/git/pythinfer query select_who_knows_whom.rq
cd ~/git/pythinfer/example_projects/eg0-basic # or your own project folder
uvx pythinfer query "SELECT * WHERE { ?s ?p ?o } LIMIT 10"
uvx pythinfer query select_who_knows_whom.rq
```

This will create a `pythinfer.yaml` project file in the project folder, merge all RDF files it finds, perform inference, and then execute the SPARQL query against the inferred graph.

1. To use a specific project file, use the `--project` option before the command:

```bash
uvx ~/git/pythinfer --project pythinfer_celebrity.yaml query select_who_knows_whom.rq
uvx pythinfer --project pythinfer_celebrity.yaml query select_who_knows_whom.rq
```

1. Edit the `pythinfer.yaml` file to specify which files to include, try again. Have fun.
Expand Down