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

Option to disable contractions #735

Closed
AurielleP opened this issue Mar 23, 2020 · 4 comments
Closed

Option to disable contractions #735

AurielleP opened this issue Mar 23, 2020 · 4 comments

Comments

@AurielleP
Copy link

Currently a pattern such as 12345-1234 is getting marked as Contraction and implicitly expanded.

Ideally this should not happen - or there should be a method to undo expansion on contractions like those

@spencermountain
Copy link
Owner

thanks. The regex is right here if you, or anyone, wanted to do a pr.
cheers

@AurielleP
Copy link
Author

I was thinking it would be helpful, instead of fixing that edge case - to have the ability to leave implicit as is - and prevent automatic expansion on ranges, if possible - maybe as an option that is passed in

one other idea might be, if the start of the range is not a lower number than the end of the range - its not valid..

@spencermountain spencermountain changed the title Don't convert a number range to Contraction and expand Option to disable contractions Jun 10, 2020
@spencermountain
Copy link
Owner

changed numberRange to require < 4 numbers

new behaviour in next release:

    ['1-1', ['NumberRange', 'NumberRange', 'NumberRange']],
    ['12-12', ['NumberRange', 'NumberRange', 'NumberRange']],
    ['123-123', ['NumberRange', 'NumberRange', 'NumberRange']],
    ['1234-1234', ['Noun']],

@spencermountain
Copy link
Owner

this is now fixed in 13.6.0

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

No branches or pull requests

2 participants