Skip to content

Commit

Permalink
update the readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
PrinOrange committed Jan 15, 2024
1 parent 7befbc5 commit a615511
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README-CN.MD
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ Sponsor: {

你可以[点击这里查看 Giscus 的相关介绍和用法。](https://giscus.app/)

#### 全文搜索

本项目使用了 [MiniSearch](https://github.com/lucaong/minisearch) 作为基于内存索引的全文搜索引擎。以天下霸唱的《鬼吹灯》为例,有 200 万字左右的中文内容,它的性能表现非常不错:索引占据内存空间为 6 MB,一次查询调用,平均响应时间在 100 ms 以下。

注意:全文搜索目前只支持中文和拉丁系语言(英文、法文、西班牙文等)。对于还不支持其他亚洲语文,如日文、朝鲜文、泰文等。要支持这些语文,还需要集成一些好用的语句分词器来编制索引。欢迎使用这些语言的人提出 pull request 来帮我完成这些工作。

#### i18n

对于个人博客,i18n 其实并没有实用意义。所以,本项目暂时 **不支持 i18n** ,如果你是多语言作者,为了用语言来区分博客,我建议在每篇文章的 tags 下加一个当前语言的标志。比如,对中文博客,在 tags 下加一个 `中文博客` 标签,对英文博客,在 tags 下加一个 `English` 标签。
Expand Down
6 changes: 6 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,12 @@ This website utilizes Giscus as the comment system. For specific configuration i

You can [click here to view the relevant information and usage of Giscus](https://giscus.app/).

#### Full-Text Search

In this project, we utilize [MiniSearch](https://github.com/lucaong/minisearch) as an in-memory indexed full-text search engine. Taking Shakespeare's complete works as an example, with around 890,000 words, its performance is impressive: the index occupies approximately 10 MB of memory space, and with each query call, the average response time remains below 100 ms.

**Note:** Currently, full-text search supports only Chinese and languages of the Latin family (English, French, Spanish, etc.). It does not yet support other Asian languages such as Japanese, Korean, Thai, etc. To include support for these languages, the integration of effective tokenizers for these languages is required for indexing. Individuals fluent in these languages are welcome to submit pull requests to assist in completing this task.

#### i18n

For personal blogs, i18n (internationalization) doesn't really serve a practical purpose. Therefore, this project does not support i18n at the moment. If you are a multilingual author and want to distinguish your blogs by language, I suggest adding a tag for the current language in the tags of each article. For instance, if you are a bilingual speaker of Spanish and English, you could add an `español` tag under the tags for each Spanish article, and an `English` tag for the English blogs.
Expand Down

0 comments on commit a615511

Please sign in to comment.