Skip to content

Commit

Permalink
runs without 'Installing'
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSPoon committed Oct 2, 2021
1 parent b208e44 commit 3e26a95
Show file tree
Hide file tree
Showing 16,001 changed files with 4,517,197 additions and 6,613 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
url = https://github.com/friguzzi/trill-on-swish.git
fetch = +refs/heads/*:refs/remotes/trill-on-swish/*
[remote "teamspoon"]
url = https://github.com/TeamSPoon/swish.git
url = https://github.com/logicmoo/swish.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
Expand Down
18 changes: 0 additions & 18 deletions .gitignore

This file was deleted.

14 changes: 9 additions & 5 deletions client/swish-ask.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
server=${SWISH_SERVER-http://localhost:3050}
srctext=
curlarg=
format=${SWISH_FORMAT-prolog}
format=${SWISH_FORMAT-csv}
program=$(basename $0)
output=csv
application=swish

usage()
{
Expand Down Expand Up @@ -62,7 +62,7 @@ while [ $done = false ]; do
--format=*)
format=$(echo $1 | sed 's/.*=//')
case "$format" in
rdf|prolog)
rdf|prolog|json)
;;
*)
usage
Expand All @@ -71,6 +71,10 @@ while [ $done = false ]; do
esac
shift
;;
--application=*)
application=$(echo $1 | sed 's/.*=//')
shift
;;
https://*.pl|http://*.pl)
curlarg+=" -d src_url=$1"
shift
Expand All @@ -97,9 +101,9 @@ fi
curl -s \
-d ask="$query" \
-d template="$format($vars)" \
-d application="swish" \
-d application="$application" \
-d src_text="$srctext" \
-d format="$output" \
-d format="$format" \
-d chunk=10 \
-d solutions=all \
$curlarg \
Expand Down
12 changes: 11 additions & 1 deletion config-available/auth_google.pl
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,14 @@
'jykqJiZikgMteL3vq0IhjPDC').
oauth2:server_attribute(google, scope,
profile).

oauth2:server_attribute(google, authorization_endpoint, 'https://accounts.google.com/o/oauth2/v2/auth').
%oauth2:server_attribute(google, authorization_endpoint, '/oauth').

/*
oauth2:server_attribute(google, 'issuer', 'https://accounts.google.com').
oauth2:server_attribute(google, 'authorization_endpoint', 'https://accounts.google.com/o/oauth2/v2/auth').
oauth2:server_attribute(google, 'device_authorization_endpoint', 'https://oauth2.googleapis.com/device/code').
oauth2:server_attribute(google, 'userinfo_endpoint', 'https://openidconnect.googleapis.com/v1/userinfo').
oauth2:server_attribute(google, 'revocation_endpoint', 'https://oauth2.googleapis.com/revoke').
oauth2:server_attribute(google, 'jwks_uri', 'https://www.googleapis.com/oauth2/v3/certs').
*/
3 changes: 2 additions & 1 deletion config-available/auth_unity.pl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
:- http_handler(swish(logout), unity_logout, []).

