Skip to content

🌏🚩πŸ’₯ Edutainment Android+iOS app for adult learners by exploiting the Semantic Web. (EN/FR/CA/ES/DE/JP/ZH/UK)

Notifications You must be signed in to change notification settings

AlexanderPoone/tempusespatium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

This repo is being revamped

Learn any topic (without losing inner peace)

/* PaxAcademica plc */
<style>
  <!-- fade in/out goes here -- animation: opacity 0% 100% 3s-->
</style>
<p><i class="fa-scroll fa-xl fa-fw"></i>&nbsp;&nbsp;Learn anything about <tt id="topic"></tt></p>
<p><i class="fa-globe fa-xl fa-fw"></i>&nbsp;&nbsp;Learn in <tt id="lingo"></tt></p>
<script>
  const lingos = ['catala', 'francais', 'espanol', 'ζ—₯本θͺž', 'δΈ­ζ–‡'];
  const topics = ['Phonology', 'Medieval History', 'Forestry', 'Robotics'];
  let cnt = 0;
  let fadeIn = function() {
    querySelector('#lingo').innerText = lingos[cnt % lingos.length];
    querySelector('#topic').innerText = topics[cnt % topics.length];
    cnt += 1;
  };
  fadeIn();
  setInterval(fadeIn, 3000);
</script>

Podfile

TODOs:

  1. WikiProject sets Vs. custom sets of articles (auto-complete just like Wikipedia)
[Refresh all articles]
Set name: [_2020-01-01 00:02:04______] <- cannot be empty !

// This is a `RecyclerView` of my `BeninView`

  [__Autocomplete-dropdown_______________________________________________________]
  [_R.id.sqrPreview | Kalman filter__(R.id.smallDesc)_______] (-) <- read-only text field
  [_R.id.sqrPreview | Hungarian algorithm__(R.id.smallDesc)_] (-)
// If time is allowed, disable shuffle, drag to move.

[R.string.ok] [R.string.cancel]
RecycledView {    // not a typo
  mSqrPreview = findViewById(R.id.sqrPreview);
  Glide.with(this).load().into(mSqrPreview);
}

Also Quizlet.

Saved to SQLite/FMDB ios/Tempus E Spatium/Tempus E Spatium/HighscoresDBManager.swift:

let TABLE_SETS = "sets"
let TABLE_SET_ARTICLES = "setArticles"
let TABLE_CONNECTING_WALL = "connectingWall"

Table sets: setname | historicHigh | playedTimes | lastPlayedDate | creationDate | modifyDate

Table setArticles: article | setName | lastRefreshedDate | creationDate

Table connectingWall:

