r0ller/alice

add possibility to create a full featured node for an empty terminal

r0ller opened this issue · 0 comments

Issue #37 got fixed which proved that an empty terminal can be handled but if one wanted to create a node for a concealed word, there's no possibility for it currently.

Example:

Yes.

Let's say the surface form 'yes' means 'yes, send' confirming a previous intent.

In this case, it could be useful to create a node substituting 'send' with a general verb like 'do' to get a verb in the sentence. So a parse tree would be created for 'yes, do' for the sentence 'yes'. Anyhow, the depolex for 'do' could look like: do(yes). Just like in case of 'no', it could be: do(no). In the end, the functor of 'do' could be used to confirm or deny a previous intent.

It seems that this also requires context handling as verb phrase ellipsis can only be solved by finding the verb missing from the currently processed sentence in another sentence of the context.

The steps are probably as follows:

  1. creating analysis for a sentence without a verb by use of an empty terminal
  2. context handling
  3. find the missing verb in the context and put it to its place in the sentence where the empty terminal indicates it. This is simply about reconstructing the sentence with the appropriate verb as a string.

The problem with 3. is that finding a verb with its prefix is already pretty difficult (requires that the prefix is recorded as a feature of the verb not as a standalone category with a stem). But when found, it's even more complicated to put the verb with a prefix to the right place to create a correct sentence. Without a prefix it's kind of easier due to 1. However, constructing a correct sentence may be unnecessary since the constructed sentence is either ambiguous or unambiguous. If it's unambiguous, the algorithm already developed to interpret a syntactically incorrect sentence will fit the bill. If it's ambiguous, the algorithm will fail and a question can be raised to the user for clarification. All in all, it may be enough to find the verb with its prefix and concatenate them with the sentence not having a verb then just let the algorithm interpret the constructed syntactically incorrect sentence.