Skip to content
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

Using idiom-like construct for collocation with holes (and maybe more) #755

Open
ampli opened this issue Apr 26, 2018 · 0 comments
Open

Comments

@ampli
Copy link
Member

ampli commented Apr 26, 2018

In issue #743 I said:

extending idiom definitions to allow <a>_<b>

and did not tell for what it may be good.
Here is the story.

From README.md:

"holes" in collocations (aka "set phrases" of "phrasemes"):

The link-grammar provides several mechanisms to support
circumpositions or even more complicated multi-word structures.
One mechanism is by ordinary links; see the V, XJ and RJ links.
The other mechanism is by means of post-processing rules.
(For example, the "filler-it" SF rules use post-processing.)
However, rules for many common forms have not yet been written.
The general problem is of supporting structures that have "holes"
in the middle, that require "lacing" to tie them together.

So I made this test:

-<CLAUSE>: {({@COd-} & (C- or <clause-conjoin>)) or ({@CO-} & (Wd- & {CC+})) or [Rn-]};
+<CLAUSE1>: {({@COd-} & (C- or <clause-conjoin>)) or ({@CO-} & (Wd- & {CC+})) or [Rn-]};
+<CLAUSE>: ((COL1C2- & COL1C3+) or {COL1C5-}) & <CLAUSE1>;

+%if_<CLAUSE>_then_<CLAUSE>: <CLAUSE>
+if.col1: (({Xd-} & Wd-) or (({Xd-} & MVs-) or {Xd-}) or QI-) & COL1C2+ & COL1C4+;
+then.col1: <CLAUSE> & COL1C3- &  COL1C4- & COL1C5+ & <CLAUSE>;

Since the current code doesn't support
if_<CLAUSE>_then_<CLAUSE>: <CLAUSE>
I just tried to mimic it manually.
And it seem to work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant