From d6eb9d635e4d965c3b1928cefb356eaec20d1699 Mon Sep 17 00:00:00 2001 From: Eliran Wong Date: Sat, 25 Aug 2018 17:39:36 +0100 Subject: [PATCH] Update compileOGNT.py --- mapping_BGB/script/compileOGNT.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mapping_BGB/script/compileOGNT.py b/mapping_BGB/script/compileOGNT.py index efdb39e..a403def 100644 --- a/mapping_BGB/script/compileOGNT.py +++ b/mapping_BGB/script/compileOGNT.py @@ -1,5 +1,4 @@ # compile a NA-equivalent text from Berean Greek data (inclusive) -# the text is compiled to become the main text of OpenGNT project import re @@ -22,13 +21,13 @@ newData = re.sub('^.*?⧼[^⧼⧽]*?⧽.*?\n', '', newData, flags=re.M) # take away some of WH variants; those variants are reserved in footnotes newData = re.sub('^.*?\([^\(\)]*?\).*?\n', '', newData, flags=re.M) # take away Nestle 1904 variants; those variants are reserved in footnotes -newData = re.sub('^.*?〈[^〈〉]*?〉.*?\n', '', newData, flags=re.M) +newData = re.sub('^.*?〈[^〈〉]*?〉.*?\n', '', newData, flags=re.M) # take away some of SBLGNT variants; those variants are reserved in footnotes newData = re.sub('^.*?〈[^〈〉]*?〉.*?\n', '', newData, flags=re.M) # take away punctuation marks and variant markers -newData = re.sub('[ \-\—\,\;\:\?\.\·\·\'\‘\’\‹\›\“\”\«\»\(\)\[\]\{\}\⧼\⧽\〈\〉\*\‿\⇔\¦]᾽', '', newData) -newData = re.sub('[ \-\—\,\;\:\?\.\·\·\'\‘\’\‹\›\“\”\«\»\(\)\[\]\{\}\⧼\⧽\〈\〉\*\‿\⇔\¦]', '', newData) +newData = re.sub('[ \-\—\,\;\:\?\.\·\·\'\‘\’\‹\›\“\”\«\»\(\)\[\]\{\}\⧼\⧽\〈\〉\*\‿\⇔\¦]᾽', '', newData) +newData = re.sub('[ \-\—\,\;\:\?\.\·\·\'\‘\’\‹\›\“\”\«\»\(\)\[\]\{\}\⧼\⧽\〈\〉\*\‿\⇔\¦]', '', newData) # 2 lines below replace words in main text with variants, use for mapping purposes ONLY #newData = re.sub('^([^\t\n]*?\t[^\t\n]*?\t[^\t\n]*?\t[^\t\n]*?\t)[^\t\n]*?\t([^\t\n]*?\t)([^\t\n+@$]+?)$', r'\1\3\t\2\3', newData, flags=re.M)