Friday, January 24, 2025

Acuitas Diary #80 (January 2025)

2025? Wow, are we living in The Future or what?? I kicked off this year's work on Acuitas by introducing some numerical reasoning. That incidentally demanded better support for adjectives in general, since I wanted to be able to say things like "George had two eyes," and "George had blue eyes" is structurally similar.

Children's number blocks. A block with a yellow '1' on the front and a block with a red '3' on the front stand on a glossy off-white surface in the foreground; another block with a green '2' on the front is balanced at an angle between them. Other toy blocks with letters and pictures on them are scattered in the background. Photo credit: perpetualfostering.co.uk
Photo credit: perpetualfostering.co.uk

So, the first step was to extend Acuitas' knowledge representation format to allow for noun modifiers. The parser has been able to handle these for a long time, but later stages of the text processing pipeline simply disregarded them. I expanded the Interpreter so it would include single-word adjectives in the knowledge data structures, and adjusted the Semantic Memory functions to store them when they appeared in a learnable fact.

Another enabling feature I had to start adding to the Narrative engine was the ability to keep track of multiple instances of the same kind of object. This is more complicated than you might think. It's no problem when the instances have unique names and are always called by them, but most mundane objects aren't given individual names. So if I refer to, for example, "a box" in two nearby sentences, am I speaking of the same box or two different ones? If Susan has four cookies and eats one, which cookie did she eat? Does it matter? If it does, we have to keep track of the fact that one cookie has been eaten without prematurely assigning that event to any specific cookie. I've barely scratched the surface of working all this out, but for now, I can tell Acuitas that something is not a previously mentioned instance by attaching the adjective "new" or "another." Numerical adjectives will also make the Narrative module create that number of instances to be tracked on the scratchboard. E.g. given the input "Three books were on the table," Narrative will now automatically produce data structures for three separate books and give each one a location relationship with the table.

Going the other direction, Narrative can now count objects for purposes of resolving "how many?" questions. This works for both queries about existence or presence in the current context ("How many cookies are there?" or "Are there two cookies?") and queries about how many instances a relationship applies to ("How many cookies does Susan have?").

The last features I added to Narrative's question-answering function were interpretations of the words "some," "any," "all," "most," and "no" (as adjective). Each of these is associated with a test that uses the counting ability. E.g. if you ask "Does Susan have any cookies?" Acuitas will answer "yes" if there are one or more cookie instances with a relationship "Susan has" on the current Narrative scratchboard. "Does Susan have all cookies?" returns "yes" if every cookie instance on the board has the relationship "Susan has," and so on.

An interesting quirk applies to "some." If I asked "Do you have some rings?" and you happened to have one ring, how would you answer? I suspect many people would feel inclined to say neither yes nor no, but rather "I have one." To a lesser extent, this could also apply to "any." Acuitas, for the moment, defines "any" to mean at least one, and "some" to mean strictly more than one, and will answer questions about these quantities with a blunt yes or no. This is how my mind would like English to work, but I may need to bow to the actual fuzzy usage eventually.

Until the next cycle,
Jenny

No comments:

Post a Comment