Reply to topic  [ 5 posts ] 
index using word list 
Author Message

Joined: 2004-01-29 04:17:10
Posts: 105
Location: Paris, FR
I need to index a number of Nisus documents, using the index as scheme, where the words to be indexed are variants of some French words, like homogène, homogénéité, hétérogène, hétérogénéité, along with their plural form and their capitalized form as well, and sometimes their masculine and feminine form — which means processing 4 to 8 times the theoretical number of words to index.

Obviously, this cannot be done automatically using the index using word list feature as is, and is certainly tedious to do manually. In fact I could use an extension to the index using word list feature that would work with the index as mode instead.

Is there a way this could be done using Nisus macros to process lists of assorted words?

I've been reading the Nisus macros reference but can't find any satisfactory answer... except perhaps using the Menu command, but I failed to realize how to:

  1. use a list variable to select all occurrences of one item, at once, in the text
  2. index these occurrences using a topic string from some scalar variable
  3. proceed with the next item in the list for the same topic
  4. proceed with the next list of items to be indexed under a different topic

In fact, I cannot imagine how to put up the data structure that would be needed for processing a whole document — then do the exactly the same for some other document... Can anybody help?


2008-07-13 02:08:40
Profile
User avatar

Joined: 2007-01-17 03:25:42
Posts: 729
feat wrote:
Obviously, this cannot be done automatically using the index using word list feature as is, and is certainly tedious to do manually.

'Word list' is a misnomer. What you actually need is a concordance file having two columns. The first column is what you want to find in your document followed by a tab and then how you want what was found to appear in the index. The concordance file would look like this:

homogène homogénéité
homogènes homogénéité
homogénéité homogénéité
hétérogène hétérogénéité
hétérogènes hétérogénéité
hétérogénéité hétérogénéité

An easy way to create a concordance file from a world list is to run a macro like this:
Code:
Find and Replace '^.+$', '\0\t\0', 'Ea'

Then make any modifications to it to take care of all possible variant forms of the topic.


2008-07-13 06:56:07
Profile

Joined: 2004-01-29 04:17:10
Posts: 105
Location: Paris, FR
Thanks, Hamid, but even if I built such a concordance table by hand — and of course, I did — it wouldn't solve the basic problem: how do I use that data to invoke the index as menu command?

The best solution would indeed be an extension of the index using word list command that would work as the index as menu command does...

Yet I'm stuck, since I don't have the source code for any of these processes to begin with.


2008-07-13 09:14:45
Profile
User avatar

Joined: 2007-01-17 03:25:42
Posts: 729
Indexing using a concordance file does not give you the possibility of applying character styles to the topic even when they are defined in the second column. That is a shortcoming. However, you still have the possibility of indexing subtopics by using the separator ':' for example:
lion animaux:lion
âne animaux:âne


2008-07-13 09:49:11
Profile

Joined: 2004-01-29 04:17:10
Posts: 105
Location: Paris, FR
Neat, Hamid: this tip definitely solves my problem! The documentation is rather terse on that particular subject.


2008-07-13 22:55:17
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software