8000 Spellcheck does not recognise words containing hyphens · Issue #184 · otsaloma/gaupol · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Spellcheck does not recognise words containing hyphens #184
Open
@sbraz

Description

@sbraz

Hi,
I'm not sure how to work around this issue but I see that the spell checker tokenizer splits words on hyphens:

word = re.split(r"(?!')\W+", self.text[i:])[0]

This can break spellchecking for the following French subtitle:

1
00:00:00,000 --> 00:00:03,000
twin-set talkie-walkie

Although both words are present in the dictionary, they won't be recognised because neither twin or talkie are listed:

$ grep -P '^(twin|talkie)' /usr/share/myspell/dicts/fr_FR.dic
talkies-walkies/D'Q' po:nom is:mas is:pl
talkie-walkie/L'D'Q' po:nom is:mas is:sg
twin-set/S.() po:nom is:mas

I think in general splitting on hyphens is a good idea but maybe we could do something to expand the selection to the full word when the checker returns a mistake. It doesn't seem very straightforward, do you suppose it's worth it?

Off-topic questtion: does the name "aeidon" mean anything?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0