Skip to content

Commit

Permalink
#11: ontologia_regulam; HXLTMTestumAuxilium.ontologia_regulam() started
Browse files Browse the repository at this point in the history
  • Loading branch information
fititnt committed Nov 30, 2021
1 parent 37a0b29 commit 6d327b8
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 18 deletions.
24 changes: 24 additions & 0 deletions bin/hxltmcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5066,6 +5066,8 @@ class HXLTMOntologia:
# tolerātum, https://en.wiktionary.org/wiki/toleratus#Latin
_deprecatum_toleratum: bool = True

crudum: dict = None

def __init__(self, ontologia: Dict, vacuum: bool = False):
"""
_[eng-Latn] Constructs all the necessary attributes for the
Expand Down Expand Up @@ -6406,6 +6408,28 @@ def ontologia() -> Dict:
# return HXLTMUtil.load_hxltm_options()
return HXLTMOntologia(conf)

@staticmethod
def ontologia_regulam() -> bool:
"""HXLTM regulam
_[eng-Latn]
Self test to check if
[eng-Latn]_
Returns:
bool:
>>> HXLTMTestumAuxilium.ontologia_regulam()
True
"""
# conf = HXLTMUtil.load_hxltm_options()
ontologia = HXLTMTestumAuxilium.ontologia()
exemplum = \
ontologia.crudum['ontologia_regulam']['exemplum']['hxl_caput']
for item in exemplum:
print(item)
return True


class HXLTMTypum:
"""HXLTM Data typum
Expand Down
6 changes: 3 additions & 3 deletions docs/ontologia-regulam.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/****** _[eng-Latn] Edit this section [eng-Latn]_ ******/

const quod_exemplum = (ontologia, exemplum_adhoc) => {
let resultatum = ontologia.ontologia_regulam.__exemplum || []
let resultatum = ontologia.ontologia_regulam.exemplum.hxl_caput || []
if (exemplum_adhoc.length > 0) {
resultatum = resultatum.concat(exemplum_adhoc)
} else {
Expand Down Expand Up @@ -62,13 +62,13 @@
}

const main = (ontologia) => {
const est_regula = testum_regula_adhoc || ontologia.ontologia_regulam._basim.javascript
const est_regula = testum_regula_adhoc || ontologia.ontologia_regulam.structuram.basim.javascript
const est_exemplum = quod_exemplum(ontologia, testum_exemplum_adhoc)
if (debug) {
console.log(`main
est_regula [${est_regula}]
testum_regula_adhoc [${testum_regula_adhoc}]
ontologia_regulam [${ontologia.ontologia_regulam._basim.javascript}]
ontologia_regulam [${ontologia.ontologia_regulam.structuram.basim.javascript}]
`)
console.log('main est_exemplum', est_exemplum)
}
Expand Down
33 changes: 18 additions & 15 deletions ontologia/cor.hxltm.215.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3005,21 +3005,24 @@ ontologia_regulam:
# @see https://pkg.go.dev/regexp/syntax
# @see https://www.php.net/manual/en/reference.pcre.pattern.syntax.php

__exemplum:
- hxl: '#item+conceptum+codicem'
divisionem: item
classem: conceptum
speciem: +codicem
- hxl: '#meta+linguam+i_pt+i_por+ig_port1283+is_latn'
divisionem: meta
classem: linguam
speciem: +i_pt+i_por+ig_port1283+is_latn

_basim:
javascript: >-
\#(?<divisionem>(item|meta)).+?(?<classem>(conceptum|linguam|terminum))(?<speciem>.*)
python: >-
\#(?P<divisionem>(item|meta)).+?(?P<classem>(conceptum|linguam|terminum))(?P<speciem>.*)
exemplum:
hxl_caput:
- hxl: '#item+conceptum+codicem'
divisionem: item
classem: conceptum
speciem: +codicem
- hxl: '#meta+linguam+i_pt+i_por+ig_port1283+is_latn'
divisionem: meta
classem: linguam
speciem: +i_pt+i_por+ig_port1283+is_latn

# Trivia: strūctūram, https://en.wiktionary.org/wiki/structura#Latin
structuram:
basim:
javascript: >-
\#(?<divisionem>(item|meta)).+?(?<classem>(conceptum|linguam|terminum))(?<speciem>.*)
python: >-
\#(?P<divisionem>(item|meta)).+?(?P<classem>(conceptum|linguam|terminum))(?P<speciem>.*)
# named group:
# (?P<hxltag>\#[a-zA-Z_]*)(?P<hxlattrs>\+\w*){0,20}
Expand Down

0 comments on commit 6d327b8

Please sign in to comment.