read-dict.c dict_order_wild() seems broken

0 views
Skip to first unread message

Paul McQuesten

unread,
Apr 10, 2011, 5:03:49 PM4/10/11
to link-grammar
This post is to expose an email exchange to the wider audience.

On Sun, Apr 10, 2011 at 1:19 PM, Linas Vepstas
<linasv...@gmail.com> wrote:

> On 6 April 2011 19:08, Paul McQuesten <mcqu...@gmail.com> wrote:
> > I am perplexed by the dict_order_wild function.
> >
> > First, the documentation seems inadequate: it refers to wildcards, assuming
> > we all would have a common understanding of their semantics. In fact, the
> > function quits (with a reply of 'match') when the first non-identical
> > asterisk is encountered. Thus, 'Sp*s' matches 'Spxy'. That surprises me but
> > if it is really the desired behavior, I will generate some explicit
> > comments.

> That is the desired behavior. It is documented in the website documentation
> http://www.abisource.com/projects/link-grammar/dict/introduction.html#3
> connector subscripts

3.1. CONNECTOR SUBSCRIPTS gives this example:
An "S*a+" can connect with an "S-", an "Ss-", an "Sp-", or an
"Ssa-", but not with an "Ssb-".
When searching for "S*a" dict_order_wild will report a match with
"Ssb" because it stops when the first wildcard is encountered.

Linas Vepstas

unread,
Apr 10, 2011, 5:57:21 PM4/10/11
to link-g...@googlegroups.com, Paul McQuesten

Turns out the dict_order_wild function is not sued for sorting connectors,
but for dictionary entries. Wild cards are not used in the English dictionary,
but I think they might be used in the persian/arabic dicts, for matching
word stems.

--linas

Reply all
Reply to author
Forward
0 new messages