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

Golden rule for telephone numbers with letters? #72

Open
coezbek opened this issue Jan 5, 2022 · 0 comments
Open

Golden rule for telephone numbers with letters? #72

coezbek opened this issue Jan 5, 2022 · 0 comments

Comments

@coezbek
Copy link

coezbek commented Jan 5, 2022

I stumbled upon the following case where (the otherwise wonderful) PragmaticSegmenter trips up:

It will split a sentence containing a telephone number with letter characters 800.ACME.NOW is split after 800.:

    it "Telephone number with letters" do
      sentence = "If you have questions, call ACME Enterprises at 800.ACME.NOW (800.123.4567) or visit our website at: ACME-Enterprises.com."
      ps = PragmaticSegmenter::Segmenter.new(text: sentence, language: "en")
      expect(ps.segment).to eq([sentence])
    end
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

1 participant