什么是排列索引?

发布于 2024-09-28 18:45:43 字数 428 浏览 9 评论 0原文

我正在阅读《加速 C++》。我不明白练习 5-1:

设计并实现一个程序,根据以下输入生成排列索引。置换索引是指每个短语都由短语中的每个单词进行索引的索引。

     The quick      brown fox 
jumped over the     fence
The quick brown     fox 
                    jumped over the fence
         jumped     over the fence
            The     quick brown fox 
    jumped over     the fence
                    The quick brown fox

这个解释我不清楚。置换索引到底是什么?

I am reading Accelerated C++. I don't understand Exercise 5-1:

Design and implement a program to produce a permuted index from the following input. A permuted index is one in which each phrase is indexed by every word in the phrase.

     The quick      brown fox 
jumped over the     fence
The quick brown     fox 
                    jumped over the fence
         jumped     over the fence
            The     quick brown fox 
    jumped over     the fence
                    The quick brown fox

That explanation isn't clear to me. What exactly is a permuted index?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

浮华 2024-10-05 18:45:43

术语排列索引是 KWIC 索引的另一个名称,指的是它对标题的所有循环排列进行索引的事实。由许多带有自己的描述性标题的小节组成的书籍,尤其是手册页的集合,通常以排列索引部分结尾,使读者可以通过标题中的任何单词轻松找到该节。这种做法已不再常见。

来自:http://en.wikipedia.org/wiki/Key_Word_in_Context

ps:可以访问wikipedia通过 http://www.proxify.com

The term permuted index is another name for a KWIC index, referring to the fact that it indexes all cyclic permutations of the headings. Books composed of many short sections with their own descriptive headings, most notably collections of manual pages, often ended with a permuted index section, allowing the reader to easily find a section by any word from its heading. This practice is no longer common.

From: http://en.wikipedia.org/wiki/Key_Word_in_Context

ps: you can access wikipedia via http://www.proxify.com

所谓喜欢 2024-10-05 18:45:43

您可以在7th UNIX™ 程序员参考手册版本,第 1 卷(可追溯到 1979 年)。它的一个片段(来自 PDF 文件)是:

Extract from start of Permuted Index for 7th Edition Unix Programmer's Reference Manual Vol 1

如果您查找“帐户”,您可以找到多个相关条目。您可能不会想到寻找 sa(1) 以及 ac(1),更不用说 acct(2)acct(5) 除非它们组合在一起。这就是排列索引的好处;您可以查找关键字并在更大的上下文中查看它。

您还可以查看同一第 7 版手册中的 ptx(1) 命令的手册页条目。

You can find a 'live' example of a permuted index in the 7th Edition UNIX™ Programmer's Reference Manual, Vol 1 (dating back to 1979). A fragment of it (from the PDF files) is:

Extract from start of Permuted Index for 7th Edition Unix Programmer's Reference Manual Vol 1

If you look for 'account', you can find a number of related entries together. You probably wouldn't think to look for sa(1) as well as ac(1), not to mention acct(2) or acct(5) unless they were grouped together. This is the benefit of a permuted index; you can look up the key word and see it in a bigger context.

You could also look at the man page entry for the ptx(1) command in the same 7th Edition manual.

醉梦枕江山 2024-10-05 18:45:43

置换索引是由其上下文包围的按字母顺序排列的索引列表。在输出中,观察粗体字。它们按字母顺序排序,并被其上下文包围。这使我们可以轻松搜索单词并直接从周围上下文(即您案例中的单词)推断其用法。

敏捷的棕色狐狸

跳过了栅栏

敏捷的棕色狐狸

跳过了栅栏

跳过了< /strong> 栅栏

敏捷 棕色狐狸

跳过栅栏 栅栏

敏捷 棕色狐狸

Permuted index is an alphabetic list of index surrounded by its context. In the output, observe the bold words. They are alphabetically sorted and are surrounded by its context. This makes it easy for us to search a word and directly infer its usage from the surrounding context i.e. words in your case.

The quick brown fox

jumped over the fence

The quick brown fox

jumped over the fence

jumped over the fence

The quick brown fox

jumped over the fence

The quick brown fox

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文