opencog/relex — pull request #70 by edyirdaw (2014-06-09 13:29:08+00:00)
Title: NI1_Time: fix for ND connector

The different NI connectors are not handled by relex at all. It seems best to handle each NI connector such as Nif/NIt and NI*p separately.

More specifically, this fix handles

“Jane is at the daycare center every day of the week between 7 am and 7:30 am and between 16 pm and 16:30 pm.” which relex outputs previously as

_pobj(at, center)
_psubj(at, Jane)
_quantity(and, 7am)
_quantity(7:30am, and)

Now becomes

_pobj(at, center)
_psubj(at, Jane)
conj_and(between, between)
_time(pm, 16)
_time(pm, 16:30)
_time(am, 7)
_time(am, 7:30)

Expressions which require numerical modifiers such as pm, m (meters), etc need to be written with space. So, 7am won't work but 7 am does. This looks like a link-grammar issue.

The use of a time flag is deemed redundant and “_time” seems to suffice for the identification of time information.

More generally, the fix handles the use of the NI connectors with the ND connector.

Fixes for other NI connector types and their use with other types of connectors such as Dmcn are yet to be implemented.