gpt4 book ai didi

indexing - 如何生成(书籍)索引?

转载 作者:行者123 更新时间:2023-12-05 08:02:43 28 4
gpt4 key购买 nike

我需要为一本书创建一个索引。虽然乍一看这项任务很简单——按第一个字母对单词进行分组,然后对它们进行排序——但这个显而易见的解决方案仅适用于美国语言。然而,真正的词要复杂得多。参见 http://en.wikipedia.org/wiki/Collation :

The difference between computer-style numerical sorting and true alphabetical sorting becomes obvious in languages using an extended Latin alphabet. For example, the 29-letter alphabet of Spanish treats ñ as a basic letter following n, and formerly treated ch and ll as basic letters following c and l, respectively. Ch and ll are still considered letters, but are now alphabetized as two-letter combinations. (The new alphabetization rule was issued by the Royal Spanish Academy in 1994.) On the other hand, the digraph rr follows rqu as expected, both with and without the 1994 alphabetization rule. A numeric sort may order ñ incorrectly following z and treat ch as c + h, also incorrect when using pre-1994 alphabetization.

我试图找到一个现有的解决方案。

DocBook 样式表没有解决这个问题。

我找到的最佳匹配是 xindy ( http://xindy.sourceforge.net/ ),但是这个工具与 LaTeX 的联系太多了。

还有什么建议吗?

最佳答案

天真地,您可以检查文本中的每个单词并创建一个散列,使用这些单词作为键,并构建一个位置数组(页码?)作为值。

但索引通常比这更集中一些。

关于indexing - 如何生成(书籍)索引?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4397533/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com