Skip to content

Commit

Permalink
hxlm-js (hdp #18, lisp #18): HDPMiniman.bootstrapping()
Browse files Browse the repository at this point in the history
  • Loading branch information
fititnt committed Apr 3, 2021
1 parent 6d4f5a3 commit 2d9f678
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 5 deletions.
44 changes: 40 additions & 4 deletions hxlm-js/bootstrapper/hdp-minimam.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ console.log('bootstrapper/hdp-minimam.mjs')
// - https://google.github.io/styleguide/jsguide.html
// (Emerson Rocha, 2021-04-03 12:57 UTC)

// TODO: More stuff to do a quick look
// - https://tools.ietf.org/html/rfc7517
// - https://www.w3.org/TR/WebCryptoAPI/#dfn-JsonWebKey
// - https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-verify
// - https://www.w3.org/TR/WebCryptoAPI/#algorithm-overview

// class App {
// static log() {
// console.log('Hey');
Expand Down Expand Up @@ -39,29 +45,59 @@ class HDPMiniman {
FONTEM_VKG = null
// constructor(ONTOLOGIA_LKG, ONTOLOGIA_VKG) {
constructor(res) {
console.log(res)
if (res && res.LKG) {
self.FONTEM_LKG = res.LKG
}
if (res && res.VKG) {
self.FONTEM_VKG = res.VKG
}
// if (res && res.LKG) {
// self.HXLM_LKG = res.LKG
// } else if (HXLM_LKG) {
// self.FONTEM_LKG = HXLM_LKG
// }
// if (res && res.VKG) {
// self.HXLM_VKG = res.VKG
// } else if (HXLM_VKG) {
// self.FONTEM_VKG = HXLM_VKG
// }
}

/**
* Bootstrapping linguam
*
* Trivia
* - "bootstrapping":
* - linguistics: https://en.wikipedia.org/wiki/Bootstrapping_(linguistics)
* - "linguam"
* - https://en.wiktionary.org/wiki/lingua#Latin
*/
static bootstrapping() {
let resultatum = new Object({
LKG: "../hxlm/ontologia/json/core.lkg.json",
VKG: "../hxlm/ontologia/json/core.vkg.json"
})
// resultatum.FONTEM_LKG = self.FONTEM_LKG
// resultatum.FONTEM_VKG = self.FONTEM_VKG
// resultatum.push('FONTEM_ONTOLOGIA_VKG', self.FONTEM_ONTOLOGIA_VKG)
return resultatum
}
/**
* Trivia
* - "explanare":
* - explano: https://en.wiktionary.org/wiki/explano#Latin
* - explanare: https://en.wiktionary.org/wiki/explanare#Latin
*/
static explanare() {
explanare() {
let resultatum = new Object()
resultatum.FONTEM_LKG = self.FONTEM_LKG
resultatum.FONTEM_VKG = self.FONTEM_VKG
resultatum.FONTEM_LKG = self.FONTEM_LKG
resultatum.FONTEM_VKG = self.FONTEM_VKG
// resultatum.push('FONTEM_ONTOLOGIA_VKG', self.FONTEM_ONTOLOGIA_VKG)
return resultatum
}
}
// let hdp = HDPMiniman()
// let hdp = new HDPMiniman()

// hdp.explanare();

17 changes: 16 additions & 1 deletion hxlm-js/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,32 @@ <h1>EticaAI/HXL-Data-Science-file-formats/hxlm-js</h1>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" crossorigin="anonymous"></script>

<!--
<script>
const HXLM_LKG="../hxlm/ontologia/json/core.lkg.json"
const HXLM_VKG="../hxlm/ontologia/json/core.vkg.json"
</script>
-->

<script src="./bootstrapper/hdp-minimam.mjs"></script>
<script src="./bootstrapper/hdp-minimam.js"></script>
<script src="./bootstrapper/hdplisp.js"></script>

<script>
console.log(HDPMiniman.explanare())
// const HXLM_LKG="../hxlm/ontologia/json/core.lkg.json"
// const HXLM_VKG="../hxlm/ontologia/json/core.vkg.json"
// let hdp = new HDPMiniman({
// LKG: "../hxlm/ontologia/json/core.lkg.json",
// VKG: "../hxlm/ontologia/json/core.vkg.json"
// })

bootstrapping = HDPMiniman.bootstrapping()
hdp = new HDPMiniman(bootstrapping)

console.log(hdp)
console.log(hdp.explanare())
// console.log(HDPMiniman.explanare())
// console.log(HDPMiniman.explanare())
</script>

<!-- Option 2: Separate Popper and Bootstrap JS -->
Expand Down

0 comments on commit 2d9f678

Please sign in to comment.