<commit_before>%   File   : ASSOC.PL
%   Author : R.A.O'Keefe
%   Updated: 9 November 1983
%   Purpose: Binary tree implementation of "association lists".

%   Note   : the keys should be ground, the associated values need not be.

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Adapted for SWI-Prolog by <NAME>, January 2004.

To the best of my knowledge, this file   is in the public domain and can
therefore safely be distributed with SWI-Prolog and used in applications
without restrictions.

Various versions of this file exists. This   one  is copied from the YAP
library. The SICStus library contains  one   using  AVL  trees to ensure
proper balancing. Although based  on  this   library  they  changed  the
argument order of some of the predicates.

<NAME> has told me he  is  working   on  a  new version of this
library. This new version, as it becomes available, is likely to replace
this one.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */


/*
Balancing code merged from L.Damas, V.S.Costa, AVL trees in YAP.
Tree is either:

*) empty (t/0)  or
*) t(Key,Value,Balance,Left,Right)
   Left,Right: trees
   Balance: <, -, or > denoting |L|-|R| = 1, 0, or -1, respectively

TODO: get_next_assoc/4, get_prev_assoc/4 for SICStus compatibility

TODO: exploit order in ord_list_to_assoc/2

*/

/*
   Added del_assoc/4, del_min_assoc/4 and del_max_assoc/4

   Ported by <NAME> from a language called Pure.
   <NAME> ported the Pure AVL library from this SWI-Prolog library,
   but the deletion code was added by Jiri. Full circle.
   Also added is_assoc/1, which makes testing much easier.     */<commit_msg>todo item resolved thanks to contribution by <NAME>. Great!<commit_after>%   File   : ASSOC.PL
%   Author : R.A.O'Keefe
%   Updated: 9 November 1983
%   Purpose: Binary tree implementation of "association lists".

%   Note   : the keys should be ground, the associated values need not be.

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Adapted for SWI-Prolog by <NAME>, January 2004.

To the best of my knowledge, this file   is in the public domain and can
therefore safely be distributed with SWI-Prolog and used in applications
without restrictions.

Various versions of this file exists. This   one  is copied from the YAP
library. The SICStus library contains  one   using  AVL  trees to ensure
proper balancing. Although based  on  this   library  they  changed  the
argument order of some of the predicates.

<NAME> has told me he  is  working   on  a  new version of this
library. This new version, as it becomes available, is likely to replace
this one.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */


/*
Balancing code merged from L.Damas, V.S.Costa, AVL trees in YAP.
Tree is either:

*) empty (t/0)  or
*) t(Key,Value,Balance,Left,Right)
   Left,Right: trees
   Balance: <, -, or > denoting |L|-|R| = 1, 0, or -1, respectively

TODO: get_next_assoc/4, get_prev_assoc/4 for SICStus compatibility

*/

/*
   Added del_assoc/4, del_min_assoc/4 and del_max_assoc/4

   Ported by <NAME> from a language called Pure.
   <NAME> ported the Pure AVL library from this SWI-Prolog library,
   but the deletion code was added by Jiri. Full circle.
   Also added is_assoc/1, which makes testing much easier.     */
{'fraction_non_alphanumeric': 0.11170848267622462, 'fraction_numerical': 0.011648745519713262, 'mean_word_length': 2.386248736097068, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4285813', 'n_tokens_mistral': 1158, 'n_tokens_neox': 1114, 'n_words': 423}