Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@ jobs:
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -e ".[dev]"
# Install pre-commit
pip install pre-commit
# Run pre-commit on all files
pre-commit run --all-files
- name: Run tests
run: pytest -q
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
repos:
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
language_version: python3.14
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.6.2
hooks:
- id: ruff
args: [--fix]
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,25 @@ source .venv/bin/activate

The installer automatically initializes any submodules (none are required now) and installs the required spaCy language models (`en`, `fr`, `es`).



If you prefer not to create a PyPI account, you can still obtain and install Kaihou Engine using these approaches:

* **GitHub Releases** – The CI workflow builds wheels for each tag. When a release (e.g., `v0.2.0`) is published, download the attached `.whl` file and install it locally:
```bash
curl -L -o kaihou_engine-0.2.0-py3-none-any.whl \
https://github.com/kaihouproject/kaihou-engine/releases/download/v0.2.0/kaihou_engine-0.2.0-py3-none-any.whl
python -m pip install kaihou_engine-0.2.0-py3-none-any.whl
```

* **Direct install from the repository** – Pip can install the package straight from the GitHub URL without any PyPI involvement:
```bash
python -m pip install git+https://github.com/kaihouproject/kaihou-engine.git@main#egg=kaihou-engine
```

Both methods work with the existing `install.sh` script, which does not depend on PyPI. After installation, activate the virtual environment (`source .venv/bin/activate`) and you are ready to use `kaihou` as described in the Quick‑Start section.


## Quick Start
```bash
# Interactive menu
Expand All @@ -97,6 +116,16 @@ We welcome contributions. Open a pull request (forking is optional) and referenc
- Additional language pairs (e.g., ES, DE)
- Plug‑in for remote LLM APIs

## Acknowledgements

The Kaihou Engine stands on the shoulders of many great open‑source projects and the broader Python community:

- **[spaCy](https://spacy.io/)** – the NLP library that provides the linguistic backbone.
- **[Rich](https://github.com/Textualize/rich)** – beautiful terminal rendering and colorised output.
- **[Click](https://palletsprojects.com/p/click/)** – the CLI framework that powers our command line.
- **[Python](https://www.python.org/)** – for its extensive ecosystem and thriving community.
- And countless **contributors** who have helped improve Kaihou Engine.

These items are tracked in the GitHub milestone **Future Features**.

[![CI](https://github.com/kaihouproject/kaihou-engine/actions/workflows/ci.yml/badge.svg)](https://github.com/kaihouproject/kaihou-engine/actions/workflows/ci.yml)
Expand Down
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ description = "Orchestration layer for Kaihou NLP Engine and related pipelines"
readme = "README.md"
authors = [{name = "Houtarou", email = "houtarou@example.com"}]
license = {text = "MIT"}
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
requires-python = ">=3.11"
dependencies = [
"click",
Expand All @@ -22,6 +28,11 @@ dependencies = [
"sentence-transformers"
]

[project.urls]
Homepage = "https://github.com/houtarou/kaihou-engine"
Repository = "https://github.com/houtarou/kaihou-engine"
Documentation = "https://github.com/houtarou/kaihou-engine#readme"

[project.optional-dependencies]
dev = [
"pytest",
Expand Down
5 changes: 3 additions & 2 deletions src/kaihou_engine/nlp_engine/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
from __future__ import annotations

from pathlib import Path
from typing import List
import spacy




Expand All @@ -23,7 +24,7 @@
"de": "de_core_news_sm",
}

import spacy



def _load_model(lang: str):
Expand Down
Loading