Skip to content
This repository was archived by the owner on Jun 12, 2024. It is now read-only.
/ lute-v3 Public archive
forked from LuteOrg/lute-v3

Learning Using Texts - Lute v3 in Python, a replacement for Lute v1 and 2 in PHP (https://github.com/jzohrab/lute)

License

Notifications You must be signed in to change notification settings

fanyingfx/lute-v3

 
 

Repository files navigation

Lute v3 with chinese support

2024-01-06.17-56-31.mp4

This is modified version of Lute, it supports Chinese, accurately, it's Mandarin.

Installation and Upgrade

Installation

At first, you should Install Python and activate virtual environment

After the virtual environment activated, you could use command

pip install https://github.com/fanyingfx/lute-v3/releases/download/3.2.7/lute3-3.2.7-py3-none-any.whl --upgrade

to install the lute supporting Chinese.

And you can check the latest version from repo's page and replace the link to the latest version link.

Upgrade

2024-01-06.18-08-41.mp4

Migration

Because of some big change in the codebase, some features may not add to the lute. I am also working on adding Chinese support to original lute, but need some time to find a suitable solution to not make a big change in Lute's code.

The database is full compatible with lute's db, but I also recommend you to create a new database to use.

If you want to migrate previous lute to this version, you can copy your previous database and then in this version of lute's Language Setting, change the Parse as to Mandarin. image

User Defined Dictionary

Another thing, it supports the user defined Chinese words dictionary to make parsed result more correct. after start the lute and mark some terms in reading, then in the lute's data folder you can find a file mandarin.user_dict.txt. in the file:

竹条,编 // it means you make the parser always pase "竹条编" as "竹条" and "编", this is for multiple-words terms
珍珠鸟 // it mean parser will parse 珍珠鸟 as one terms

You can also add your define terms in the file , only Chinese with English comma ',' not Chinese's comma ','

You can reach me by email: [email protected]. or find me in the Lute Discord @fanyingfx and send me any problem in about the Chinese forked Lute issues.

About

Learning Using Texts - Lute v3 in Python, a replacement for Lute v1 and 2 in PHP (https://github.com/jzohrab/lute)

Resources

License

Stars

Watchers

Forks

Languages

  • Python 62.2%
  • HTML 15.9%
  • JavaScript 7.5%
  • CSS 7.2%
  • Gherkin 6.3%
  • Shell 0.8%
  • Dockerfile 0.1%