Skip to content

Commit

Permalink
good word order
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkroorda committed May 10, 2023
1 parent 71cebf8 commit 4bc2ced
Show file tree
Hide file tree
Showing 103 changed files with 6,963,440 additions and 277 deletions.
2 changes: 1 addition & 1 deletion app/__checkout__.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
v0.1.1
g304f615e89851586ff5052279f4d16d3f33261fa
g71cebf8de3d0965d8bf54f37fdd2a9338c701833
4 changes: 3 additions & 1 deletion app/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ provenanceSpec:
corpus: '{org} - {repo}{relative}'
doi: 10.5281/zenodo.notyet
moduleSpecs: []
version: 0.1.1
version: 0.3.0
webBase: https://public.{org}.org/{repo}
webHint: Show this on the website
webLang: en
Expand All @@ -28,4 +28,6 @@ provenanceSpec:
typeDisplay:
sentence:
condense: true
w:
featuresBare: word_num
writing: grc
2 changes: 2 additions & 0 deletions app/config_custom.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
typeDisplay:
w:
featuresBare: word_num
sentence:
condense: true
writing: 'grc'
Expand Down
26 changes: 12 additions & 14 deletions programs/lowfat.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from tf.core.helpers import console
from tf.core.files import initTree, unexpanduser as ux

from tf.convert.helpers import ZWSP, NEST
from tf.convert.helpers import NEST


def convertTaskCustom(self):
Expand Down Expand Up @@ -213,15 +213,15 @@ def beforeChildren(cv, cur, node, tag):
atts = {etree.QName(k).localname: v for (k, v) in node.attrib.items()}

if tag == "w":
atts["text"] = atts["unicode"]
del atts["unicode"]
# atts["text"] = atts["unicode"]
atts["text"] = node.text

ref = atts["ref"]
(b, ch, v, w) = SPLIT_REF.split(ref)
atts["book"] = b
atts["chapter"] = ch
atts["verse"] = v
atts["word_num"] = w
(bRef, chRef, vRef, wRef) = SPLIT_REF.split(ref)
atts["book"] = bRef
atts["chapter"] = chRef
atts["verse"] = vRef
atts["word_num"] = wRef
thisChapterNum = atts["chapter"]
thisVerseNum = atts["verse"]
if thisChapterNum != cv.get("chapter", cur["chapter"]):
Expand All @@ -246,7 +246,8 @@ def beforeChildren(cv, cur, node, tag):
cur["verse"] = curVerse
cv.feature(curVerse, verse=thisVerseNum)

s = cv.slot()
key = f"B{cur['bookNum']:>03}-C{chRef:>03}-V{vRef:>03}-W{wRef:>04}"
s = cv.slot(key=key)
cv.feature(s, **atts)

else:
Expand Down Expand Up @@ -291,10 +292,6 @@ def afterChildren(cv, cur, node, tag):
if tag != "w":
curNode = cur["elems"].pop()

if not cv.linked(curNode):
s = cv.slot()
cv.feature(s, ch=ZWSP, empty=1)

cv.terminate(curNode)

def afterTag(cv, cur, node, tag):
Expand Down Expand Up @@ -336,6 +333,8 @@ def director(cv):
cur = {}

i = 0
cur["bookNum"] = 0

for (xmlFolder, xmlFiles) in self.getXML():
for xmlFile in xmlFiles:
i += 1
Expand All @@ -350,7 +349,6 @@ def director(cv):
cur["elems"] = []
cur["chapter"] = None
cur["verse"] = None
cur["bookNum"] = 0
cur["sentNum"] = 0
walkNode(cv, cur, root)

Expand Down
591 changes: 331 additions & 260 deletions programs/tfFromLowfat.ipynb

Large diffs are not rendered by default.

347 changes: 347 additions & 0 deletions report/2000-01-01/elements.txt

Large diffs are not rendered by default.

Empty file added report/2000-01-01/errors.txt
Empty file.
6 changes: 6 additions & 0 deletions report/2000-01-01/namespaces.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
OK 1 namespace for book : 1x None
OK 1 namespace for milestone : 12x None
OK 1 namespace for p : 3x None
OK 1 namespace for sentence : 3x None
OK 1 namespace for w : 172x None
OK 1 namespace for wg : 118x None
Loading

0 comments on commit 4bc2ced

Please sign in to comment.