Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

withCasing uses getCasing(cohort wf), should use getCasing(whole_underlined_wf) #34

Closed
unhammer opened this issue Aug 21, 2019 · 0 comments

Comments

@unhammer
Copy link
Member

If the suggestion/underline covers more than one cohort, we need to use the casing from that whole string, not just the cohort of the reading with the error tag.

If input is

"<A.>"
	"A" N Sg <NoSpaceAfterPunctMark> &no-space-after-punct-mark ID:1 R:RIGHT:2
	"A" N Sg <NoSpaceAfterPunctMark> "<A. Eira>" &no-space-after-punct-mark &SUGGESTWF ID:1 R:RIGHT:2
"<Eira>"
	"Eira" N Prop &LINK &no-space-after-punct-mark ID:2

we want &SUGGESTWF to produce A. Eira (as if it had the <fixedcase> tag).

But

	if(r.suggestwf) {
		r.sforms.emplace_back(withCasing(r.fixedcase, inputCasing, r.wf));
	}

gets called with inputCasing that's set by inputCasing = getCasing("A.") which is considered uppercase, should be called with getCasing("A.Eira") which is mIxed (and leads to no case change).

unhammer added a commit that referenced this issue Feb 16, 2021
Apply input casing to suggestions in CG mode as well (respects fixedcase, but not #34)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant