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
Created time helper functions #993
Conversation
@sebastianruder will you pls add the example sentences per rule, it makes it easier for testing. And also, add a comment of the outputs on github conversations so as to foster discussion on the knowledge representation. Thanks |
(if (string=? $y_pos "verb") | ||
(PredicateNode $y_instance df-node-stv) | ||
(ConceptNode $y_instance df-node-stv) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a possibility that adjective will also become PredicateNode
from #987 because adjective in some case can act like a predicate.
Depends on discussion and whether the change will be approved of course.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@williampma, can you think of an example sentence, where RelEx would produce an adjective in the second argument position in a before or after relation? I can't think of any.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"He sleeps before he is tired." gives me before(sleep, tired)
and pos(tired, adj)
for parse 1. Other parse # give pos(tire, verb)
so I guess it varies.
If you really want to avoid multiple helper functions for similar rule, you could create:
and call it like
|
@amebel, @williampma, could you review the recent commits? The discussion can be found here while the related commit can be found here. |
) | ||
(list | ||
(EvaluationLink df-link-stv | ||
before-or-after-node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could just do (PredicateNode $before_or_after)
here, since before-or-after-node
seems kind of redundant. Just nitpicking :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @williampma. I totally missed that. :)
@amebel can you please merge this, if it is okay? |
(define time-node | ||
(if (string=? $period "am") | ||
(TimeNode $hour df-node-stv) | ||
(TimeNode (number-string (+ (string->number $hour) 12)) df-node-stv) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls change number-string to number->string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it.
Should not be merged yet.