Skip to content

Commit

Permalink
minor change in feature -after-
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkroorda committed Mar 8, 2019
1 parent 03ed6bd commit 25bf0d6
Show file tree
Hide file tree
Showing 58 changed files with 2,803,715 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/transcription.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ type | examples | description
feature | values | in ATF | description
------- | ------ | ------ | -----------
**after** | `-` ` ` `:` `.` `/` `+` | `ha:a-am` `a-di ma-di` | what comes after a sign before the next sign
**aftere** | `` | | in those cases where two signs are adjacent
**afterr** | `` | | what comes after a sign before the next sign when represented with rich characters; in those cases where two signs are adjacent ␣ is inserted
**afteru** | ` ` `:` `.` `/` `+` | | what comes after a sign before the next sign when represented with unicode characters
**atf** | `qa2` `ARAD2` `5/6(disz)` `ba?!(GESZ)` | idem | full atf of a sign, also complex signs, with flags but without clustering characters
**atfpost** | `}_` | `{ki}_` | clustering characters attached at the end of a sign
Expand Down
23 changes: 13 additions & 10 deletions programs/tfFromATF.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
ORG = 'Nino-cunei'
REPO = 'oldbabylonian'
VERSION_SRC = '0.2'
VERSION_TF = '1.0'
VERSION_TF = '1.0.1'
REPO_DIR = f'{BASE}/{ORG}/{REPO}'

TRANS_DIR = f'{REPO_DIR}/sources/cdli/transcriptions'
Expand Down Expand Up @@ -245,8 +245,8 @@ def makeAscii(text):

otext = {
'fmt:text-orig-full': '{atfpre}{atf}{atfpost}{after}',
'fmt:text-orig-plain': '{sym}{after/aftere}',
'fmt:text-orig-rich': '{symr}{after}',
'fmt:text-orig-plain': '{sym}{afterr}',
'fmt:text-orig-rich': '{symr}{afterr}',
'fmt:text-orig-unicode': '{symu}{afteru}',
'sectionFeatures': 'pnumber,face,lnno',
'sectionTypes': 'document,face,line',
Expand All @@ -267,8 +267,11 @@ def makeAscii(text):
'after': {
'description': 'what comes after a sign or word (- or space)',
},
'aftere': {
'description': 'fill character between two adjacent signs',
'afterr': {
'description': (
'what comes after a sign or word (- or space); '
'between adjacent signs a ␣ is inserted'
),
},
'afteru': {
'description': 'what comes after a sign when represented as unicode (space)',
Expand Down Expand Up @@ -1178,7 +1181,7 @@ def doFlags():
break
return flags

def signData(clusterBefore, clusterAfter, after, aftere):
def signData(clusterBefore, clusterAfter, after, afterr):
nonlocal curSign
nonlocal part

Expand All @@ -1191,8 +1194,8 @@ def signData(clusterBefore, clusterAfter, after, aftere):

if after:
cv.feature(curSign, after=after)
if aftere:
cv.feature(curSign, aftere=aftere)
if afterr:
cv.feature(curSign, afterr=afterr)
if afteru:
cv.feature(curSign, afteru=afteru)

Expand Down Expand Up @@ -1535,9 +1538,9 @@ def getParts(word):
after = afterPart + (
' ' if p == lParts - 1 and w != lWords - 1 else ''
)
afterr = adjacent if p < lParts - 1 and afterPart == '' else after
afteru = afterPart.replace('-', '')
aftere = adjacent if p < lParts - 1 and afterPart == '' else None
(symPart, symPartR, symPartU) = signData(cAtfStart, cAtfEnd, after, aftere)
(symPart, symPartR, symPartU) = signData(cAtfStart, cAtfEnd, after, afterr)
sym += f'{symPart}{after or adjacent}'
symR += f'{symPartR}{after}'
symU += f'{symPartU}{afteru}'
Expand Down
Loading

0 comments on commit 25bf0d6

Please sign in to comment.