opencog / link-grammar

The CMU Link Grammar natural language parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Word "test" in English dict 5.12.1 vs older ones

ampli opened this issue · comments

In previous dict versions we got:

linkparser> test
Found 1 linkage (1 had no P.P. violations)
	Unique linkage, cost vector = (UNUSED=0 DIS= 0.05 LEN=1)

    +-->Wa---+
    |        |
LEFT-WALL test.n

linkparser> a test
Found 2 linkages (2 had no P.P. violations)
	Linkage 1, cost vector = (UNUSED=0 DIS= 0.05 LEN=3)

    +---->Wa----+
    |     +Ds**c+
    |     |     |
LEFT-WALL a  test.n

Press RETURN for the next linkage.
linkparser> 
	Linkage 2, cost vector = (UNUSED=0 DIS= 0.25 LEN=3)

    +---->Wa----+
    |     +Ds**x+
    |     |     |
LEFT-WALL a  test.n

However, in dict 5.12.1 we get:

linkparser> !wall
Display wall words turned on.
linkparser> a test
No complete linkages found.
Found 2 linkages (2 had no P.P. violations) at null count 1
	Linkage 1, cost vector = (UNUSED=1 DIS= 0.00 LEN=3)

    +----------RW---------+
    +---->Wa-----+        |
    |            |        |
LEFT-WALL [a] test.n RIGHT-WALL

Press RETURN for the next linkage.
linkparser> 
	Linkage 2, cost vector = (UNUSED=1 DIS= 2.00 LEN=3)

    +----------RW---------+
    +---->Wd-----+        |
    |            |        |
LEFT-WALL [a] test.n RIGHT-WALL

linkparser> test
Found 2 linkages (2 had no P.P. violations)
	Linkage 1, cost vector = (UNUSED=0 DIS= 0.00 LEN=1)

    +--------RW-------+
    +-->Wa---+        |
    |        |        |
LEFT-WALL test.n RIGHT-WALL

Press RETURN for the next linkage.
linkparser> 
	Linkage 2, cost vector = (UNUSED=0 DIS= 2.00 LEN=1)

    +--------RW-------+
    +-->Wd---+        |
    |        |        |
LEFT-WALL test.n RIGHT-WALL

BTW, in either case, a stand alone "test" is not parsed as "test.v". Why is that? (It seems it may have an implied object from the context).

Probably due to #1398 or nearby. I'll take a look. BTW, I also tweaked one or two unit tests that used the word 'test'.

test.v

Single verbs like "jump" can be interpreted as a command. A single "test !" as a verb in English would be weird, except in a few very specific contexts. You'd have to say "go test!" if that's what you'd wanted. Otherwise, "test!" is a declaration "what I'm doing right now is a test."

coder: I have all these bugs
boss: You should go test
coder: But I'm not sure they're really there.
boss: Go test!
coder: I think I'll just ...
boss: Test!

The last is a command, but it is only syntactically appropriate when preceded by the earlier sentences. Otherwise, it makes no sense, by itself; normally, you can't say that, only "go test" is appropriate.

This shows that language, and in particular, cost structure, depends on context. The (infinitely) high-cost command "test!" becomes low cost in context. (It also shows that test.n is completely incorrect, in the last case, and should be have a high cost (infinite cost) in this context.

Closing, fixed in 9610f88 and 588d157