Find & Replace: Hebrew Issue

Everything related to our flagship word processor.
Post Reply
Daniel Siegel
Posts: 50
Joined: 2003-06-05 06:07:00
Location: British Columbia, Canada

Find & Replace: Hebrew Issue

Post by Daniel Siegel »

I have several documents in Hebrew which are pointed. If I do a find for a particular word without including the points, I get a "found none" response. Is there a way I can get Nisus to ignore the pointing and search only for the combination of letters?
User avatar
martin
Official Nisus Person
Posts: 5228
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Post by martin »

There is no such feature in Nisus Writer at this time. Probably an "ignore diacritical marks" option in the Find dialog would cover Hebrew points. I'll make sure that the feature request makes note to check that, thanks.
Ruchama
Posts: 213
Joined: 2006-08-19 18:35:27

Post by Ruchama »

I suppose you could compose an expression that excludes specifically the nikud ascii codes. (after all they are not that many). you would need to paste that expression following each 'pointed' letter. if you could get used to not being able to read what you are searching for..

or maybe a macro will do the job better. i.e write your word in the Find window and the macro will take the word and add automatically the nikud exclusion following each letter and then run the find command.

Martin- if a macro like that is a valid and feasible solution- I would be interested in it as well. Sorry for the "Huzpe.."
User avatar
martin
Official Nisus Person
Posts: 5228
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Post by martin »

That's an interesting idea Ruchama, thanks. I've put something together:

Code: Select all

Require Application Version 3.1

$diacrits = '[\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7]*'
$find = Read Find Expression

# transform expression to include optional diacrits after each letter
$modFind = ''

$charIdx = 0
$charLim = $find.length
While $charIdx < $charLim
	$char = $find.characterAtIndex($charIdx)
	$charText = Text.newWithCharacter($char)
	$modFind &= $charText & $diacrits
	$charIdx += 1
End

# find next
Find $modFind, '*E'
When the macro is run it will use the current contents of the Find & Replace dialogue to do a "find next" that will ignore hebrew points/accents.

Some things I should mention:
1. The macro will only work for normal find expressions, eg: it will fail for PowerFind expressions.
2. I'm no expert on Hebrew nikud and simply used this table as my guide. If I missed a nikud character, let me know.
3. The macro requires the public beta of Pro 1.1.
Ruchama
Posts: 213
Joined: 2006-08-19 18:35:27

Post by Ruchama »

Martin- you are one in a million..

I haven't installed yet the new version but for this test it should be worthwhile. I will let you know asap how it works.

Thanks.. again,

I went through the code table; your selection looks ok, but if anything is missing I should be able to fix that myself.

Daniel: the current selection does not include Ta'amei Hamikra: if you need those included and don't know how to do it- let me know.


[/i]
Post Reply