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

Zulu dictionary hangs browser #7

Closed
dbolton opened this issue Apr 25, 2011 · 3 comments
Closed

Zulu dictionary hangs browser #7

dbolton opened this issue Apr 25, 2011 · 3 comments

Comments

@dbolton
Copy link

dbolton commented Apr 25, 2011

var dictionary = new Typo("zu_ZA", affData, dicData);
var is_spelled_correctly = dictionary.check("hamba")

browser hangs when loading the dictionary (sometimes it gives an alert asking if you want to stop the script)

I used the Zulu dictionary and affix files provided by OpenOffice.org and Mozilla
https://addons.mozilla.org/thunderbird/downloads/latest/46490/addon-46490-latest.xpi?src=addondetail
(if you change the .xpi file extension to .zip you can decompress the files)
(here's the source page: https://addons.mozilla.org/en-US/thunderbird/addon/zulu-spell-checker/ )

@cfinke
Copy link
Owner

cfinke commented Apr 25, 2011

Probably related to the 2,200 affix rules; the English dictionary only has ~200.

Can I ask what kind of project that you're working on that is allowing you to discover these bugs?

@cfinke
Copy link
Owner

cfinke commented Apr 25, 2011

Actually, it looks like that specific Zulu .dic file also contains the entire .aff file at the end, probably by accident. If you remove that, the dictionary loads without freezing the browser (although it does take a while due to the size of the legitimate dictionary).

@cfinke cfinke closed this as completed Apr 25, 2011
@dbolton
Copy link
Author

dbolton commented Apr 25, 2011

I'm creating a spell checker that works with music lyrics. No notation software I'm aware of has a spell checker. JavaScript is the language I'm most comfortable with (and excellent at parsing MusicXML files), so I was excited when I read your blog post.

Initially I was hoping to post the spell checker on the web, but the size of the dictionary files make that less practical (at least in it's current form since it loads the dictionary files every time you open a MusicXML file to check the spelling of the lyrics).

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

2 participants