Kozea / Pyphen

Hy-phen-ation made easy
https://courtbouillon.org/pyphen
Other
198 stars 24 forks source link

Exception when word not found in dict? #21

Closed MoyanZitto closed 4 years ago

MoyanZitto commented 6 years ago

Hi, is it possible to raise an exception when query word is not in current dictionary? Now it is very possible for pyphen to return 1 for nonsense input, which is quite confusing.

liZe commented 4 years ago

Hello!

We can’t do this, because hyphenation dictionaries don’t always list words. Some languages (French for example) rely on rules that can work on unknown words (that’s really cool), and its dictionary only includes words for exceptions.