Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Commit

Permalink
New minor release 4.5.17
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkroorda committed Mar 2, 2016
1 parent 2040641 commit 22c7003
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 8 deletions.
Binary file removed dist/laf-fabric-4.5.16.tar.gz
Binary file not shown.
Binary file added dist/laf-fabric-4.5.17.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
project = u'LAF Fabric'
copyright = u'2013, Dirk Roorda'
version = '4.5'
release = '4.5.16'
release = '4.5.17'
exclude_patterns = ['_build']
add_function_parentheses = True
add_module_names = False
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py.bck
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ master_doc = 'index'
project = u'LAF Fabric'
copyright = u'2013, Dirk Roorda'
version = '4.5'
release = '4.5.15'
release = '4.5.16'
exclude_patterns = ['_build']
add_function_parentheses = True
add_module_names = False
Expand Down
4 changes: 4 additions & 0 deletions docs/texts/release-notes.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Release Notes
#############
4.5.17
==========
Small fixes in transcriptions (nun hafukha, setumah, petuhah, paseq).

4.5.16
==========
New languages for book names added: Russian, Turkish, Korean, Spanish, Swahili.
Expand Down
2 changes: 1 addition & 1 deletion emdros2laf/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import argparse

NAME = 'LAF-Fabric'
VERSION = '4.5.16'
VERSION = '4.5.17'
APIREF = 'http://laf-fabric.readthedocs.org/en/latest/texts/API-reference.html'
DEFAULT_DATA_DIR = 'laf-fabric-data'
MAIN_CFG = 'laf-fabric.cfg'
Expand Down
12 changes: 10 additions & 2 deletions etcbc/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class Transcription(object):
'52': "\u05C4", # upper dot = puncta_above
'53': "\u05C5", # lower dot = puncta_below
'ñ': "\u05C6\u0307", # nun hafukha
'Ñ': "\u05C6\u0307", # nun hafukha
'>': "\u05D0", # alef
'B': "\u05D1", # bet
'G': "\u05D2", # gimel
Expand Down Expand Up @@ -107,6 +108,8 @@ class Transcription(object):
swap_accent_pat = re.compile(r'(\A|[_&])([0-9][0-9])([' + hebrew_cons + r'])([:;,.EAIOU@]*)')
remove_accent_pat = re.compile(r'((?:[0-9][0-9])|[,*])')
remove_point_pat = re.compile(r'((?:[0-9][0-9])|(?:\.[cf])|(?::[@AE])|[,.:;@AEIOU*])')
remove_psn_pat = re.compile(r'00[ _SPNÑñ]*')
remove_psq_pat = re.compile(r'(?:[ _]+05[ _]*)|(?:05[ _]+)')
shin_pat = re.compile(r'[CF]')
ph_simple_pat = re.compile(r'([ˈˌᵊᵃᵒᵉāo*])')
noorigspace = re.compile('''
Expand Down Expand Up @@ -151,6 +154,9 @@ def __init__(self):
self.hebrew_consonants = {Transcription.hebrew_mapping[x] for x in Transcription.hebrew_cons}
self.hebrew_consonants.add('\u05E9')
self.hebrew_mappingi = dict((v,k) for (k,v) in Transcription.hebrew_mapping.items() if k != '')
# special treatment needed for nun hafukha, since it is consists of two characters
self.hebrew_mappingi['\u05C6'] = 'ñ'
self.hebrew_mappingi['\u0307'] = ''

def _comp(s):
for (d, c) in Transcription.decomp.items(): s = s.replace(d, c)
Expand Down Expand Up @@ -201,8 +207,8 @@ def suffix_and_finales(word):
def _map_final(m): return m.group(1) + m.group(2).lower() + m.group(3)
def _map_hebrew(m): return Transcription.hebrew_mapping.get(m.group(1), m.group(1))
def _swap_accent(m): return m.group(1) + m.group(3) + m.group(4) + m.group(2)
def _remove_accent(m): return '00' if m.group(1) == '00' else ''
def _remove_point(m): return '00' if m.group(1) == '00' else ''
def _remove_accent(m): return '00' if m.group(1) == '00' else '05' if m.group(1) == '05' else ''
def _remove_point(m): return '00' if m.group(1) == '00' else '05' if m.group(1) == '05' else ''
def _ph_simple(m): return 'å' if m.group(1) in 'āo' else ''

# return unicodedata.normalize('NFKD', Transcription.trans_hebrew_pat.sub(Transcription._map_hebrew, nword))
Expand All @@ -216,6 +222,8 @@ def to_etcbc_v(word):

def to_etcbc_c(word):
word = Transcription.remove_point_pat.sub(Transcription._remove_point, word)
word = Transcription.remove_psn_pat.sub('00', word) # remove nun hafukha, setumah, petuhah at the end of a verse
word = Transcription.remove_psq_pat.sub(' ', word) # replace paseq with attached spaces by single space
word = word.upper() # no final forms of consonants
return Transcription.shin_pat.sub('#', word)

Expand Down
4 changes: 3 additions & 1 deletion etcbc/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,8 @@ def verse(self, bn, ch, vs, fmt='ha', html=True, verse_label=True, format_label=
text = self.words(L.d('word', self._verses[bn][ch][vs]), fmt=fmt)
if html:
text = '<td class="{}">{}</td>'.format(fmt[0], h_esc(text))
else:
if not text.endswith('\n'): text += '\n'

total = '{}{}{}'.format(vlabel, text, flabel)
if html: total = '<table class="t"><tr>{}</tr></table>'.format(total)
Expand All @@ -576,7 +578,7 @@ def whole(self, fmt='ha', verse_labels=False, lang='en'):
wtext = make_rep(n)
reps.append(wtext)
elif verse_labels and F.otype.v(n) == 'verse': reps.append('{}{} {}:{} '.format(
'\n' if wtext and wtext[-1] != '\n' else '',
'\n' if reps and reps[-1] and reps[-1][-1] != '\n' else '',
self.book_name(L.u('book', n), lang=lang), F.chapter.v(n), F.verse.v(n),
))
return ''.join(reps)
Expand Down
2 changes: 1 addition & 1 deletion laf/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from .timestamp import Timestamp

NAME = 'LAF-Fabric'
VERSION = '4.5.16'
VERSION = '4.5.17'
APIREF = 'http://laf-fabric.readthedocs.org/en/latest/texts/API-reference.html'
FEATDOC = 'https://shebanq.ancient-data.org/static/docs/featuredoc/texts/welcome.html'
MAIN_CFG = 'laf-fabric.cfg'
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package_data = {
'emdros2laf': ['templates/*', 'xml/*'],
},
version='4.5.16',
version='4.5.17',
description='''Processor for Linguistic Annotation Framework ISO 24612:2012), applied to Biblical Hebrew''',
author='Dirk Roorda',
author_email='shebanq@ancient-data.org',
Expand Down

0 comments on commit 22c7003

Please sign in to comment.