Skip to content

Commit

Permalink
#11: ontologia_regulam; javascript tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fititnt committed Nov 30, 2021
1 parent 04a147d commit 77e669d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
19 changes: 18 additions & 1 deletion docs/ontologia-regulam.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script>

/****** _[eng-Latn] Edit this section [eng-Latn]_ ******/
const debug = true
const debug = false
const hxltm_ontologia_archivum = "./ontologia/cor.hxltm.215.json"
const testum_regula_adhoc = ''
const testum_exemplum_adhoc = [
Expand Down Expand Up @@ -75,6 +75,23 @@

actionem_testum(est_exemplum, est_regula)

// var regula2 = '(?<linguam>(i.?_).*(?!<etc>(\\+.?))).?'
// var regula2 = '(?<linguam>(i.?_).*(?<etc>(\\+.?))).?'
// var regula2 = '(?<linguam>(\\+i.?_).*(?<etc>(.?))).?'
// var regula2 = '(?<linguam>(\\+i.?_).*(?<etc>[^\\+i](.?))).?'
var regula2 = '(?<linguam>(\\+i.?_).*(?<etc>[^\\+i.?](.?))).?'
var subspeciem = [
'+i_pt+i_por+ig_port1283+is_latn+rem',
'+ix_de_linguam',
'+ix_est_linguam',
'+ix_est_linguam_fontem',
]
var regula_regex2 = new RegExp(regula2, "i")

subspeciem.forEach(element => {
console.log(regula_regex2.exec(element))
});

}

fetch(hxltm_ontologia_archivum)
Expand Down
6 changes: 6 additions & 0 deletions ontologia/cor.hxltm.215.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3018,11 +3018,17 @@ ontologia_regulam:

# Trivia: strūctūram, https://en.wiktionary.org/wiki/structura#Latin
structuram:
# basim -> divisionem, classem, speciem
basim:
javascript: >-
\#(?<divisionem>(item|meta)).+?(?<classem>(conceptum|linguam|terminum))(?<speciem>.*)
python: >-
\#(?P<divisionem>(item|meta)).+?(?P<classem>(conceptum|linguam|terminum))(?P<speciem>.*)
subspeciem:
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 77e669d

Please sign in to comment.