divvun / libdivvun

lib for running gramcheck and other pipelines + cli; modules for CG→spelling, CG→feedback, tagging blanks
https://giellalt.github.io/proof/gramcheck/GrammarCheckerDocumentation.html
GNU General Public License v3.0
9 stars 1 forks source link

Include all possibilities if several possible &SUGGEST's (on either side of the relation) #63

Closed unhammer closed 6 months ago

unhammer commented 11 months ago

cf. https://github.com/divvun/libdivvun/issues/61 and https://github.com/divvun/libdivvun/blob/4629a43a52b0f46257ac84b2ed4f72d83a185ee4/src/suggest.cpp#L438-L440 we only include the arbitrarily first suggested form when combining suggestions from two words, e.g. if input was

"<ta>"
    "ta" V Inf <W:0> @V &syn-phrasal-verb ID:1
    "spille" V Inf <W:0> @V &syn-phrasal-verb &SUGGEST ID:1 R:RIGHT:2
: 
"<opp>"
    "opp" Adv <W:0> @Adv &syn-phrasal-verb ID:2 &COERROR
    "inn" Adv <W:0> @Adv &syn-phrasal-verb &SUGGEST ID:2 &COERROR
    "inn!" Adv <W:0> @Adv &syn-phrasal-verb &SUGGEST ID:2 &COERROR

we should get both "spille inn" and "spille inn!" but we currently just get one of them.

Similarly if there are several suggestions on the non-COERROR cohort.

unhammer commented 10 months ago

This actually works if you use the error tag to signify what goes together:


"<ta>"
    "ta" V Inf <W:0> @V &syn-phrasal-verb ID:2
    "spille" V Inf <W:0> @V &syn-phrasal-verb &SUGGEST ID:2 R:RIGHT:4
    "lage" V Inf <W:0> @V &syn-phrasal-verb1 &SUGGEST ID:2 R:RIGHT:4
: 
"<opp>"
    "opp" Adv <W:0> @Adv ID:4 &COERROR
    "inn" Adv <W:0> @Adv &syn-phrasal-verb &SUGGEST ID:4 &COERROR
    "opptak" Adv <W:0> @Adv &syn-phrasal-verb1 &SUGGEST ID:4 &COERROR
: 
: 

image

unhammer commented 10 months ago

what doesn't yet work is getting the cross product of all combinations which use the same error tag – but do we need/want that?

snomos commented 10 months ago

Not sure, would need more examples to prove the need.