-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More !!word/ additions #1085
More !!word/ additions #1085
Conversation
... so the printed order matches their expression order.
The immediate use of that is for expression debugging. However, it can be used for some other uses.
An improvement may be needed in the output format and/or flags.
With this PR, you can copy&paste a disjunct search:
However, you cannot copy&paste this (marked by <--------):
The separator Possible solutions:
When using
The intention was to search an exact disjunct, but "junk" was added at the LHS. A solution for that, that also solves the problem of using regex engines that don't support |
Thanks. Another possibility is to just remove the Note this is a generic issue. Word-order is somewhat free in Russian, although the current Russian dicts do not use that markup at all. If I understand correctly, word order is also free in Turkish and Finnish. The |
In principle the displayed form can be different than the internal form (only logically, for efficiency). Regarding the form of the separator, It can be replaced to just My proposal:
|
A flag can be added to mean "search the given connectors in any order". |
Note that there was actually no conversion to "jet" optimization (which is really "tracon" optimization).
Why? It looks this optimization only depends on the no-crossing rule. In any case, the code infrastructure includes the possibility to selectively disable it. |
OK, sure, that works.
That's nice, even for English, because connector order can be confusing.
OK. I was just pointing out a topic that I had forgotten about, and I suspect you had as well. Also -- I do not recall the details, but I think that the arbitrary-direction connectors are implemented is to have two exps, one for each direction. So that is a potential source of inefficiency. I do not recall how commuting connectors are handled. |
According to the discussion at PR opencog#1085.
Add features and make fixes per issue the discussion at PR #1083.
Main changes:
Use expression connector order.
To be used with the
m
flag (connector macros).In principle macros can be found more than once in a word, and connectors names may be found more than once in a macro. In that case the output of
!!word//m
may be be confusing.If desired I can add something like
!!word//mc
to show expression with the disjunct connectors marked in it.If you have any more ideas for debugging disjuncts/connectors/expressions please tell me now, as I have the low-level details in my head so I can make fast implementations.
EDIT: Forced push for display formatting cleanup.