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

Hspell.linginfo() return an empty list if the given word can only be parsed as having a prefix. #3

Closed
ninjaaron opened this issue May 4, 2017 · 2 comments

Comments

@ninjaaron
Copy link

Title pretty much says it all.

how it works in the shell (hspell 1.2 and 1.3):

$ hsp -l <<< כעב
צירוף חוקי: כ+עב
	עב(ע,ז,יחיד)
	עב(ע,ז,יחיד,סמיכות)

(hsp is my wrapper script that converts between the system locale and ISO-8859-8)

how it works in Python (3.6):

>>> from HspellPy import Hspell
>>> hs = Hspell(linguistics=True)
>>> hs.linginfo('כעב')
[]

Thanks for this lib, by the way. It's very useful for a project I'm working on. I was going to send a patch, but then I discovered this stuff is all C and I don't have a clue about that. Sorry I can't be more helpful.

(P.S. the current behavior is actually very convenient for my project, since I'm testing exactly whether the form exists by itself or it's a prefix, but I figured you'd like to know)

@ninjaaron ninjaaron changed the title Hspell.linginfo() return an empty list if the given can only be parsed as having a prefix. Hspell.linginfo() return an empty list if the given word can only be parsed as having a prefix. May 4, 2017
@eranroz
Copy link
Owner

eranroz commented May 5, 2017

Thank you for the comment.

  1. You should use hs.enum_splits to get the baseword, which can be used for linginfo.
  2. However, I find it convenient to include this functionality into linginfo - so I added a new parameter split_prefix.

The code and the package were updated

@eranroz eranroz closed this as completed May 5, 2017
@ninjaaron
Copy link
Author

Thanks! will do! (The current behavior is actually perfect for what I'm doing)

I don't know how I missed .enum_splits() in the readme. Must have totally glossed over 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

2 participants