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

ContextFn support for mixed-depth nodes? #188

Open
krivard opened this issue Oct 11, 2018 · 0 comments
Open

ContextFn support for mixed-depth nodes? #188

krivard opened this issue Oct 11, 2018 · 0 comments

Comments

@krivard
Copy link

krivard commented Oct 11, 2018

Hi, I'm hoping to use ContextFn similarly to the anaphora rule for 'he' in the documentation, but pulling out a non-leaf logical form that apparently has children of nonuniform depth.

The context exchange looks like this:

(exchange (exchange harriet (call edu.cmu.lia.semparse.ReferenceQuery.generate 
(string OBJECT) (string pk=32)) (string OBJECT[pk=32])))

& I would take either a solution for

 (string OBJECT[pk=32])

or for

(call edu.cmu.lia.semparse.ReferenceQuery.generate (string OBJECT) (string pk=32))

The documentation suggests a rule like this would work:

(rule $CATEGORY (he) (ContextFn (depth 0) (type fb:type.text)))

...but, alas, no luck. I've also tried depth 1 and depth 2, with no success. Some digging and print statements suggest that my first preference ((string ...) is never investigated, and my second preference ((call ...) can never be selected because it has two leaf children of depth 1 and four leaf children of depth 2.

What's the intended behavior of the depth restriction -- are higher-level nodes meant to be completely symmetrical in depth, or would it be alright to replace that currentLevel == depth with currentLevel <= depth?

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