开发者

What is a permuted index?

I am reading Accelerated C++.开发者_JAVA百科 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?


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


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:

What is a permuted index?

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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