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

postgenerator doesn't work inside word blanks like [[t:text…]] #107

Closed
unhammer opened this issue Jan 28, 2021 · 2 comments
Closed

postgenerator doesn't work inside word blanks like [[t:text…]] #107

unhammer opened this issue Jan 28, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@unhammer
Copy link
Member

nob-nno.autopgen.bin.zip
without [[ works

$ echo 'pla~ssar'|lt-proc -p nob-nno.autopgen.bin
plassar

as expected, but:

$ echo '[[t:text:NaNaNa]]pla~ssar[[/]]'|lt-proc -p nob-nno.autopgen.bin
[[t:text:NaNaNa]]pla~ssar[[/]]

(original example from a big docx where there were many words inside the [[)

@unhammer unhammer changed the title postgenerator doesn't work inside word blank like [[t:text…]] postgenerator doesn't work inside word blanks like [[t:text…]] Jan 28, 2021
@unhammer unhammer transferred this issue from apertium/apertium Jan 28, 2021
unhammer added a commit that referenced this issue Jan 28, 2021
@unhammer unhammer added the bug Something isn't working label Jun 11, 2021
unhammer added a commit that referenced this issue Jun 11, 2021
There was already support for [[w:text:foo]]~zzy[[/]] but not for
[[w:text:foo]]xy~zzy[[/]]

This change should keep the old feature of moving wblank-start after
the post-generated part of [[w:text:foo]]~zzy[[/]] (so if there was
a rule turning ~z into Z we get Z[[w:text:foo]]zy[[/]]), but if the
wake-up-mark ~ is seen later in the wblank, it stays surrounded, so
[[w:text:foo]]xy~zzy[[/]] turns into [[w:text:foo]]xyZzy[[/]].

+ tests for #107
unhammer added a commit that referenced this issue Jun 11, 2021
There was already support for [[w:text:foo]]~zzy[[/]] but not for
[[w:text:foo]]xy~zzy[[/]]

This change should keep the old feature of moving wblank-start after
the post-generated part of [[w:text:foo]]~zzy[[/]] (so if there was
a rule turning ~z into Z we get Z[[w:text:foo]]zy[[/]]), but if the
wake-up-mark ~ is seen later in the wblank, it stays surrounded, so
[[w:text:foo]]xy~zzy[[/]] turns into [[w:text:foo]]xyZzy[[/]].

+ tests for #107
unhammer added a commit that referenced this issue Jun 11, 2021
There was already support for [[w:text:foo]]~zzy[[/]] but not for
[[w:text:foo]]xy~zzy[[/]]

This change should keep the old feature of moving wblank-start after
the post-generated part of [[w:text:foo]]~zzy[[/]] (so if there was
a rule turning ~z into Z we get Z[[w:text:foo]]zy[[/]]), but if the
wake-up-mark ~ is seen later in the wblank, it stays surrounded, so
[[w:text:foo]]xy~zzy[[/]] turns into [[w:text:foo]]xyZzy[[/]].

+ tests for #107
unhammer added a commit that referenced this issue Jun 11, 2021
There was already support for [[w:text:foo]]~zzy[[/]] but not for
[[w:text:foo]]xy~zzy[[/]]

This change should keep the old feature of moving wblank-start after
the post-generated part of [[w:text:foo]]~zzy[[/]] (so if there was
a rule turning ~z into Z we get Z[[w:text:foo]]zy[[/]]), but if the
wake-up-mark ~ is seen later in the wblank, it stays surrounded, so
[[w:text:foo]]xy~zzy[[/]] turns into [[w:text:foo]]xyZzy[[/]].

+ tests for #107
unhammer added a commit that referenced this issue Jun 11, 2021
There was already support for [[w:text:foo]]~zzy[[/]] but not for
[[w:text:foo]]xy~zzy[[/]]

This change should keep the old feature of moving wblank-start after
the post-generated part of [[w:text:foo]]~zzy[[/]] (so if there was
a rule turning ~z into Z we get Z[[w:text:foo]]zy[[/]]), but if the
wake-up-mark ~ is seen later in the wblank, it stays surrounded, so
[[w:text:foo]]xy~zzy[[/]] turns into [[w:text:foo]]xyZzy[[/]].

+ tests for #107
+ necessary changes for combineWblanks (can now get called when no
  opening wblanks in queue)
unhammer added a commit that referenced this issue Jun 11, 2021
There was already support for [[w:text:foo]]~zzy[[/]] but not for
[[w:text:foo]]xy~zzy[[/]]

This change should keep the old feature of moving wblank-start after
the post-generated part of [[w:text:foo]]~zzy[[/]] (so if there was
a rule turning ~z into Z we get Z[[w:text:foo]]zy[[/]]), but if the
wake-up-mark ~ is seen later in the wblank, it stays surrounded, so
[[w:text:foo]]xy~zzy[[/]] turns into [[w:text:foo]]xyZzy[[/]].

+ tests for #107
+ necessary changes for combineWblanks (can now get called when no
  opening wblanks in queue)
@khannatanmai
Copy link
Member

@unhammer sorry I've been incredibly busy with my masters thesis and plus there was some talk about post generator being rewritten so I never got around to this. Hope it wasn't too annoying to deal with my wblanks code. Thanks!

@unhammer
Copy link
Member Author

no problem, wasn't too big of a change after I put some time into understanding how it worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants