-
Notifications
You must be signed in to change notification settings - Fork 1
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
Handling process flags in OBFL #27
Comments
Just some quick remarks:
In the past I have been testing with the maximum number of iterations, which is currently a fixed value. This would also be a nice processing instruction. |
I see, I thought the idea was more to standardize these options in OBFL itself. The change that you propose here could be a good intermediary solution. We don't even need to change OBFL for it. You can already include any metadata you want. And if you make sure "Dotify" is in the "proc" namespace URI, it is immediately obvious what the metadata is for. |
Hi @bertfrees I'm sorry but I don't really understand this paragraph. Can you elaborate? Best regards |
You have not specified what the namespace URI of these metadata elements will be. I'm just saying that whatever you choose, you should make sure it has the word "Dotify" in it somewhere. This makes it immediately clear that they are Dotify settings. |
Hi @PaulRambags The locale is the locale of the book, for instance this book is written in Swedish for people in Sweden. There is a different one that is Swedish for people in Finland. When you run a book through the Dotify library you need to give it the language it should be processed plus if it should be contracted in any way. All other parameters are optional but those are mandatory. The language in the locale is used to select the correct translation table. The difference between the book language and the processing locale is that the book could be in a different language but still use the translation table for Swedish. Best regards |
Hi @bertfrees What do you think about:
Best regards |
@PaulRambags I think it's clear that these metadata elements map one to one to Dotify settings. So as far as I'm concerned they do not need to be explained, at least not in the OBFL specification. If the settings are not documented anywhere you could consider creating a web page specifically for it. Maybe there is already something in https://mtmse.github.io/dotify.api/latest/javadoc/index.html, or perhaps on the wiki? @kalaspuffar I'm not sure about the "processing-instruction" because in XML land that means something else. Coming to think of it, using processing instructions could actually also be a solution to this problem. But since the The form of the URI you chose is common for XML namespaces, but not for vocabularies. It's two different things. For one, I would drop the "ns". For metadata one usually doesn't use the term "namespace". I would also drop the year because it doesn't mean anything in this case. Also I've looked at some other existing URIs and they always seem to end with Finally, it's also not so common to use namespaced elements to specify metadata ( |
Including Dotify instructions in OBFL is a good short term solution, however what we are trying to solve here is (partly) an important limitation of OBFL which I think should be properly addressed at some point, namely that it not provide enough detailed control over translation. Whether it is something that needs to be solved within OBFL itself is not clear yet, but it probably should. There is a disclaimer in the text that says that OBFL is for controlling formatting (the F in OBFL), not translation:
This last "except" is an important nuance. Indeed, OBFL already has the These features are great however I think there are some issues with them:
|
Hi @bertfrees and @PaulRambags After reviewing the code, I realized that hyphenation was handled in a totally different way so it could be handled all through the document. I thought this was a good solution and very similar to the way mark-capital-letters should work as they both change the output text in different ways. So I've added some PRs for this, both an addition to the OBFL specification, API, and formatter. #28 I hope this is a good solution as it was in line with earlier implementations and was a small change to the code to handle this extra parameter. Best regards |
Hi @bertfrees and @PaulRambags
As we discussed in our meeting, I propose we add some metadata to handle specific processing instructions that we only can add as parameters to the tooling today.
All parameters added in the metadata definition below using prefix proc (processing instructions) can be found in https://github.com/mtmse/dotify.api/blob/master/src/org/daisy/dotify/api/formatter/FormatterConfiguration.java
In the current implementation, only the mode, locale, markCapitalLetters, and ignoredStyle are variables added in Studio via code, configurable by the user, and available in different output templates.
This change ensures that the dotify library can produce a PEF document anytime later, just using the OBFL as input, which will improve the usefulness of the OBFL document.
My suggestion for the implementation later is to use these variables as the default variables but enable the option to override them during execution if you want to change the output after you've created the OBFL document.
Best regards
Daniel
The text was updated successfully, but these errors were encountered: