Update compileOGNT.py

This commit is contained in:
Eliran Wong 2018-08-25 17:39:36 +01:00 committed by GitHub
parent cce8c5e156
commit d6eb9d635e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -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)