Problem with subreadings

13 views
Skip to first unread message

Trond

unread,
Feb 7, 2021, 7:09:38 AM2/7/21
to Constraint Grammar
The documentation says:

Rule option SUB:N tells a rule which sub-reading it should operate on and which it should test as target. (..) Positive numbers refer to sub-readings starting from the primary and going deeper, while negative numbers start from the last sub-reading and go towards the primary. (...)

Context option /N tests the N'th sub-reading of the currently active reading, where N follows the same rules as for SUB:N above. The /N must be last in the context position. If N is * then the test will search the main reading and all sub-readings.

----

Thia looks great. But I am not able to make it work.

Here is what I have: "kahtakymmentä minuuttia" 'twenty minutes' (lines 1-7 below). I want to say that "minuuttia" is "Sg Par" BECAUSE there is a numeral in the singular to its left. Had it been "kahta minuuttia" it would have been straightforward: SELECT Sg + Par IF (-1 Num + Sg);. Now, with the subreading 

  1. "<kahtakymmentä>"
  2.         "kymmentä" <W:0.0>
  3.                 "kaksi" Num Sg Par <W:0.0>

  4. "<minuuttia>"
  5.         "minuutti" N <fit> Pl Par <W:0.0> @<OBJ MAP:1512 SUBSTITUTE:2000
  6.         "minuutti" N <fit> Sg Par <W:0.0> @<OBJ MAP:1512 SUBSTITUTE:2000
I try different versions

REMOVE:SgPar Pl + Par IF (-1 Num + Sg)(0 Sg + Par); # (a)

REMOVE:SgParSub Pl + Par IF (-1/1 Num + Sg)(0 Sg + Par); # (b)

but no. (a) works for "kahta minuuttai" (without subreading) but (b) is ignored by the input.

I have tried both -1/*, -1/-1. Admittedly, using subreadings when referring to *context* is not covered in the documentation (not in the chapter Rule Option SUB:N anyway), but I thought exchanging "0/" with any position number seemed a natural extension. And we do want to refer to subreadings also in the context.

So: What do I miss?


Trond.



Reply all
Reply to author
Forward
0 new messages