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

Use hyphenization algorithm. #150

Open
flowchartsman opened this issue Aug 26, 2015 · 5 comments
Open

Use hyphenization algorithm. #150

flowchartsman opened this issue Aug 26, 2015 · 5 comments

Comments

@flowchartsman
Copy link

Pursuant to the discussion in #149, I have started work on incorporating Hypher into jetzt. I've made an initial checkin on my dev branch that seems to work pretty well, but it's currently hard-coded for en-us. Should I support any other languages, or should I just push on with this as-is, making sure I fall back to the default behavior in case of other languages?

@ds300
Copy link
Owner

ds300 commented Aug 27, 2015

I don't mind as as long as language detection involves looking at the text. 👍

@flowchartsman
Copy link
Author

Current version is up and communicates with the background page to make a call to the chrome.tabs API to detect language. It then uses this to look up the patterns based on their ID. Having said that, I'm still having a couple errors that I could use the help of someone more experienced in extension design to help error out.

One is Attempting to use a disconnected port object showing up in the background page.
The other is No tab with id: <some number>. One or both of them may be related to my choice to stick the hyphenator initialization at the top level of the parse module. Not sure. Would someone mind taking a look?

After these two are ironed out, the only thing left to do is import more language patterns from https://github.com/bramstein/hyphenation-patterns, and hashify them into a lookup table so that it's not doing O(n^2) lookups through the language IDs.

@ds300
Copy link
Owner

ds300 commented Aug 28, 2015

Sorry I don't know what either of those errors are about. I'm not really a chrome extension guy either. I also don't really have the time to go debugging for you at the moment, but you have my best wishes!

@flowchartsman
Copy link
Author

Righto. I'll ask around and, when I'm satisfied, I'll issue a pull request.

@sergeevabc
Copy link

In case hyphenation is implemented, make sure to add an option to turn it off as there are ppl like me who are not thrilled with the idea of inwardly gluing pieces of words divided by dashes when there is enough space on the screen to present the whole word and it takes less focus to grasp it.

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

3 participants