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

Abstract character classes #11

Closed
RubbaBoy opened this issue Apr 11, 2019 · 1 comment
Closed

Abstract character classes #11

RubbaBoy opened this issue Apr 11, 2019 · 1 comment
Assignees

Comments

@RubbaBoy
Copy link
Member

Currently, there are 4 classes all meant to store letter data all sharing similar methods (#getX(), #getY(), #getWidth(), #getHeight(), etc.). These 4 classes should be abstracted to a single character interface/superclass, with any necessary implementations made which should simplify a lot of code.

The classes in question are:

  • ImageLetter - Meant to store finalized data which is used by programs using the library
  • SearchCharacter - Stores the coordinate data and some calculated data created directly when an image is read
  • DatabaseCharacter - Averaged character sections and other trained data derived only from the database
  • TrainedCharacterData - Stores data during training to then average stored data and insert them into the database

I'm guessing these can probably be merged into 2, maybe 3 classes with better abstraction. This isn't currently a super high priority, but I'd like to see it done before the v2 release.

@RubbaBoy RubbaBoy self-assigned this Apr 13, 2019
RubbaBoy added a commit that referenced this issue Apr 13, 2019
I decided not to merge classes, because of the two abstract classes all
characters extend, it cleans up their code heavily and still allows for
necessary data separation.

This also cleans up the general code a bunch, one of which is making tests require a 98% or higher success rate.
Once testing is done and I have some people review it, it is release-ready.
@RubbaBoy
Copy link
Member Author

Fixed in a37e0f3

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