6

I am working on a commentary on Ethics of the Fathers and I want readers to be able to read sources I'm quoting in their original Hebrew. I am getting most of my sources from sefaria.org and unfortunately many of the sources have Nekudos (vowel marks) while most of them don't. For consistency and professionalism I want all the sources to not contain Nekudos.

For example this line: מֹשֶׁה קִבֵּל תּוֹרָה מִסִּינַי. אוֹמֵר אֲנִי, לְפִי שֶׁמַּסֶּכֶת זוֹ should be משה קבל תורה מסיני. אומר אני שמסכת זו. I expect to need to do this hundreds of times so I need something fast. Somebody once made me a document with Macros to do this but it isn't working on Word 2016. Does anyone else have an efficient way to do it? Thank you so much.

5
  • 3
    Can someone please add Hebrew as a tag? I can't do it yet. Thanks.
    – Eliyahu
    Commented Jan 10, 2018 at 21:03
  • Did you try notepad++?
    – Boondoggle
    Commented Jan 10, 2018 at 23:28
  • Added a few tags. Does that help? You may want to try looking in the Hebrew community or the SuperUser community of stack Exchange. I wish I could find a direct link to either community, but I did quickly come across this question. Not sure if it is relevant. superuser.com/questions/769204/hebrew-nikkud-on-ms-word
    – BugFolk
    Commented Jan 10, 2018 at 23:46
  • 1
    @BugFolk I've changed the tags to include [microsoft-word] and [formatting]. Hebrew is not viable as a tag, because while the question is about vowel marks on Hebrew, it could easily apply to any language. Plus 'Hebrew' is not a tag, and it's good practice to avoid creating tags whenever possible. Similarly, the tags [software] and [language] did not fit the question, which was not asking about a language, nor specifically about software. The OP was asking about MS Word specifically, so that's a far better tag than 'software'. Commented Jan 11, 2018 at 0:34
  • Okay. Good to know.
    – BugFolk
    Commented Jan 11, 2018 at 3:01

4 Answers 4

3

A quick Google search on hebrew remove nikkud gave an answer.

On Github there's a JavaScript with a live preview code. If it's little text you could use the JavaScript either online or download and use it on your pc (save as .js).

The Hebrew charcodes are all between 1425 and 1479 and the nikkud are between 0591 and 05C7.

Python implementation (tested):

import unicodedata
# nikkud-test.txt is the file you save your text in.
f= open('nikkud-test.txt','r', encoding='utf-8') 
content = f.read()
normalized=unicodedata.normalize('NFKD', content)
no_nikkud=''.join([c for c in normalized if not unicodedata.combining(c)])
no_nikkud
f.close()
f = open('no-nikkud-test.txt','w',encoding='utf-8')
fw = f.write(no_nikkud)
f.close()

This works very fast.

UPDATED: How to use this script?

  1. Download Python 3.x.x from the python.org
  2. Save your nikkud text to nikkud-test.txt in whatever directory
  3. From the start menu start your cmd shell/command prompt/terminal.
  4. Move to directory where you saved your file by typing cd followed by the directory
  5. type python or open an iPython console.
  6. copy + paste script
  7. no-nikkud-test.txt will show up in the same directory

UPDATE without Terminal (Tested with Python 3.5 IDLE and iPython)

  1. Download Python 3.5 or higher from python.org
  2. Save your niqqud text to niqqud.txt in your Documents folder. (Windows / Mac)
  3. Open IDLE from the Start Menu. (Alternatively, use iPython)

Copy and paste the function below:

def hasar_niqqud(source="niqqud.txt"):
    """This function removes niqqud vowel diacretics from Hebrew.
    @param source: The source filename with .txt extension."""
    import os, unicodedata
    path  = os.path.expanduser('~/Documents/'+str(source))
    f= open(path,'r', encoding='utf-8')
    content = f.read()
    normalized=unicodedata.normalize('NFKD', content)
    no_niqqud=''.join([c for c in normalized if not unicodedata.combining(c)])
    f.close()
    path  = os.path.expanduser('~/Documents/'+str(source)[:-4]+"-removed.txt")
    f = open(path,'w',encoding='utf-8')
    f.write(no_niqqud)
    f.close()

Then run the function with this code:

hasar_niqqud()

That's it! You can find the output in the Documents folder niqqud-removed.txt

6
  • 2
    Thank you so much. I'm not familiar with coding. How do I use this?
    – Eliyahu
    Commented Jan 11, 2018 at 2:40
  • 2
    For those of us who are technically challenged, could you explain where to download Python3 and how to start a cmd shell? Commented Jan 11, 2018 at 6:20
  • 1
    Updated. The command prompt is also called terminal on other systems. It is not as hard as it seems. It's just a little overwhelming at first.
    – Boondoggle
    Commented Jan 11, 2018 at 6:52
  • I don't know. I spent a while trying to follow these instructions and I keep getting error codes. I really know nothing about using these kinds of programs.
    – Eliyahu
    Commented Jan 12, 2018 at 4:09
  • Try installing iPython ipython.org/install.html It has a better interface than the terminal.
    – Boondoggle
    Commented Jan 13, 2018 at 17:15
4

I was looking for the exact same thing. Dug around and found ways to do it outside Word, but really wanted to do this without leaving Word. Did some more reading and discovered the key is to run a find and replace, searching for the vowel characters in the Hebrew Unicode block. I wanted to keep maqqef and sof pasuq, so I had to use three separate ranges (if you don't want those characters, you can simplify this to one search for the whole range 1425-1479). The results are below. If you select text and run the macro, it will only apply to the selection. If you don't have a selection, it will run to end of document.

Sub HebrewDevocalizer()
With Selection.Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "[" & ChrW(1425) & "-" & ChrW(1469) & "]"
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchKashida = False
    .MatchDiacritics = False
    .MatchAlefHamza = False
    .MatchControl = False
    .MatchAllWordForms = False
    .MatchSoundsLike = False
    .MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll

With Selection.Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "[" & ChrW(1471) & "-" & ChrW(1474) & "]"
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchKashida = False
    .MatchDiacritics = False
    .MatchAlefHamza = False
    .MatchControl = False
    .MatchAllWordForms = False
    .MatchSoundsLike = False
    .MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll

With Selection.Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "[" & ChrW(1476) & "-" & ChrW(1479) & "]"
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchKashida = False
    .MatchDiacritics = False
    .MatchAlefHamza = False
    .MatchControl = False
    .MatchAllWordForms = False
    .MatchSoundsLike = False
    .MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
2

In case your list is in Excel you could use this macro (based on the suggestion of Jonathan Potter). Select a range of cells, then execute the macro in VBEditor.

Sub HebrewDevocalizer()
Dim i As Integer

    For i = 1425 To 1469
        Selection.Replace What:=ChrW(i), Replacement:="", LookAt:=xlPart, _
            SearchOrder:=xlByColumns, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
    Next i
    For i = 1471 To 1474
        Selection.Replace What:=ChrW(i), Replacement:="", LookAt:=xlPart, _
            SearchOrder:=xlByColumns, MatchCase:=False
    Next i
    For i = 1476 To 1479
        Selection.Replace What:=ChrW(i), Replacement:="", LookAt:=xlPart, _
            SearchOrder:=xlByColumns, MatchCase:=False
    Next i

End Sub
2

I looked for an App that would provide the nikud (vowels) to words I was using to create a glossary. However, once I had the words in that form, I could no longer sort them (as we can tell from these questions).

However, the same App, https://nakdan.dicta.org.il/ also allows the user to select the "modern Hebrew" version, and if you click on לחץ כאן (click here) a little dialog box appears. Click on the black box that basically takes you to another version to add vowels, it actually then wipes out whatever vowels you had there.

You may have to play around a bit with it to get the hang of it and/or do it in parts.

Then you can just copy and paste into your spreadsheet in a temporary column to use for sorting. After final sorting, delete that column.

Give that a try for a work-around!

Regards, Madeleine

2
  • Hi Madeleine, welcome to writing.se! Take the tour and visit the help center for more information. This is a nice first answer, thanks for participating and happy writing!
    – linksassin
    Commented Nov 8, 2019 at 10:44
  • Here's a webpage that removes nikud: eshkol.net/Nikud/Default.aspx הסרת ניקוד Hasarat Nikkud Commented Nov 21, 2019 at 9:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.