Skip to content

Commit

Permalink
Clarified asymmetry check
Browse files Browse the repository at this point in the history
  • Loading branch information
ekaf committed Jan 21, 2021
1 parent c9854c4 commit 028c610
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ query:
swipl -c wn_query.pl

valid:
@echo Checking symmetry and antisymmetry ...
@echo Checking symmetry and asymmetry ...
swipl -c wn_valid.pl

csv:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ _wn_valid.pl_ is a SWI-prolog program testing for some potential issues in WordN

- check_keys: ambiguous sense keys, pointing to more than one synset
- symcheck: missing symmetry in the symmetric relations
- antisymcheck: direct loops in the antisymmetric relations
- asymcheck: direct loops in the asymmetric relations
- hypself: self-hyponymous word forms
- check_duplicates: find duplicate clauses

Expand Down
14 changes: 7 additions & 7 deletions output/wn_valid.pl-Output-3.0BF
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@ OK
Checking symmetry in vgp relation (wn_vgp.pl):
OK

Antisymmetric relations: [hyp,ins,mm,mp,ms,cls]
Checking antisymmetry in hyp relation (wn_hyp.pl):
Asymmetric relations: [hyp,ins,mm,mp,ms,cls]
Checking asymmetry in hyp relation (wn_hyp.pl):
OK
Checking antisymmetry in ins relation (wn_ins.pl):
Checking asymmetry in ins relation (wn_ins.pl):
OK
Checking antisymmetry in mm relation (wn_mm.pl):
Checking asymmetry in mm relation (wn_mm.pl):
OK
Checking antisymmetry in mp relation (wn_mp.pl):
Checking asymmetry in mp relation (wn_mp.pl):
OK
Checking antisymmetry in ms relation (wn_ms.pl):
Checking asymmetry in ms relation (wn_ms.pl):
OK
Checking antisymmetry in cls relation (wn_cls.pl):
Checking asymmetry in cls relation (wn_cls.pl):
Looping cls-t:
from 103082979-0 (a machine for performing calculations automatically)
to 106128570-0 (the branch of engineering science that studies (with the aid of computers) computable processes and structures)
Expand Down
26 changes: 13 additions & 13 deletions wn_valid.pl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- check_keys: ambiguous sense keys, pointing to more than one synset
- symcheck: missing symmetry in the symmetric relations
- antisymcheck: direct loops in the antisymmetric relations
- asymcheck: direct loops in the asymmetric relations
- hypself: self-hyponymous word forms
- check_duplicates: find duplicate clauses
*/
Expand Down Expand Up @@ -74,36 +74,36 @@
nl.

/* ------------------------------------------
Antisymmetry test:
Asymmetry test:
------------------------------------------ */

antisymrels(['hyp','ins','mm','mp','ms','cls']).
asymrels(['hyp','ins','mm','mp','ms','cls']).

antisymrel(cls):-
asymrel(cls):-
cls(A,AN,B,BN,T),
cls(B,BN,A,AN,T),
glosspair(A,B,G1,G2),
writef('Looping cls-%w:\n from %w-%w (%w)\n to %w-%w (%w)\n',[T,A,AN,G1,B,BN,G2]),
false.
antisymrel(R):-
asymrel(R):-
R\=cls,
apply(R,[A,B]),
apply(R,[B,A]),
glosspair(A,B,G1,G2),
writef('Looping %w:\n from %w (%w)\n to %w (%w)\n',[R,A,G1,B,G2]),
false.
antisymrel(_):-
asymrel(_):-
ok.

antisymcheck:-
antisymrels(L),
writef('Antisymmetric relations: %w\n',[L]),
asymcheck:-
asymrels(L),
writef('Asymmetric relations: %w\n',[L]),
member(R,L),
swritef(F,'wn_%w.pl',[R]),
writef('Checking antisymmetry in %w relation (%w):\n',[R,F]),
antisymrel(R),
writef('Checking asymmetry in %w relation (%w):\n',[R,F]),
asymrel(R),
false.
antisymcheck:-
asymcheck:-
nl.

/* ------------------------------------------
Expand Down Expand Up @@ -170,7 +170,7 @@
consult('wn_load.pl'),
check_keys,
symcheck,
antisymcheck,
asymcheck,
check_duplicates,
% hypself,
told.
Expand Down

0 comments on commit 028c610

Please sign in to comment.