Update references to toolkit paths and mpi- skill names
This commit is contained in:
@@ -6,14 +6,14 @@ category: research
|
||||
|
||||
# Terms Search
|
||||
|
||||
Database: `$MPI_PROJECT_ROOT/terms-search/termlib.duckdb`
|
||||
CLI: `$MPI_PROJECT_ROOT/terms-search/search.py`
|
||||
Server: `$MPI_PROJECT_ROOT/terms-search/server.py`
|
||||
Database: `$MPI_PROJECT_ROOT/toolkit/terms-database/termlib.duckdb`
|
||||
CLI: `$MPI_PROJECT_ROOT/toolkit/terms-database/search.py`
|
||||
Server: `$MPI_PROJECT_ROOT/toolkit/terms-database/server.py`
|
||||
|
||||
## CLI (preferred)
|
||||
|
||||
```
|
||||
$MPI_PROJECT_ROOT/terms-search/search.py <query> [limit]
|
||||
$MPI_PROJECT_ROOT/toolkit/terms-database/search.py <query> [limit]
|
||||
```
|
||||
|
||||
Multi-word queries are ANDed. Searches both `zh` and `en` columns.
|
||||
@@ -32,7 +32,7 @@ Use this inside `execute_code` scripts for batch lookups — no subprocess neede
|
||||
|
||||
## HTTP API (use only when CLI is insufficient)
|
||||
|
||||
Start: `python3 $MPI_PROJECT_ROOT/terms-search/server.py` (port 8910)
|
||||
Start: `python3 $MPI_PROJECT_ROOT/toolkit/terms-database/server.py` (port 8910)
|
||||
|
||||
- `GET /` — plain HTML UI (form + results table, no CSS)
|
||||
- `GET /` — plain HTML UI (form + results table, no CSS)
|
||||
@@ -64,7 +64,7 @@ Errors return `{"error": "..."}` with HTTP 500 (API) or shown inline (UI).
|
||||
## Direct DuckDB
|
||||
|
||||
```
|
||||
duckdb $MPI_PROJECT_ROOT/terms-search/termlib.duckdb
|
||||
duckdb $MPI_PROJECT_ROOT/toolkit/terms-database/termlib.duckdb
|
||||
```
|
||||
|
||||
Key tables: `unified_terms_flat` (zh, en, loc, source), individual source tables, `unified_terms` view.
|
||||
|
||||
@@ -112,7 +112,7 @@ duckdb path/to/termlib.duckdb
|
||||
|
||||
## Step 4: Create unified views
|
||||
|
||||
See `references/unified-view.sql` for the pattern. Key patterns:
|
||||
See `toolkit/references/unified-view.sql` for the pattern. Key patterns:
|
||||
- `UNION ALL` across all source tables
|
||||
- Normalize column names to `zh`, `en`, `loc` (出处), `source`
|
||||
- For paired-column sheets (e.g., `中文/英文` + `补充内容/英文_1`), emit two UNION branches
|
||||
|
||||
@@ -10,7 +10,7 @@ After producing a first-pass translation, or when the user asks to check termino
|
||||
|
||||
1. Read the full translated file. Extract all Chinese terms from `{% "TERM" (pinyin) = ENGLISH ... %}` blocks.
|
||||
|
||||
2. Start the search server: `python3 $MPI_PROJECT_ROOT/terms-search/server.py &` (port 8910). It may already be running — check with `curl -s http://localhost:8910/`.
|
||||
2. Start the search server: `python3 $MPI_PROJECT_ROOT/toolkit/terms-database/server.py &` (port 8910). It may already be running — check with `curl -s http://localhost:8910/`.
|
||||
|
||||
3. Batch-search each term via the HTTP API:
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user