Skip to content

Hyphen #282

Description

@ojwb

Split out of #187:

A related point is the treatment of hyphen:

To do:

Algorithms not annotated above currently have no special treatment of hyphens.

Activity

  1. added this to the 3.2.0 milestone on May 15, 2026
  2. ojwb commented on Aug 23, 2026

    @ojwb
    MemberAuthor

    Thinking about English (both what I know as a native speaker and https://en.wikipedia.org/wiki/Hyphen#Use_in_English) I think the best general rule there is to treat hyphen as a word break. That's not always what's wanted, but seems likely to cause fewer problems than treating it as a word character, or as a word joiner which is itself omitted from the word.

    Possibly single-letter components could get special treatment (e.g. e-mail -> email, x-ray -> xray). I can't immediately think of a case where that goes wrong, but it's perhaps too much of a quirk for general tokenisation advice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions