{"action":"closed","issue":{"url":"https://api.github.com/repos/junaidiiith/Apertium_Code/issues/7","repository_url":"https://api.github.com/repos/junaidiiith/Apertium_Code","labels_url":"https://api.github.com/repos/junaidiiith/Apertium_Code/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/junaidiiith/Apertium_Code/issues/7/comments","events_url":"https://api.github.com/repos/junaidiiith/Apertium_Code/issues/7/events","html_url":"https://github.com/junaidiiith/Apertium_Code/issues/7","id":156692336,"number":7,"title":"how to delimit inline blanks?","user":{"login":"unhammer","id":56868,"avatar_url":"https://avatars.githubusercontent.com/u/56868?v=3","gravatar_id":"","url":"https://api.github.com/users/unhammer","html_url":"https://github.com/unhammer","followers_url":"https://api.github.com/users/unhammer/followers","following_url":"https://api.github.com/users/unhammer/following{/other_user}","gists_url":"https://api.github.com/users/unhammer/gists{/gist_id}","starred_url":"https://api.github.com/users/unhammer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unhammer/subscriptions","organizations_url":"https://api.github.com/users/unhammer/orgs","repos_url":"https://api.github.com/users/unhammer/repos","events_url":"https://api.github.com/users/unhammer/events{/privacy}","received_events_url":"https://api.github.com/users/unhammer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-05-25T08:33:43Z","updated_at":"2016-05-30T18:28:05Z","closed_at":"2016-05-30T18:28:05Z","body":"Consider the html input `<i>de jour?</i>`. This may be tokenised by lt-proc as \"de jour\" and \"?\" (with the apertium-deshtml|lt-proc we get `[<i>]^de jour/de jour<adv>$^?/?<sent>$[<\\/i>]`, but our deformatter doesn't (and can't) know where the token borders are.\r\n\r\nIf we turn this into `[{<i>}]de [{<i>}]jour?` then lt-proc will fail to notice the multiword expression (since there's more than just a simple space in between); it'll basically break all formatted multiwords. \r\n\r\nBut what's worse is the \"?\" – if we just \"split on spaces\" and turn `<i>foo?</i> Bar` into  `[{<i>}]foo? Bar` , how does lt-proc know that it's supposed to output `[{<i>}]^foo/foo<ij>$[{<i>}]^?/?<sent>$ ^Bar/Bar<n>$` and not `[{<i>}]^foo/foo<ij>$^?/?<sent>$ ^Bar/Bar<n>$`? (How does it know that the `?` also is in italics?).\r\n\r\nThis is also an issue in generation – if the end of the pipeline is `foo [{<b>}]bar!` we don't know if that's `foo <b>bar</b>!` or `foo <b>bar!</b>`.\r\n\r\nThe simplest solution is that we treat inline blanks as unclosed until the next `[`. So when we reach the end-tag `</i>`, we have to we have to start on a superblank, even if the next character is a non-blank (if it is, we immediately close the superblank). So\r\n* `<i>de jour?</i> Yes` →deform→ `[{<i>}]de jour?[] Yes` →translate→ `<i>dagens?</i> Ja` \r\n* `<i>de jour</i>? Yes` →deform→ `[{<i>}]de jour[]? Yes` →translate→ `<i>dagens</i>? Ja` \r\n* `<i>de</i> jour? Yes` →deform→ `[{<i>}]de[] jour? Yes` →translate→ `<i>av</i> dagen? Ja` \r\n* `<i>de jour?</i><div>Yes</div>` →deform→ `[{<i>}]de jour?[<div>]Yes[</div>]` →translate→ `<i>dagens?</i><div>Ja</div>` "}}
{"actor":{"display_login":"unhammer"}}