This repository has been archived by the owner on Mar 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
128 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Installation | ||
|
||
There are currently three different methods to install Lute v3 on your system, with different system requirements: | ||
|
||
* [Python package install using `pip`](install.md#using-pip) | ||
* [Docker](install.md#using-docker) | ||
* [From source](install.md#from-source) | ||
|
||
> I can't recommend any particular installation method: they all have trade offs. My personal preference is to install using pip. | ||
## Using pip | ||
|
||
System requirements: | ||
|
||
* Python 3.8+ and pip | ||
* Japanese learners will also need to [install MeCab](./mecab.md) | ||
|
||
Lute can be installed from [https://pypi.org/project/lute3/](https://pypi.org/project/lute3/). Here's a summary of the instructions on that pypi page (Linux/Mac, Windows will be similar). Note my system has python3.8, your system may vary: | ||
|
||
``` | ||
python3.8 -m venv myenv | ||
source myenv/bin/activate | ||
# Install | ||
pip install --upgrade lute3 | ||
# Start | ||
python -m lute.main | ||
# Open your web browser to http://localhost:5000 | ||
# When done, hit Ctl-C | ||
deactivate | ||
``` | ||
|
||
## Using Docker | ||
|
||
System requirements: | ||
|
||
* Docker | ||
|
||
> Docker is a containerization platform that allows you to run applications in a sandboxed environment (ref the [Docker documentation](https://docs.docker.com/)). **Docker is not available or is problematic on some systems, particularly Windows.** | ||
Lute has a pre-built docker image at [https://hub.docker.com/r/jzohrab/lute3](https://hub.docker.com/r/jzohrab/lute3). There are notes on that page about the image. Here's one way to get started using a `docker-compose.yml` file: | ||
|
||
* create a folder on your system for your lute, with folders for the data and backups, e.g.: | ||
|
||
``` | ||
- my_lute/ | ||
docker-compose.yml | ||
- data/ | ||
- backups/ | ||
``` | ||
|
||
* Put the following in the `docker-compose.yml`: | ||
|
||
``` | ||
version: '3.9' | ||
services: | ||
lute: | ||
image: jzohrab/lute3:latest | ||
ports: | ||
- 5000:5000 | ||
volumes: | ||
- ./data:/lute_data | ||
- ./backups:/lute_backup | ||
``` | ||
|
||
* open a terminal/shell in the `my_lute` folder, and start Lute: | ||
|
||
``` | ||
docker compose up | ||
``` | ||
|
||
## From source | ||
|
||
Developers and gearheads can install Lute from source: see the [Lute repository](https://github.com/jzohrab/lute-v3/blob/master/docs/development.md). | ||
|
||
If you want to develop Lute, you'll also need to [install MeCab](./mecab.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
> Note: this is for non-Docker users studying Japanese only (or devs who are working on Lute) | ||
Lute users who are studying Japanese will need to install MeCab and an appropriate dictionary for parsing Japanese text. If MeCab is not installed or not on your PATH, you will not be able to parse Japanese texts. | ||
|
||
# Installation | ||
|
||
## Mac | ||
|
||
You can install MeCab and a dictionary using `homebrew`: | ||
|
||
``` | ||
brew install mecab | ||
brew install mecab-ipadic | ||
``` | ||
|
||
## Windows | ||
|
||
> instructions needed! | ||
## Linux | ||
|
||
Use apt-get: | ||
|
||
``` | ||
sudo apt-get update -y | ||
sudo apt-get install -y mecab mecab-ipadic-utf8 | ||
``` | ||
|
||
# Verification | ||
|
||
Test mecab from the terminal: | ||
|
||
``` | ||
$ mecab | ||
すもももももももものうち | ||
すもも 名詞,一般,*,*,*,*,すもも,スモモ,スモモ | ||
も 助詞,係助詞,*,*,*,*,も,モ,モ | ||
もも 名詞,一般,*,*,*,*,もも,モモ,モモ | ||
``` | ||
|
||
Windows users may need to type the full path. | ||
|
||
# Lute configuration | ||
|
||
If everything is installed correctly, you will see a Japanese sample story when you start Lute. If you _don't_ see that story, then either your MeCab isn't set up correctly, or Lute can't find it. | ||
|
||
Lute uses a library called [natto-py](https://github.com/buruzaemon/natto-py) that _usually_ finds and uses MeCab automatically. If it can't, you'll need to specify the path to your MeCab library in Lute's Settings (top right menu bar). There is a box for you to enter your MeCab path and do a test parse. If that test succeeds, you're good to go. If not, jump into the Lute Discord. |