diff --git a/.github/workflows/release_artifacts.yml b/.github/workflows/release_artifacts.yml new file mode 100644 index 0000000..ab68690 --- /dev/null +++ b/.github/workflows/release_artifacts.yml @@ -0,0 +1,21 @@ +name: Build and Release Datasets +on: + release: + types: [created] + +jobs: + generate: + name: Build Dataset Archives + runs-on: ubuntu-latest + steps: + - name: 👀 Checkout + users: actions/checkout@v2 + - name: 🏗️ Generate Artifacts + run: | + bash zip_artifacts.sh + - name: 📤 Upload Artifacts + uses: skx/github-action-publish-binaries@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + args: 'build/*.zip' diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..567609b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/srlearn/README.md b/srlearn/README.md new file mode 100644 index 0000000..e69de29 diff --git a/srlearn/toy_cancer/README.md b/srlearn/toy_cancer/README.md new file mode 100644 index 0000000..fc4958c --- /dev/null +++ b/srlearn/toy_cancer/README.md @@ -0,0 +1 @@ +# Toy Cancer Dataset diff --git a/srlearn/toy_cancer/toy_cancer/background.txt b/srlearn/toy_cancer/toy_cancer/background.txt new file mode 100644 index 0000000..b14f742 --- /dev/null +++ b/srlearn/toy_cancer/toy_cancer/background.txt @@ -0,0 +1,4 @@ +friends(+person,-person). +friends(-person,+person). +smokes(+person). +cancer(+person). diff --git a/srlearn/toy_cancer/toy_cancer/test/test_facts.txt b/srlearn/toy_cancer/toy_cancer/test/test_facts.txt new file mode 100644 index 0000000..31af427 --- /dev/null +++ b/srlearn/toy_cancer/toy_cancer/test/test_facts.txt @@ -0,0 +1,13 @@ +friends(zod,xena). +friends(xena,watson). +friends(watson,voldemort). +friends(voldemort,yoda). +friends(yoda,zod). +friends(xena,zod). +friends(watson,xena). +friends(voldemort,watson). +friends(yoda,voldemort). +friends(zod,yoda). +smokes(zod). +smokes(xena). +smokes(yoda). diff --git a/srlearn/toy_cancer/toy_cancer/test/test_neg.txt b/srlearn/toy_cancer/toy_cancer/test/test_neg.txt new file mode 100644 index 0000000..30bfc2e --- /dev/null +++ b/srlearn/toy_cancer/toy_cancer/test/test_neg.txt @@ -0,0 +1,2 @@ +cancer(voldemort). +cancer(watson). diff --git a/srlearn/toy_cancer/toy_cancer/test/test_pos.txt b/srlearn/toy_cancer/toy_cancer/test/test_pos.txt new file mode 100644 index 0000000..f3a4eb4 --- /dev/null +++ b/srlearn/toy_cancer/toy_cancer/test/test_pos.txt @@ -0,0 +1,3 @@ +cancer(zod). +cancer(xena). +cancer(yoda). diff --git a/srlearn/toy_cancer/toy_cancer/train/train_facts.txt b/srlearn/toy_cancer/toy_cancer/train/train_facts.txt new file mode 100644 index 0000000..2e842d9 --- /dev/null +++ b/srlearn/toy_cancer/toy_cancer/train/train_facts.txt @@ -0,0 +1,15 @@ +friends(alice,bob). +friends(alice,fred). +friends(chuck,bob). +friends(chuck,fred). +friends(dan,bob). +friends(earl,bob). +friends(bob,alice). +friends(fred,alice). +friends(bob,chuck). +friends(fred,chuck). +friends(bob,dan). +friends(bob,earl). +smokes(alice). +smokes(chuck). +smokes(bob). diff --git a/srlearn/toy_cancer/toy_cancer/train/train_neg.txt b/srlearn/toy_cancer/toy_cancer/train/train_neg.txt new file mode 100644 index 0000000..78ce89a --- /dev/null +++ b/srlearn/toy_cancer/toy_cancer/train/train_neg.txt @@ -0,0 +1,2 @@ +cancer(dan). +cancer(earl). diff --git a/srlearn/toy_cancer/toy_cancer/train/train_pos.txt b/srlearn/toy_cancer/toy_cancer/train/train_pos.txt new file mode 100644 index 0000000..d20e420 --- /dev/null +++ b/srlearn/toy_cancer/toy_cancer/train/train_pos.txt @@ -0,0 +1,4 @@ +cancer(alice). +cancer(bob). +cancer(chuck). +cancer(fred). diff --git a/srlearn/toy_father/README.md b/srlearn/toy_father/README.md new file mode 100644 index 0000000..10510be --- /dev/null +++ b/srlearn/toy_father/README.md @@ -0,0 +1 @@ +# Toy Father Dataset diff --git a/srlearn/toy_father/toy_father/background.txt b/srlearn/toy_father/toy_father/background.txt new file mode 100644 index 0000000..7963a65 --- /dev/null +++ b/srlearn/toy_father/toy_father/background.txt @@ -0,0 +1,4 @@ +male(+name). +childof(+name,+name). +siblingof(+name,-name). +father(+name,+name). diff --git a/srlearn/toy_father/toy_father/test/test_facts.txt b/srlearn/toy_father/toy_father/test/test_facts.txt new file mode 100644 index 0000000..14c614d --- /dev/null +++ b/srlearn/toy_father/toy_father/test/test_facts.txt @@ -0,0 +1,11 @@ +male(mrbennet). +male(mrlucas). +male(darcy). +childof(mrbennet,elizabeth). +childof(mrsbennet,elizabeth). +childof(mrbennet,jane). +childof(mrsbennet,jane). +childof(mrlucas,charlotte). +childof(mrslucas,charlotte). +siblingof(jane,elizabeth). +siblingof(elizabeth,jane). diff --git a/srlearn/toy_father/toy_father/test/test_neg.txt b/srlearn/toy_father/toy_father/test/test_neg.txt new file mode 100644 index 0000000..d48d49b --- /dev/null +++ b/srlearn/toy_father/toy_father/test/test_neg.txt @@ -0,0 +1,4 @@ +father(charlotte,mrsbennet). +father(jane,mrlucas). +father(mrsbennet,mrbennet). +father(jane,elizabeth). diff --git a/srlearn/toy_father/toy_father/test/test_pos.txt b/srlearn/toy_father/toy_father/test/test_pos.txt new file mode 100644 index 0000000..4877a91 --- /dev/null +++ b/srlearn/toy_father/toy_father/test/test_pos.txt @@ -0,0 +1,3 @@ +father(elizabeth,mrbennet). +father(jane,mrbennet). +father(charlotte,mrlucas). diff --git a/srlearn/toy_father/toy_father/train/train_facts.txt b/srlearn/toy_father/toy_father/train/train_facts.txt new file mode 100644 index 0000000..35eca20 --- /dev/null +++ b/srlearn/toy_father/toy_father/train/train_facts.txt @@ -0,0 +1,41 @@ +male(mrgranger). +male(jamespotter). +male(harrypotter). +male(luciusmalfoy). +male(dracomalfoy). +male(arthurweasley). +male(ronweasley). +male(fredweasley). +male(georgeweasley). +male(hagrid). +male(dumbledore). +male(xenophiliuslovegood). +male(cygnusblack). +siblingof(ronweasley,fredweasley). +siblingof(ronweasley,georgeweasley). +siblingof(ronweasley,ginnyweasley). +siblingof(fredweasley,ronweasley). +siblingof(fredweasley,georgeweasley). +siblingof(fredweasley,ginnyweasley). +siblingof(georgeweasley,ronweasley). +siblingof(georgeweasley,fredweasley). +siblingof(georgeweasley,ginnyweasley). +siblingof(ginnyweasley,ronweasley). +siblingof(ginnyweasley,fredweasley). +siblingof(ginnyweasley,georgeweasley). +childof(mrgranger,hermione). +childof(mrsgranger,hermione). +childof(jamespotter,harrypotter). +childof(lilypotter,harrypotter). +childof(luciusmalfoy,dracomalfoy). +childof(narcissamalfoy,dracomalfoy). +childof(arthurweasley,ronweasley). +childof(mollyweasley,ronweasley). +childof(arthurweasley,fredweasley). +childof(mollyweasley,fredweasley). +childof(arthurweasley,georgeweasley). +childof(mollyweasley,georgeweasley). +childof(arthurweasley,ginnyweasley). +childof(mollyweasley,ginnyweasley). +childof(xenophiliuslovegood,lunalovegood). +childof(cygnusblack,narcissamalfoy). diff --git a/srlearn/toy_father/toy_father/train/train_neg.txt b/srlearn/toy_father/toy_father/train/train_neg.txt new file mode 100644 index 0000000..758608d --- /dev/null +++ b/srlearn/toy_father/toy_father/train/train_neg.txt @@ -0,0 +1,21 @@ +father(harrypotter,mrgranger). +father(harrypotter,mrsgranger). +father(georgeweasley,xenophiliuslovegood). +father(luciusmalfoy,xenophiliuslovegood). +father(harrypotter,hagrid). +father(ginnyweasley,dracomalfoy). +father(hagrid,dracomalfoy). +father(hagrid,dumbledore). +father(lunalovegood,dumbledore). +father(hedwig,narcissamalfoy). +father(hedwig,lunalovegood). +father(ronweasley,hedwig). +father(mollyweasley,cygnusblack). +father(arthurweasley,mollyweasley). +father(georgeweasley,fredweasley). +father(fredweasley,georgeweasley). +father(ronweasley,georgeweasley). +father(ronweasley,hermione). +father(dracomalfoy,narcissamalfoy). +father(hermione,mrsgranger). +father(ginnyweasley,mollyweasley). diff --git a/srlearn/toy_father/toy_father/train/train_pos.txt b/srlearn/toy_father/toy_father/train/train_pos.txt new file mode 100644 index 0000000..37340e3 --- /dev/null +++ b/srlearn/toy_father/toy_father/train/train_pos.txt @@ -0,0 +1,5 @@ +father(harrypotter,jamespotter). +father(dracomalfoy,luciusmalfoy). +father(ginnyweasley,arthurweasley). +father(ronweasley,arthurweasley). +father(fredweasley,arthurweasley). diff --git a/zip_artifacts.sh b/zip_artifacts.sh new file mode 100644 index 0000000..8dcfb8d --- /dev/null +++ b/zip_artifacts.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +# Copyright © Alexander L. Hayes +# MIT License + +# SYNOPSIS: Create zip artifacts of datasets for distribution. + +# OVERVIEW: This assumes that data sets follow the pattern: +# `srlearn/name/name/` +# +# All zipped copies will be placed in the `build/` directory at the +# base of the repository. + +echo "Creating build directory" +rm -rf build +mkdir build + +( + cd srlearn/ + + for ds in *; do + + if [[ $ds != "README.md" ]]; then + + ( + echo "Zipping $ds" + cd $ds + zip -r ../../build/$ds.zip $ds + ) + + fi + done +)