Skip to content

Conversation

@carl-textalk
Copy link

This is a concept of how to implement support for Swedish short script word translation.
Please review these changes and give feedback whether this is a good start or not.

@kalaspuffar
Copy link
Member

@bertfrees @joeha480

@joeha480
Copy link
Contributor

@carl-textalk @kalaspuffar It looks fine.

I would suggest changing terminology from "short script" to contracted braille. If you are going to support different levels of contraction, you can use the term grade. In the factory implementations (that you have yet to complete), you might have something like this:

  • grade 0 (alias for uncontracted)
  • grade 1
  • grade 2 (alias for contracted)

The term "contracted" should typically be used for the most contracted option, unless that's a highly unusual option.

There's also a possibility to use other numbers, for example:

  • grade 1 (alias for uncontracted)
  • grade 1.5
  • grade 2 (alias for contracted)

The grade system isn't really used in Sweden, so you should talk with @BWestling about what makes the most sense.

Also, I see that you have copied some code from SimpleUCharReplacer. That code is very old and perhaps not a very good template.

Style wise, I prefer to avoid using wildcard imports (e.g. java.util.*) and I prefer to use tabs over spaces. Since these things are highly debatable, I can't say it's wrong, and I am even hesitant to bring it up. All I can say is that nearly 100% of the code use specific imports and tabs, and adding this code as it is would make it less tidy. If I were to merge this, I would probably change this in the process.

@bertfrees
Copy link
Contributor

bertfrees commented Jun 26, 2019

I assume that U+2820 is the capital sign, so maybe put this in a constant? Makes it easier to read the code I think. Or just a comment would be fine too.

Of course I'm interested in the sv_SE-short-words.xml file as this could be used to make a Liblouis version of the translator (and also for our test data which we maintain here). But that's stuff for later maybe. Incidentally, a cool idea for Dotify could be to support our YAML test file format (or a subset of it). This could be a good starting point for implementing some of the Liblouis tables in Java.

@carl-textalk carl-textalk force-pushed the add-swedish-short-words-filter branch from 90ac012 to 5555f22 Compare June 27, 2019 09:01
@carl-textalk carl-textalk force-pushed the add-swedish-short-words-filter branch from 5555f22 to f5ac111 Compare June 27, 2019 09:15
@carl-textalk
Copy link
Author

Hello!
Thanks for the input. I have made some changes and would be interested to hear your thoughts @joeha480.

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

Successfully merging this pull request may close these issues.

4 participants