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

run together limit #1

Open
ragefuljoe opened this issue Nov 10, 2011 · 6 comments
Open

run together limit #1

ragefuljoe opened this issue Nov 10, 2011 · 6 comments
Assignees

Comments

@ragefuljoe
Copy link

I'm trying to get raspell working and recognize long strings of run-together words. Using this to init:

speller.set_option("run-together-limit","30")

However it's hanging on anything over 2.

@dmarkow
Copy link
Owner

dmarkow commented Nov 10, 2011

When you say "hanging" what exactly do you mean? It can't get past the speller.set_option line? Or it works, but when you try to spell check a word it hangs? (Also, might not be related, but from Aspell's source it looks like the maximum you can use is 8, if you enter anything bigger, it just reduces it to 8):

static PosibErr<void> run_together_limit(SpellerImpl * m, int value) {
  if (value > 8) {
    m->config()->replace("run-together-limit", "8");
    // will loop back
  } else {
    m->run_together_limit_ = value;
  }
  return no_err;
}

@ghost ghost assigned dmarkow Nov 10, 2011
@ragefuljoe
Copy link
Author

It's hanging when it tries to process a string with three or more words. In my instance, the word variable seems to be empty after word = speller.suggest(word).first

@dmarkow
Copy link
Owner

dmarkow commented Nov 10, 2011

Can you provide the exact code and words you're using to trigger this?

@ragefuljoe
Copy link
Author

http://pastebin.com/vvJu5y6c

Just using a test strong of elephantapplefrog

@dmarkow
Copy link
Owner

dmarkow commented Nov 10, 2011

Ok, so I'm assuming that it's not actually "hanging" in the sense that you're getting a lock-up or the program stops responding or anything; instead, you're just getting nil back when you expect elephant applefrog, correct?

It looks like you need to set an additional option if you want to use a run-together-limit greater than 2:

speller.set_option("run-together-limit", "8")
speller.set_option("run-together", "true") # defaults to false

@ragefuljoe
Copy link
Author

Well the app actually does stop running. I can't figure it out at all.

update*

Ok so if I add the options you listed it doesn't hang. However I guess what I was trying to do was get it to split the words. For example in "elephantapplefrog" it should produce "elephant apple frog".

If I take out the run-together option, it works like I want for two word strings, but hangs on 3 or more. If I add the options, it doesn't hang but also doesn't split up the words.

If I change
speller.suggestion_mode = Aspell::SLOW
to
speller.set_option("sug-mode","bad-spellers")

it returns "elephant".

thanks for the help

On Nov 10, 2011, at 17:48, Dylan Markow reply@reply.github.com wrote:

Ok, so I'm assuming that it's not actually "hanging" in the sense that you're getting a lock-up or the program stops responding or anything; instead, you're just getting nil back when you expect elephant applefrog, correct?

It looks like you need to set an additional option if you want to use a run-together-limit greater than 2:

speller.set_option("run-together-limit", "8")
speller.set_option("run-together", "true") # defaults to false

--- 
Reply to this email directly or view it on GitHub:
https://github.com/dmarkow/raspell/issues/1#issuecomment-2703088

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