swish_config:login_item(unity, 10-Item) :-
http_absolute_location(icons('unity.png'), Img, []),
%http_absolute_location(icons('unity.png'), Img, [relative_to('/swish')]),
Img = 'icons/unity.png',
Item = img([ src(Img),
class('login-with'),
'data-server'(unity),
Expand Down
2 changes: 1 addition & 1 deletion daemon.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env swipl
#!/usr/bin/env clif

:- module(swish_daemon, []).

Expand Down
6 changes: 3 additions & 3 deletions examples/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
",

"menu":[
{ "group": "cplint", "rank": 9000 },
{ "group": "cplint", "rank": 9000 },
{ "group": "trill", "rank": 9100 },
{ "group": "examples", "rank": 10000 },
{ "group": "examples", "rank": 10000 },
{ "group": "tutorials","rank": 20000 },
{ "group": "logicmoo", "rank": 30000 },
{ "group": "lps", "rank": 30001 },
Expand All @@ -30,7 +30,7 @@
"group":"tutorials"
},
{ "file":"rdf_examples.swinb", "title":"Using SWISH with ClioPatria and RDF queries/examples", "group":"tutorials" },
{ "file":"dict.swinb", "title":"Dict tutorial" , "group":"tutorials" },
{ "file":"dict.swinb", "title":"Dict tutorial" , "group":"tutorials" },

"## Trill",

Expand Down
26 changes: 26 additions & 0 deletions examples/inference/bag_1.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

:- use_module(library(pita)).

:- if(current_predicate(use_rendering/1)).
:- use_rendering(c3).
:- use_rendering(graphviz).
:- use_rendering(table,[header(['Multivalued variable index','Rule index','Grounding substitution'])]).
:- endif.

:- pita.

:- begin_lpad.

0.6::red(b1); 0.3::green(b1); 0.1::blue(b1) :- pick(b1).
map_query 0.6::pick(b1); 0.4::no_pick(b1).

ev:- \+ blue(b1).

:- end_lpad.

/** <examples>
?- map(ev,P,Exp).
P = 0.5399999999999999,
Exp = [rule(1, pick(b1), [pick(b1):0.6, no_pick(b1):0.4], true)].
*/
35 changes: 35 additions & 0 deletions examples/inference/bag_game_mpe.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

:- use_module(library(pita)).

:- if(current_predicate(use_rendering/1)).
:- use_rendering(c3).
:- use_rendering(graphviz).
:- use_rendering(table,[header(['Multivalued variable index','Rule index','Grounding substitution'])]).
:- endif.

:- pita.

:- begin_lpad.

win :- red, green.
win :- blue, yellow.

map_query 0.4::red.
map_query 0.9::green.
map_query 0.5::blue.
map_query 0.6::yellow.


:- end_lpad.

/** <examples>
?- map(win,P,Exp).
Exp = [
rule(0, '', [red:0.4, '' : 0.6], true),
rule(1, green, [green:0.9, '' : 0.09999999999999998], true),
rule(2, blue, [blue:0.5, '' : 0.5], true),
rule(3, yellow, [yellow:0.6, '' : 0.4], true)],
P = 0.162,
*/
34 changes: 34 additions & 0 deletions examples/inference/bag_game_vit.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

:- use_module(library(viterbi)).

:- if(current_predicate(use_rendering/1)).
:- use_rendering(c3).
:- use_rendering(graphviz).
:- use_rendering(table,[header(['Multivalued variable index','Rule index','Grounding substitution'])]).
:- endif.

:- viterbi.

:- begin_lpad.

win :- red, green.
win :- blue, yellow.

0.4::red.
0.9::green.
0.5::blue.
0.6::yellow.


:- end_lpad.

/** <examples>
?- viterbi(win,P,Exp).
P=0.36
Exp=[
rule(0, red, [red:0.4, '':0.6], []),
rule(1, green, [green:0.9, '':0.09999999999999998], [])]
*/
38 changes: 38 additions & 0 deletions examples/inference/bag_mpe.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

:- use_module(library(pita)).

:- if(current_predicate(use_rendering/1)).
:- use_rendering(c3).
:- use_rendering(graphviz).
:- use_rendering(table,[header(['Multivalued variable index','Rule index','Grounding substitution'])]).
:- endif.

:- pita.

:- begin_lpad.

map_query 0.6::red(b1); 0.3::green(b1); 0.1::blue(b1) :- pick(b1).
map_query 0.6::pick(b1); 0.4::no_pick(b1).

ev:- \+ blue(b1).

:- end_lpad.

/** <examples>
?-map(ev,P,Exp).
P=0.36,
Exp=[
rule(1, pick(b1), [pick(b1):0.6, no_pick(b1):0.4], true),
rule(0, red(b1), [red(b1):0.6, green(b1):0.3, blue(b1):0.1], pick(b1))
].
?-map_bdd_dot_string(ev,BDD,Var,VarA,P,Exp).
P=0.36,
Exp=[
rule(1, pick(b1), [pick(b1):0.6, no_pick(b1):0.4], true),
rule(0, red(b1), [red(b1):0.6, green(b1):0.3, blue(b1):0.1], pick(b1))
].
*/
Loading

0 comments on commit 3e26a95

Please sign in to comment.