0

I am looking to convert the Hebrew/Aramaic text exports from Sefaria.org into another text format, and "clean them up" as best as I can. By clean them up, I mean convert them to a basic Hebrew format without modern Latin script symbols (periods, parentheses, etc.).

For example, take the Zohar Hebrew translations. The merged.json looks partly like this (warning, big file, here is a snippet):

{
  "title": "Zohar",
  "language": "he",
  "versionTitle": "merged",
  "versionSource": "https://www.sefaria.org/Zohar",
  "text": [
      [
          [
              "רִבִּי חִזְקִיָּה פָּתַח, כָּתוּב (שיר השירים ב) כְּשׁוֹשַׁנָּה בֵּין הַחוֹחִים. מִי הַשּׁוֹשַׁנָּה זוֹ כְּנֶסֶת יִשְׂרָאֵל [משום שיש שושנה ויש שושנה]. מָה הַשּׁוֹשַׁנָּה שֶׁהִיא בֵּין הַחוֹחִים יֵשׁ בָּהּ אָדֹם וְלָבָן - אַף כְּנֶסֶת יִשְׂרָאֵל יֵשׁ בָּהּ דִּין וְרַחֲמִים. מַה שּׁוֹשַׁנָּה יֵשׁ בָּהּ שְׁלֹשָׁה עָשָׂר עָלִים - אַף בִּכְנֶסֶת יִשְׂרָאֵל יֵשׁ שְׁלֹשׁ עֶשְׂרֵה מִדּוֹת רַחֲמִים שֶׁמַּקִּיפוֹת אוֹתָהּ מִכָּל צְדָדֶיהָ. אַף אֱלֹהִים שֶׁל כָּאן, מִשָּׁעָה שֶׁנִּזְכַּר, הוֹצִיא שְׁלֹשׁ עֶשְׂרֵה תֵבוֹת לְהַקִּיף אֶת כְּנֶסֶת יִשְׂרָאֵל וְלִשְׁמֹר אוֹתָהּ.",
              "וְאַחַר כָּךְ נִזְכַּר פַּעַם אַחֶרֶת. לָמָּה נִזְכַּר בְּפַעַם אַחֶרֶת כְּדֵי לְהוֹצִיא חֲמִשָּׁה עָלִים חֲזָקִים שֶׁסּוֹבְבִים אֶת הַשּׁוֹשַׁנָּה. וְאוֹתָם הַחֲמִשָּׁה נִקְרָאִים יְשׁוּעוֹת, וְהֵם [חמשה] [חמשים] שְׁעָרִים. וְעַל זֶה הַסּוֹד כָּתוּב (תהלים קטז) כּוֹס יְשׁוּעוֹת אֶשָּׂא, זוֹ כּוֹס שֶׁל בְּרָכָה. הַכּוֹס שֶׁל בְּרָכָה צְרִיכָה לִהְיוֹת עַל חָמֵשׁ אֶצְבָּעוֹת וְלֹא יוֹתֵר, כְּמוֹ שֶׁהַשּׁוֹשַׁנָּה שֶׁיּוֹשֶׁבֶת עַל חֲמִשָּׁה עָלִים חֲזָקִים בְּדֻגְמָא שֶׁל חָמֵשׁ אֶצְבָּעוֹת. וְהַשּׁוֹשַׁנָּה הַזּוֹ הִיא כּוֹס שֶׁל בְּרָכָה. מֵ''אֱלֹהִים'' הַשֵּׁנִי עַד ''אֱלֹהִים'' הַשְּׁלִישִׁי - חָמֵשׁ תֵּבוֹת. מִכָּאן וָהָלְאָה הָאוֹר שֶׁנִּבְרָא וְנִגְנַז וְנִכְלַל בַּבְּרִית הַהוּא שֶׁנִּכְנַס בַּשּׁוֹשַׁנָּה [ס''א זו] וְהוֹצִיא בָהּ זֶרַע, וְזֶה נִקְרָא עֵץ עֹשֶׂה פְּרִי אֲשֶׁר זַרְעוֹ בוֹ. וְאוֹתוֹ הַזֶּרַע קַיָּם בְּאוֹת הַבְּרִית מַמָּשׁ. וּכְמוֹ שֶׁדְּמוּת הַבְּרִית נִזְרַע בְּאַרְבָּעִים וּשְׁנַיִם זִוּוּגִים [של אותו] הַזֶּרַע הַהוּא, כָּךְ נִזְרַע הַשֵּׁם הֶחָקוּק מְפֹרָשׁ בְּאַרְבָּעִים וּשְׁתַּיִם אוֹתִיּוֹת שֶׁל מַעֲשֵׂה בְרֵאשִׁית.",
              "בְּרֵאשִׁית, רִבִּי שִׁמְעוֹן פָּתַח (שיר השירים ב׳:י״ב) (צז א, לט ע''ב, ויקרא ד ב, לקמן ה) הַנִּצָּנִים נִרְאוּ בָאָרֶץ. הַנִּצָּנִים, דָּא עוֹבָדָא דִּבְרֵאשִׁית, נִרְאוּ בָאָרֶץ אֵימָתַי, בַּיּוֹם הַשְּׁלִישִׁי, דִּכְתִיב וַתּוֹצֵא הָאָרֶץ כְּדֵין נִרְאוּ בָאָרֶץ. עֵת הַזָּמִיר הִגִּיעַ, דָּא יוֹם רְבִיעִי דְּהֲוָה בֵּיהּ זְמִיר עָרִיצִים, מְאֹרֹת חָסֵר. וְקוֹל הַתּוֹר, דָּא יוֹם חֲמִישִׁי, דִּכְתִיב יִשְׁרְצוּ הַמַּיִם וְגו' לְמֶעְבַּד תּוֹלָדוֹת. נִשְׁמַע, דָּא יוֹם שִׁשִּׁי דִּכְתִיב נַעֲשֶׂה אָדָם. דְּהֲוָה עָתִיד לְמִקְדַּם עֲשִׂיָּה לִשְׁמִיעָה, דִּכְתִיב  \n"
          ],
          [
              " הָכָא נַעֲשֶׂה אָדָם, וּכְתִיב הָתָם נַעֲשֶׂה וְנִשְׁמַע. בְּאַרְצֵנוּ, דָּא יוֹם שַׁבָּת דְּאִיהוּ דּוּגְמַת אֶרֶץ הַחַיִּים. \n",
              "(שהוא עולם הבא. עולם הנשמות עולם הנחמות). (נ''א דבר אחר) הַנִּצָּנִים אִלֵּין אִנּוּן אֲבָהָן דְּעָאלוּ בַּמַּחֲשָׁבָה וְעָאלוּ בְּעָלְמָא דְּאָתֵי וְאִתְגְּנִיזוּ תַּמָּן. וּמִתַּמָּן נָפְקוּ בִּגְנִיזוּ וְאִטָּמִירוּ גוֹ (נ''א בהו) נְבִיאֵי קְשׁוֹט. אִתְיְלִיד יוֹסֵף וְאִטָּמִירוּ בֵּיהּ, עָאל יוֹסֵף בְּאַרְעָא קַדִּישָׁא וּנְצִיב לוֹן תַּמָּן, וּכְדֵין נִרְאוּ בָאָרֶץ וְאִתְגָּלוּ תַּמָּן. וְאֵימָתַי אִתְחָזוּן, בְּשַׁעֲתָא דְּאִתְגְּלֵי קֶשֶׁת בְּעָלְמָא. דְּהָא בְּשַׁעֲתָא דְּקֶשֶׁת אִתְחֲזֵי כְּדֵין אִתְגַּלְּיָן אִנּוּן, וּבְהַהִיא שַׁעֲתָא עֵת הַזָּמִיר הִגִּיעַ עִדָּן לְקַצֵּץ חַיָּבִין מֵעָלְמָא. אַמַּאי אִשְׁתְּזִיבוּ, בְּגִין דְּהַנִּצָּנִים נִרְאוּ בָאָרֶץ, וְאִלְמָלֵא דְנִרְאוּ לָא אִשְׁתָּאֲרוּן בְּעָלְמָא, וְעָלְמָא לָא אִתְקַיָּם. \n",
              "וּמָאן מְקַיֵּם עָלְמָא וְגָרִים לַאֲבָהָן דְּאִתְגַּלְּיָן, קַל יְנוֹקֵי דְּלָעָאן בְּאוֹרַיְתָא, וּבְגִין אִנּוּן רַבְיָין דְּעָלְמָא, עָלְמָא אִשְׁתְּזִיב. לְקָבְלֵיהוֹן, (שיר השירים א) תּוֹרֵי זָהָב נַעֲשֶׂה לָךְ, אִלֵּין אִנּוּן יְנוֹקֵי רַבְיָין עוּלְמִין דִּכְתִיב, (שמות כ''ה) וְעָשִׂיתָ שְׁנַיִם כְּרוּבִים זָהָב. \n",
              "בְּרֵאשִׁית רִבִּי אֶלְעָזָר פָּתַח (ישעיה מ) שְׂאוּ (דף ל' א) מָרוֹם עֵינֵיכֶם וּרְאוּ מִי בָרָא אֵלֶּה. שְׂאוּ מָרוֹם עֵינֵיכֶם לְאָן אֲתַר, לְאֲתַר דְּכָל עַיְינִין תָּלְיָאן לֵיהּ. וּמָאן אִיהוּ, פֶּתַח עֵינַיִם. וְתַמָּן תִּנְדְּעוּן דְּהַאי סָתִים עַתִּיקָא דְקַיְמָא לַשְּׁאֵלָה. בָּרָא אֵלֶּה. וּמָאן אִיהוּ. מִ''י. הַהוּא (שמות ק''מ א) דְאִקְרֵי מִקְצֵה הַשָּׁמַיִם לְעֵילָּא. דְּכֹלָא קַיְּמָא בִּרְשׁוּתֵיהּ. וְעַל דְּקַיְמָא לַשְּׁאֵלָה וְאִיהוּ בְּאֹרַח סָתִים וְלָא אִתְגַּלְיָא, אִקְרֵי מִ''י, דְּהָא לְעֵילָּא לֵית תַּמָּן שְׁאֵלָה. וְהַאי קְצֵה הַשָּׁמַיִם אִקְרֵי מִ''י. \n",
              "וְאִית אָחֳרָא לְתַתָּא וְאִקְרֵי מַ''ה. מַה בֵּין הַאי לְהַאי, אֶלָּא קַדְמָאָה סְתִימָאָה דְּאִקְרֵי מִ''י קַיְּמָא (תרומה קל''ח א', ויקהל רי''א, בהעלותך קמ''ח ב', ולהלן ט' א', י''ו, קס''ז א', שמות קנ''ז) לַשְּׁאֵלָה, כֵיוָן דְּשָׁאַל בַּר נָשׁ וּמְפַשְׁפֵּשׁ לְאִסְתַּכְּלָא וּלְמִנְדַע מִדַּרְגָּא לְדַרְגָּא עַד סוֹף כָּל דַּרְגִּין, כֵּיוָן דְּמָטֵי תַּמָּן, מַ''ה. מַה יָּדַעְתָּ, מַה אִסְתָּכַּלְתָּא, מַה פִּשְׁפַּשְׁתָּא, הָא כֹּלָא סָתִים כִּדְקַדְמִיתָא. \n",
              "וְעַל רָזָא דְּנָא כְּתִיב, (איכה ב) מָה אֲעִידֵךְ מָה אֲדַמֶּה לָךְ. כַּד אִתְחְרִיב בֵּי מַקְדְּשָׁא נָפַק קָלָא וַאֲמַר מָה אֲעִידֵךְ (נ''א ומה [מה] אדמה לך, בההוא מ''ה אעידך) בְּכָל יוֹמָא וְיוֹמָא, [וְהָא] אַסְהִידַת בָּךְ מִיּוֹמִין קַדְמָאִין דִּכְתִיב, (דברים ל) הַעִדֹתִי בָכֶם הַיּוֹם אֶת הַשָּׁמַיִם וְאֶת הָאָרֶץ. וּמָה אֲדַמֶּה לָךְ בְּהַהוּא גַוְנָא מַמָּשׁ עֲטָרִית לָךְ בְּעִטְרִין קַדִּישִׁין עֲבָדִית לָךְ שָׁלְטָנוּ עַל עָלְמָא דִּכְתִיב, (איכה ב) הֲזֹאת'' הָעִיר'' שֶׁיֹּאמְרוּ'' כְּלִילַת'' יפִי'' וְגו' קָרֵינָא לָךְ (תהלים קכ''ב) יְרוּשָׁלַיִם הַבְּנוּיָה כְּעִיר שֶׁחֻבְּרָה לָּהּ. \n",
              "(איכה ב) מָה אַשְׁוֶה לָּךְ. כְּגַוְונָא דְּאַנְתְּ יָתְבָה, הָכִי הוּא כִּבְיָכוֹל לְעֵילָא. כְּגַוְונָא דְּלָא עָאלִין הַשְׁתָּא בָּךְ עַמָּא קַדִּישָׁא בְּסִדְּרִין קַדִּישִׁין, הָכִי אוֹמֵינָא לָךְ דְּלָא אֵיעוֹל אֲנָא לְעֵילָא עַד דְּיֵעֲלוּן בָּךְ אֻכְלוֹסָךְ לְתַתָּא. וְדָא אִיהוּ נֶחָמָה דִילָךְ הוֹאִיל דְּדַרְגָא דָא אַשְׁוֶה לָךְ בְּכֹלָא. וְהַשְׁתָּא דְּאַנְתְּ הָכָא גָּדוֹל כַּיָּם שִׁבְרֵךְ. וְאִי תֵימָא דְּלֵית לָךְ קַיָּימָא וְאַסְוָתָא, מִ''י (שמות רל''ז ב) יִרְפָּא לָךְ, וַדַּאי הַהוּא דַרְגָּא סְתִימָאָה עִלָּאָה דְכֹלָא קַיְּימָא בֵּיהּ יִרְפָּא לָךְ וְיוֹקִים לָךְ. \n",
              "מִ''י קְצֵה הַשָּׁמַיִם לְעֵילָא, מַ''ה וְעַד קְצֵה הַשָּׁמַיִם לְתַתָּא (קצה השמים לתתא). וְדָא יָרִית יַעֲקֹב דְּאִיהוּ מַבְרִיחַ מִן הַקָּצֶה אֶל הַקָּצֶה, מִן הַקָּצֶה קַדְמָאָה דְּאִיהוּ מִ''י, אֶל הַקָּצֶה בַּתְרָאָה דְּאִיהוּ מַ''ה, בְּגִין דְּקָאִים בְּאֶמְצָעִיתָא. וְעַל דָּא מִי בָּרָא אֵלֶּה. \n",
              "אָמַר רִבִּי שִׁמְעוֹן, אֶלְעָזָר בְּנִי פְּסוֹק מִילָךְ וְיִתְגְּלֵי סְתִימָא דְרָזָא עִלָּאָה דִּבְנֵי עָלְמָא לָא יָדְעִין. שָׁתִיק רִבִּי אֶלְעָזָר. בָּכָה רִבִּי שִׁמְעוֹן וְקָאִים רִגְעָא (נ''א שְׁעָתָא) חָדָא.\n",
              "אָמַר רִבִּי שִׁמְעון, אֶלְעָזָר מַאי אֵלֶּה. אִי תֵימָא כֹּכְבַיָא וּמַזָּלֵי, הָא אִתְהֲזָאָן תַּמָּן תָּדִיר. וּבְמָּ''ה אִתְבְּרִיאוּ כְּמָא דְאַתְּ אָמֵר, (תהלים לג) בִּדְבַר יְיָ שָׁמַיִם נַעֲשׂוּ. אִי עַל מִלִּין סְתִימִין לָא לִכְתּוב אֵלֶּה דְּהָא אִיתְגַּלְּיָא אִיהוּ. אֶלָּא רָזָא דָא לָא אִתְגַּלְּיָא בַּר יוֹמָא חַד דַּהֲוֵינָא עַל כֵּיף יַמָּא, וְאָתָא אֵלִיָּהוּ וְאָמַר לִי רִבִּי, יָדַעְתְּ מַה הוּא, מִי בָּרָא אֵלֶּה. אֲמִינָא לֵיהּ אִלֵּין שְׁמַיָּא וְחֵילֵהון עובָדָא דְקוּדְשָׁא בְּרִיךְ הוּא דְּאִית לֵיהּ לְבַר נָשׁ לְאִסְתַּכְּלָא בְּהוּ וּלְבָרְכָא לֵיהּ דִּכְתִיב, (תהלים ח) כִּי אֶרְאֶה שָׁמֶיךְ מַעֲשֵׂה\n"
          ],
          ...
      ]
      ...
  ]
  ...
}

First thing to note, there are new line markers \n at the end of each line/verse, so those can be cleared up as we treat each array element as a line itself.

Second thing to note is there are [] square brackets and () parentheses, as in these examples:

וְהֵם [חמשה] [חמשים] שְׁעָרִים

and

דִּכְתִיב, (שמות כ''ה) וְעָשִׂיתָ

Also note the comma and double apostrophes. The symbols like the colon : I will just convert to a Sof passuk, and the comma and period I can find the Hebrew equivalents, so I think I know what to do with those two (but still have a question about the apostrophe ' and double apostrophe '', and semicolon).

The main question, beyond what ', '', and ; are translated to, is what do the things in square [] and round () brackets mean? Basically, can I cut everything in between these square/round brackets out of the text, or is it part of the text? What does the parenthesized stuff contain (I don't read Hebrew really yet).

Another text, The Wars of God, has double apostrophes as " instead of '', so maybe those are the same?

 נניח הא\"ס ושאר

It also has some square bracketed numbers, as in:

מהחזק[6] והסכנה

Also in the Torah > Deuteronomy, we have some parentheses too:

וַיְהִ֨י כַאֲשֶׁר־תַּ֜מּוּ כָּל־אַנְשֵׁ֧י הַמִּלְחָמָ֛ה לָמ֖וּת מִקֶּ֥רֶב הָעָֽם׃ (ס)
וְאֶת־בנו [בָּנָ֖יו] וְאֶת־כָּל־עַמּֽוֹ
וַנֵּ֣שֶׁב בַּגָּ֔יְא מ֖וּל בֵּ֥ית פְּעֽוֹר׃ (פ)

Looks like those "single letter" paren ones always fall at the end of a line.

That looks like most of the non-Hebrew marks in the text that I would like to "clean up". What do they all mean, and can the parentheses be cut out or what?

2
  • For text that's supposedly Hebrew I'm seeing a lot of Aramaic in there.
    – Mithical
    Dec 7, 2021 at 7:09
  • Sorry yeah, if these are the original Aramaic, my mistake. Updated the title.
    – Lance
    Dec 7, 2021 at 7:26

1 Answer 1

1

The Zohar specifically is written in Aramaic, and rather difficult Aramaic at that. I'm struggling to understand most of what's written there, to be honest.

However, from what I do understand, the words in brackets indicate text added to make it easier to understand - an annotation [added] by someone to indicate words that aren't 100% necessary but make it clearer. As an example, from your text,

וּכְמוֹ שֶׁדְּמוּת הַבְּרִית נִזְרַע בְּאַרְבָּעִים וּשְׁנַיִם זִוּוּגִים [של אותו] הַזֶּרַע הַהוּא

This translates roughly to

And just like the forms of this agreement were seeded in forty two pairs [of the same] of that plant

(I say "roughly" because some of those words would be translated differently depending on the context and I don't understand the context well enough to be 100% sure.)

In the example you gave - "וְהֵם [חמשה] [חמשים] שְׁעָרִים" - it looks like the annotator wasn't sure if it was supposed to be "five" or "fifty" here, and so added in both.

The parentheses in your Zohar text are mostly sources. Your example:

דִּכְתִיב, (שמות כ''ה) וְעָשִׂיתָ

This translates to

As it is written (Exodus 25), "And you shall..."

The double apostrophe is how numbers are often written in Hebrew and Aramaic. However, when this or a quote mark is used, it can also often indicate a contraction.

You gave the example of

נניח הא"ס ושאר

This looks to me, at a glance, to be something along the lines of

Assume the א"ס and the rest

Where the א"ס is a shorthand abbreviation for something they were referring to that starts with the letters א and ס. This is something used in the G'mara quite often.

The numbers in brackets look like commentary footnotes.

In the Torah text you've provided, things are a little different, though. Taking the text you've provided:

וְאֶת־בנו [בָּנָ֖יו] וְאֶת־כָּל־עַמּֽוֹ

The brackets here are indicating the correct pronunciation of the word. Since the word "בנו" is written without a yud in the text, it would be pronounced "B'no" and mean "his son", singular. With the yud, it becomes "Banav", and means "his sons", plural. The brackets indicate the correct pronunciation so that the meaning isn't accidentally changed.

A ס at the end of a pasuk (sentence) indicates a line break would be here if it was written in a scroll. ס
A פ indicates a paragraph break. פ

This is done to show what the original text is like to keep any copy as close to the original text as possible.

2
  • Excellent info, thank you so much!
    – Lance
    Dec 7, 2021 at 8:14
  • The א״ס abbreviation is probably Ein Sof
    – Alex
    Mar 9 at 23:57

Your Answer

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

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