INSERT INTO connectingWall ('clue1', 'clue2', 'clue3', 'clue4', 'clue5', 'clue6', 'clue7', 'clue8', 'clue9', 'clue10', 'clue11', 'clue12', 'clue13', 'clue14', 'clue15', 'clue16', 'conn1', 'conn2', 'conn3', 'conn4') VALUES ('clue1', 'clue2', 'clue3', 'clue4', 'clue5', 'clue6', 'clue7', 'clue8', 'clue9', 'clue10', 'clue11', 'clue12', 'clue13', 'clue14', 'clue15', 'clue16', 'conn1', 'conn2', 'conn3', 'conn4')
  1. Themes:
  • Relaxed Bears (bg: #C78311, #FEF0CB; txt: #FDD000, #F19EB4)
  • Fire & Ice (#FD7A2D, #B1F3FC; bg/txt opposite)
  • Zen (#282631 off-black, #FEF8DE off-white)
  • Spring (#FF44BB, #FFB847)
  • Summer (#46A266, #BADC66)
  • Autumn (#FF4300, #FFB800)
  • Winter (#0041DE, #00B9A2)
  1. Custom brackets...
  • Default: highlight all for you [Reset to default]
  • Highlight text you want to make brackets -> [Make bracket|Cancel]
  1. Switch to view binding
  2. Add IPA game in custom mode -- similar vowels, diphthongs, consonants (e.g., sibilants) [Japanese would be easier to make though]
  3. 'Series' on WikiData? (under research; GestureDetector.SimpleOnGestureListener maybe? I can use free versions of Symphony/Piano Concerto No. X)
public class Fragment {
  Block[] mViews = { findViewById(R.id.block1),
      findViewById(R.id.block2),
      findViewById(R.id.block3),
      findViewById(R.id.block4),
      findViewById(R.id.block5),
      findViewById(R.id.block6),
      findViewById(R.id.block7),
      findViewById(R.id.block8),
      findViewById(R.id.block9),
      findViewById(R.id.block10),
      findViewById(R.id.block11),
      findViewById(R.id.block12),
      findViewById(R.id.block13),
      findViewById(R.id.block14),
      findViewById(R.id.block15),
      findViewById(R.id.block16) }; // fixed sized, use array instead of list

  int[] mRandOrder = Collections.shuffle(Arrays.asList(Integer.Range(16))); // fixed sized, array 1 to 16

  List<String> mSelectedBlks = new ArrayList<>();
  // await
  String[] mClues = database.rawQuery("SELECT * FROM connectingWall ORDER BY RANDOM() LIMIT 1;"); // get random row from
                                                                                                  // DB
  List<String> mLstGrp1 = Arrays.copyOfRange(mClues, 0, 4);
  List<String> mLstGrp2 = Arrays.copyOfRange(mClues, 4, 8);
  List<String> mLstGrp3 = Arrays.copyOfRange(mClues, 8, 12);
  List<String> mLstGrp4 = Arrays.copyOfRange(mClues, 12, 16);
  AudioPlayer mAudioPlayer = new AudioPlayer();
  int mLives = 5, mGrpsDone = 0;
  RecyclerView mHeartRecyclerView = this.findViewById(R.id.hearts);
  Fragment mPlayer1View = this.findViewById(R.id.player1), mPlayer2View = this.findViewById(R.id.player2),
      mView = this.findViewById(R.id.view);

  // TODO: Animation -- z-rotate the wall 180 degrees
  void newWall() {
    mLives = 5;
    mGrpsDone = 0;
    for (int x = 0; x < 16; x++) {
      mViews[mRandOrder[x]].setText(mClues[x]);
    }
  }

  @onClick
  void onClickListener(Block block) {
    mSelectedBlks.append(block);
    if (mSelectedBlks.length() == 4) {
      // check if correct
      boolean correct = false;
      if (mLstGrp1.containsAll(mSelectedBlks) || mLstGrp2.containsAll(mSelectedBlks)
          || mLstGrp3.containsAll(mSelectedBlks) || mLstGrp4.containsAll(mSelectedBlks)) {
        correct = true;
      }
      if (correct) {
        // play shift animation
        for (Block selected : mSelectedBlks) {
          selected.clickable = false;
        }
        mGrpsDone += 1;
        if (mGrpsDone == 4) {
          mAudioPlayer.play(R.raw.shave_and_a_haircut_two_piece);

          // winning condition
          mPlayer1View.lock();
          mPlayer2View.lock();
        }
      } else {
        // incorrect
        mLives -= 1;
        mHeartRecyclerView.getElement(mLives).setDrawable(R.drawable.heart_empty); // starts from 0
        if (mLives == 0) {
          mView.clickable = false; // controller.mClickArea.isUserInteractionEnabled = false
        }
      }
    }
    // reset block colour
    for (Block bk : mBlks) {
      if (bk.clickable) {
        bk.setColor(R.color.honeydew);
      }
    }
  }
}

Bottom navy blue bar (Bold Dosis):

  • State1: [TextEdit_____] [->]
  • State2: [TickOrCross] Real Theme

Wall Solved Sound Effect: shavedAndAHaircutTwoPiece.mp3

  • Five heart_full.jpg (Vs. heart_empty.jpg) at the beginning (horizontal RecyclerView, dock at top-right corner)
  • Three colours: selected (red), unselected (maybe honeydew instead of soda blue?), and solved (maybe yellow?)
    • [all radial gradient]
    • #1A7D6E (teal, solved)
    • #032960 (navy, selected)
    • #ACD7FB (sky, unselected)
  • Style: Luminescent shading // Rounded corners // Dosis font
  • Translation animation + Set colour (tween animation?) and texts on the fly
  • Question bank schema? // DB Browser for SQLite download (Done.)
  1. Translations (add more locales!) + SQLite tables initial values + XPath should compile to both OSes
  • compile_sqlite.py
import pandas as pd

# TODO
  • compile_xpath.py
import pandas as pd
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys

# TODO

Ono:
// document.enumerateElements(withXPath: "//*[@id=\"mw-content-text\"]/div/table/tbody/tr/td[1]/a") { (element, _, _) in

  • Rebranding
  • UI Overhaul
  • Setting up for a more unified experience
  • Algorithm Overhaul (add topic modelling)

Unit Test: Are WikiProjects' XPaths Working?

Need a table for these XPaths. TODO.

lang | delimitedXpaths

for s in delimitedXpath.split('|'):
    err = driver.execute_script(s)    # How deep?

Tempus E Spatium (pronounced TEM-poo-se-SPA-ti-oom) is Latin for space and time. It is an edutainment app for adult learners by exploiting the Semantic Web.

README

README

README

README

README

README

README

README

README

README

Wow, GitHub supports SPARQL syntax highlighting...
#defaultView:Timeline
SELECT DISTINCT ?eventLabel ?date ?dateLabel ?coord ?img
WHERE
{
  { ?event wdt:P31* wd:Q178561. } UNION
  { ?event wdt:P31* wd:Q81672. }
  
  ?event wdt:P585* ?date .
  ?event wdt:P18+ ?img.
  OPTIONAL { ?event wdt:P625 ?coord }

FILTER(YEAR(?date) > 1900).

SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
   FILTER(EXISTS {
   ?event rdfs:label ?lang_label.
   FILTER(LANG(?lang_label) = "en")
 })
}
ORDER BY DESC(?dateLabel)
#defaultView:Graph
SELECT DISTINCT ?country ?countryLabel ?country_EN ?country_DE ?country_FR ?capital ?capitalLabel ?flagLabel ?armsLabel ?imgLabel
WHERE
{
  ?country wdt:P31 wd:Q3624078 .
  #not a former country
  FILTER NOT EXISTS {?country wdt:P31 wd:Q3024240}
  #and no an ancient civilisation (needed to exclude ancient Egypt)
  FILTER NOT EXISTS {?country wdt:P31 wd:Q28171280}
   ?country wdt:P36 ?capital.
     ?country wdt:P41 ?flag.
   ?country wdt:P94 ?arms.
   ?capital wdt:P18 ?img.

     SERVICE wikibase:label { bd:serviceParam wikibase:language "en".
     }
     SERVICE wikibase:label { bd:serviceParam wikibase:language "en".
            ?country rdfs:label ?country_EN.
     } hint:Prior hint:runLast false.
     SERVICE wikibase:label { bd:serviceParam wikibase:language "de".
            ?country rdfs:label ?country_DE.
     } hint:Prior hint:runLast false.
     SERVICE wikibase:label { bd:serviceParam wikibase:language "fr".
            ?country rdfs:label ?country_FR.
     } hint:Prior hint:runLast false.}
ORDER BY ?countryLabel 
#defaultView:Table
SELECT DISTINCT ?country ?countryLabel ?country_EN ?country_FR ?anthemLabel ?anthem_FR ?audioLabel
WHERE
{
  ?country wdt:P31 wd:Q3624078 .
  #not a former country
  FILTER NOT EXISTS {?country wdt:P31 wd:Q3024240}
  #and no an ancient civilisation (needed to exclude ancient Egypt)
  FILTER NOT EXISTS {?country wdt:P31 wd:Q28171280}
   ?country wdt:P85 ?anthem.
   ?anthem wdt:P51 ?audio.

     SERVICE wikibase:label { bd:serviceParam wikibase:language "en".
     }
     SERVICE wikibase:label { bd:serviceParam wikibase:language "en".
            ?country rdfs:label ?country_EN.
     } hint:Prior hint:runLast false.
     SERVICE wikibase:label { bd:serviceParam wikibase:language "fr".
            ?country rdfs:label ?country_FR.
     } hint:Prior hint:runLast false.
     SERVICE wikibase:label { bd:serviceParam wikibase:language "fr".
            ?anthem rdfs:label ?anthem_FR.
     } hint:Prior hint:runLast false.
}
ORDER BY ?countryLabel

About

🌏🚩πŸ’₯ Edutainment Android+iOS app for adult learners by exploiting the Semantic Web. (EN/FR/CA/ES/DE/JP/ZH/UK)

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages