[ word? ] filter [ word>xref ] map ;
: group-xrefs ( xrefs -- xrefs' )
- natural-sort [ second ] collect-by
+ sort [ second ] collect-by
! Change key from 'name' to { name path }
[ [ [ third ] map-find drop 2array ] keep ] assoc-map
- >alist natural-sort ;
+ >alist sort ;
: filter-prefix ( seq prefix -- seq )
[ drop-prefix nip empty? ] curry filter members ;
: get-vocabs/prefix ( prefix -- seq ) all-disk-vocab-names swap filter-prefix ;
: get-vocabs-words/prefix ( prefix names/f -- seq )
- [ vocabs-words ] [ current-words ] if* natural-sort swap filter-prefix ;
+ [ vocabs-words ] [ current-words ] if* sort swap filter-prefix ;